class Egads::Stage

Public Instance Methods

bundle() click to toggle source
# File lib/egads/command/stage.rb, line 23
def bundle
  return unless should_stage?

  inside(dir) do
    run_with_code("bundle install #{RemoteConfig.bundler_options}", stream: true) if File.readable?("Gemfile")
  end
end
extract() click to toggle source
# File lib/egads/command/stage.rb, line 14
def extract
  invoke(Egads::Extract, [sha], options)
end
mark_as_staged() click to toggle source
# File lib/egads/command/stage.rb, line 55
def mark_as_staged
  FileUtils.touch(stage_flag_path)
end
run_after_stage_hooks() click to toggle source
# File lib/egads/command/stage.rb, line 50
def run_after_stage_hooks
  return unless should_stage?
  inside(dir) { run_hooks_for(:stage, :after) }
end
run_before_hooks() click to toggle source
# File lib/egads/command/stage.rb, line 18
def run_before_hooks
  return unless should_stage?
  inside(dir){ run_hooks_for(:stage, :before) }
end
setup_environment() click to toggle source
# File lib/egads/command/stage.rb, line 10
def setup_environment
  RemoteConfig.setup_environment
end

Protected Instance Methods

dir() click to toggle source
# File lib/egads/command/stage.rb, line 60
def dir
  RemoteConfig.release_dir(sha)
end
shared_path() click to toggle source
# File lib/egads/command/stage.rb, line 72
def shared_path
  ENV['SHARED_PATH']
end
should_stage?() click to toggle source
# File lib/egads/command/stage.rb, line 68
def should_stage?
  options[:force] || !File.exists?(stage_flag_path)
end
stage_flag_path() click to toggle source
# File lib/egads/command/stage.rb, line 64
def stage_flag_path
  File.join(dir, '.egads-stage-success')
end