Introduces some conveniences for dealing with duct systems:
config
for naming integrant configs, like :dev
,
:test
, etc.ig/init-key
alternative that allows a component's configuration
to specify an alternative component implementation, possibly bypassing
the ig/init-key
implementation entirelyreplacement
and shrubbery-mock
alternativesIntroduces 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
(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.
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
(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.
(init-key k v)
Allows component configuration to specify alterative component implementations.
Allows component _configuration_ to specify alterative component implementations.
(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.
(shrubbery-mock)
(shrubbery-mock {:keys [:sweet-tooth.endpoint.system/mocked-component-opts]
:as 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.
(system config-name)
(system config-name custom-config)
(system config-name custom-config init-keys)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close