Module: Spore

Defined in:
lib/spore.rb,
lib/spore/rails.rb,
lib/spore/config.rb,
lib/spore/config.rb,
lib/spore/config.rb,
lib/spore/parser.rb,
lib/spore/version.rb,
lib/spore/environment.rb

Overview

The top level Spore module. The entrypoint for the application logic.

Defined Under Namespace

Classes: Config, DeploymentConfig, Environment, LocalConfig, Parser, Railtie, Version

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.instrumenterObject

Returns the value of attribute instrumenter.



8
9
10
# File 'lib/spore.rb', line 8

def instrumenter
  @instrumenter
end

Class Method Details

.instrument(name, payload = {}, &block) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/spore.rb', line 24

def instrument(name, payload = {}, &block)
  if instrumenter
    instrumenter.instrument(name, payload, &block)
  else
    block.call
  end
end

.load(*filenames) ⇒ Object



13
14
15
16
# File 'lib/spore.rb', line 13

def load(*filenames)
  env = Environment.new
  instrument("spore.load", :env => env) { env.apply }
end

.overload(*filenames) ⇒ Object

same as ‘load`, but will override existing values in `ENV`



19
20
21
22
# File 'lib/spore.rb', line 19

def overload(*filenames)
  env = Environment.new
  instrument("spore.overload", :env => env) { env.apply! }
end