Module: Ops

Defined in:
lib/ops.rb,
lib/ops/config.rb,
lib/ops/server.rb,
lib/ops/version.rb,
lib/ops/revision.rb,
lib/ops/heartbeat.rb,
lib/ops/server/helpers.rb

Defined Under Namespace

Modules: Helpers Classes: Config, Heartbeat, Revision, Server

Constant Summary collapse

VERSION =
'1.2.2'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



36
37
38
# File 'lib/ops/config.rb', line 36

def config
  @config
end

Class Method Details

.add_heartbeat(name, &block) ⇒ Object



34
35
36
# File 'lib/ops/heartbeat.rb', line 34

def add_heartbeat(name, &block)
  Heartbeat.add name, &block
end

.newObject



9
10
11
# File 'lib/ops.rb', line 9

def new
  Server.new
end

.rack_app(path) ⇒ Object



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

def rack_app(path)
  Rack::Builder.new do
    map(path) { run Ops.new }
  end.to_app
end

.setup {|config| ... } ⇒ Object

Yields:



38
39
40
41
# File 'lib/ops/config.rb', line 38

def setup
  self.config ||= Config.new
  yield config
end