class GitDeploy::Generator

Public Class Methods

source_root() click to toggle source
# File lib/git_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/git_deploy/generator.rb, line 10
def copy_main_hook
  copy_hook 'after_push.sh', 'deploy/after_push'
end
copy_restart_callbacks() click to toggle source
# File lib/git_deploy/generator.rb, line 18
def copy_restart_callbacks
  copy_hook 'before_restart.rb', 'deploy/before_restart'
end
copy_restart_hook() click to toggle source
# File lib/git_deploy/generator.rb, line 14
def copy_restart_hook
  copy_hook 'restart.sh', 'deploy/restart'
end

Private Instance Methods

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