Module: Takeoff

Extended by:
Takeoff
Included in:
Takeoff
Defined in:
lib/takeoff.rb,
lib/takeoff/cli.rb,
lib/takeoff/helpers.rb,
lib/takeoff/version.rb,
lib/takeoff/plan/base.rb,
lib/takeoff/stage/log.rb,
lib/takeoff/stage/base.rb,
lib/takeoff/plan/heroku.rb,
lib/takeoff/plan/default.rb,
lib/takeoff/configuration.rb,
lib/takeoff/stage/stash_changes.rb,
lib/takeoff/stage/push_to_github.rb,
lib/takeoff/ext/middleware_builder.rb,
lib/takeoff/stage/look_out_for_danger.rb,
lib/takeoff/stage/heroku/push_to_server.rb,
lib/takeoff/stage/heroku/disable_preboot.rb,
lib/takeoff/stage/heroku/migrate_database.rb,
lib/takeoff/stage/heroku/remember_commits.rb,
lib/takeoff/stage/verify_circle_ci_status.rb,
lib/takeoff/stage/verify_github_up_to_date.rb,
lib/takeoff/stage/heroku/scale_down_workers.rb,
lib/takeoff/stage/checkout_development_branch.rb,
lib/takeoff/stage/heroku/enable_maintenance_mode.rb,
lib/takeoff/stage/point_checkpoint_to_development.rb,
lib/takeoff/stage/heroku/verify_staging_up_to_date.rb,
lib/takeoff/stage/heroku/precompile_and_sync_assets.rb,
lib/takeoff/stage/heroku/verify_server_not_already_up_to_date.rb

Defined Under Namespace

Modules: Ext, Helpers, Plan, Stage Classes: CLI, Configuration

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.configurationObject



11
12
13
# File 'lib/takeoff.rb', line 11

def configuration
  @configuration ||= Configuration.new
end

.configure(source = nil, source_location = nil, &block) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/takeoff.rb', line 15

def configure(source = nil, source_location = nil, &block)
  if source
    if source_location
      configuration.instance_eval(source, source_location) 
    else
      configuration.instance_eval(source) 
    end
  end

  if block
    if block.arity == 1
      block.call(configuration)
    else
      configuration.instance_eval(&block)
    end
  end
end

.loggerObject



35
36
37
# File 'lib/takeoff.rb', line 35

def logger
  @logger ||= Logger.new
end