Module: Bluepill

Defined in:
lib/bluepill/dsl.rb,
lib/bluepill/group.rb,
lib/bluepill/logger.rb,
lib/bluepill/socket.rb,
lib/bluepill/system.rb,
lib/bluepill/process.rb,
lib/bluepill/trigger.rb,
lib/bluepill/version.rb,
lib/bluepill/controller.rb,
lib/bluepill/application.rb,
lib/bluepill/dsl/app_proxy.rb,
lib/bluepill/condition_watch.rb,
lib/bluepill/dsl/process_proxy.rb,
lib/bluepill/triggers/flapping.rb,
lib/bluepill/application/client.rb,
lib/bluepill/application/server.rb,
lib/bluepill/process_conditions.rb,
lib/bluepill/process_statistics.rb,
lib/bluepill/dsl/process_factory.rb,
lib/bluepill/util/rotational_array.rb,
lib/bluepill/process_conditions/http.rb,
lib/bluepill/process_conditions/cpu_usage.rb,
lib/bluepill/process_conditions/mem_usage.rb,
lib/bluepill/process_conditions/always_true.rb,
lib/bluepill/process_conditions/process_condition.rb

Defined Under Namespace

Modules: Application, ProcessConditions, Socket, System, Triggers, Util Classes: AppProxy, ConditionWatch, Controller, Group, HistoryValue, Logger, Process, ProcessFactory, ProcessProxy, ProcessStatistics, Trigger

Constant Summary collapse

VERSION =
"0.0.60.1".freeze

Class Method Summary collapse

Class Method Details

.application(app_name, options = {}, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/bluepill/dsl.rb', line 3

def self.application(app_name, options = {}, &block)
  app_proxy = AppProxy.new(app_name, options)
  if block.arity == 0
    app_proxy.instance_eval &block
  else
    app_proxy.instance_exec(app_proxy, &block)
  end
  app_proxy.app.load
end