Module: Stimpack
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/stimpack/stim.rb,
lib/stimpack.rb,
lib/stimpack/railtie.rb,
lib/stimpack/version.rb,
lib/stimpack/integrations.rb,
lib/stimpack/integrations/rails.rb,
lib/stimpack/integrations/rspec.rb,
lib/stimpack/integrations/factory_bot.rb
Overview
typed: true
Defined Under Namespace
Modules: Integrations Classes: Error, Railtie, Stim
Constant Summary collapse
- VERSION =
"0.8.3".freeze
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
-
.configure_packs ⇒ Object
This is temporary.
- .root ⇒ Object
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
16 17 18 |
# File 'lib/stimpack.rb', line 16 def config @config end |
Class Method Details
.configure_packs ⇒ Object
This is temporary. For now, we allow Stimpack roots to be configured via Stimpack.config.root Later, if clients configure packs directly, we can deprecate the Stimpack setting and remove this function and its invocations.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/stimpack.rb', line 27 def configure_packs Packs.configure do |config| roots = Array(Stimpack.config.root) pack_paths = roots.flat_map do |root| # Support nested packs by default. Later, this can be pushed to a client configuration. ["#{root}/*", "#{root}/*/*"] end config.pack_paths = pack_paths end end |
.root ⇒ Object
18 19 20 |
# File 'lib/stimpack.rb', line 18 def root @root ||= Rails::Application.find_root(Dir.pwd) end |