Getting Started
Due to the modular nature of the library you can pick and chose modules, if you only need a select few.
sbt module IDs
val bmCommonsVersion: String = "0.4.0"
def bmCommons(m: String): ModuleID = "com.busymachines" %% s"busymachines-commons-$m" % bmCommonsVersion
val bmcCore: ModuleID = bmCommons("core") withSources ()
val bmcDuration: ModuleID = bmCommons("duration") withSources ()
//if you depend on effects, then no need to bring in the other three
val bmcEffects: ModuleID = bmCommons("effects") withSources ()
val bmcEffectsSync: ModuleID = bmCommons("effects-sync") withSources ()
val bmcEffectsSyncC: ModuleID = bmCommons("effects-sync-cats") withSources ()
val bmcEffectsAsync: ModuleID = bmCommons("effects-async") withSources ()
val bmcJson: ModuleID = bmCommons("json") withSources ()
val bmcRestCore: ModuleID = bmCommons("rest-core") withSources ()
val bmcRestJson: ModuleID = bmCommons("rest-json") withSources ()
val bmcSemVer: ModuleID = bmCommons("semver") withSources ()
val bmcSemVerParsers: ModuleID = bmCommons("semver-parsers") withSources ()
val bmcRestJsonTK: ModuleID = bmCommons("rest-json-testkit") % Test withSources ()
val bmcRestCoreTK: ModuleID = bmCommons("rest-core-testkit") % Test withSources ()
modules
Module | Description | Version |
---|---|---|
core | semantically relevant exceptions | |
duration | durations with no special DSL and little bullshit | |
effects-sync | Result monad, and helpers for Option, Try, Either! |
|
effects-sync-cats | Validated applicative, built on top of cats ! |
|
effects-async | easier Scala Future , cats IO |
|
effects | both of the above! | |
json | all your json needs! | |
rest-core | straightforward use of akka-http | |
rest-core-testkit | concise DSL for writing REST level tests | |
rest-json | json implementation of rest-core |
|
rest-json-testkit | REST endpoint testing DSL specialized for JSON input/output | |
semver | semantic version data-type with natural ordering | |
semver-parsers | text parser for above semantic version |
deprecated modules
This is a parallel module hierarchy whose json serialization is handled by spray-json
. DO NOT use together with their non-deprecated counterpart. These will not live very long, use at your own risk. The same design rules were followed, and the rest
packages are syntactically, and semantically almost identical to the non-deprecated counterparts. Using the json
package differs the most.
These modules have been removed starting with version 0.4.0
. In case any bugs are found, they will be fixed and released as version 0.2.x
. Think parallel scala 2.11
, and 2.12
series.
Module | Description | Version |
---|---|---|
json-spray | spray analog of the the json module. |
|
rest-json-spray | spray analog of rest-json module |
|
rest-json-spray-testkit | spray analog of the rest-json-testkit module |