class BricksDeploy::Generator

Public Class Methods

source_root() click to toggle source
# File lib/bricks_deploy/generator.rb, line 6
def self.source_root
  File.expand_path('../templates', __FILE__)
end

Public Instance Methods

copy_main_hook() click to toggle source
# File lib/bricks_deploy/generator.rb, line 10
def copy_main_hook
  copy_hook 'after_push.sh', 'bin/deploy/remote/after_push'
end
copy_restart_callbacks() click to toggle source
# File lib/bricks_deploy/generator.rb, line 18
def copy_restart_callbacks
  copy_hook 'before_restart.sh', 'bin/deploy/remote/before_restart'
  copy_hook 'after_restart.sh', 'bin/deploy/remote/after_restart'
  copy_hook 'setup.sh', 'bin/deploy/remote/setup'
  copy_hook 'rollback.sh', 'bin/deploy/remote/rollback'
end
copy_restart_hook() click to toggle source
# File lib/bricks_deploy/generator.rb, line 14
def copy_restart_hook
  copy_hook 'restart.sh', 'bin/deploy/remote/restart'
end

Private Instance Methods

copy_hook(template, destination) click to toggle source
# File lib/bricks_deploy/generator.rb, line 27
def copy_hook(template, destination)
  copy_file template, destination
  chmod destination, 0744 unless File.executable? destination
end