Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.system

Introduces some conveniences for dealing with duct systems:

  • A multimethod config for naming integrant configs, like :dev, :test, etc.
  • An ig/init-key alternative that allows a component's configuration to specify an alternative component implementation, possibly bypassing the ig/init-key implementation entirely
  • replacement and shrubbery-mock alternatives
Introduces some conveniences for dealing with duct systems:

* A multimethod `config` for naming integrant configs, like `:dev`,
`:test`, etc.
* An `ig/init-key` alternative that allows a component's *configuration*
  to specify an alternative component implementation, possibly bypassing
  the `ig/init-key` implementation entirely
* `replacement` and `shrubbery-mock` alternatives
raw docstring

component-spec-with-alternativeclj

(component-spec-with-alternative live-spec)

Alternative components are likely run in dev and test environments where components are unlikely to take the same arguments as their live counterparts. This helper function capture that notion for component specs.

Alternative components are likely run in dev and test environments
where components are unlikely to take the same arguments as their
live counterparts. This helper function capture that notion for
component specs.
sourceraw docstring

configcljmultimethod

Provides a way for client application to name different integrant configs, e.g. :test, :dev, :prod, etc

Provides a way for client application to name different integrant configs,
e.g. :test, :dev, :prod, etc
sourceraw docstring

initclj

(init config)
(init config init-keys)

Like integrant.core/init but allows config values specify how to provide an alternative implementation for a component. The alternative will be used instead of whatever would have gotten returned by ig/init-key. This makes it much easier to e.g. mock a component.

Like integrant.core/init but allows config values specify how to
provide an alternative implementation for a component. The
alternative will be used instead of whatever would have gotten
returned by `ig/init-key`. This makes it much easier to e.g. mock a
component.
sourceraw docstring

init-keyclj

(init-key k v)

Allows component configuration to specify alterative component implementations.

Allows component _configuration_ to specify alterative component
implementations.
sourceraw docstring

init-key-alternativecljmultimethod

source

readersclj

source

replacementclj

(replacement component)

Retuns a component config that's used to return the given component without initializing the replaced component.

Retuns a component config that's used to return the given component
without initializing the replaced component.
sourceraw docstring

replacement-typecljmultimethod

source

shrubbery-mockclj

(shrubbery-mock)
(shrubbery-mock opts)

Returns a component configuration that will use init-key-alternative's ::shrubbery-mock implementation. Does not replace the original component's config so that the mocked component can be initialized.

::mocked-component-opts defines additional config opts that should get passed to the mocked component. One use for this is to satisfy that component's config spec.

Returns a component configuration that will use
`init-key-alternative`'s `::shrubbery-mock` implementation. Does not
replace the original component's config so that the mocked
component can be initialized.

`::mocked-component-opts` defines additional config opts that should
get passed to the mocked component. One use for this is to satisfy
that component's config spec.
sourceraw docstring

systemclj

(system config-name)
(system config-name custom-config)
(system config-name custom-config init-keys)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close