Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capistrano pending #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions butler-deploy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.8"
spec.add_development_dependency "rake", "~> 10.0"

spec.add_development_dependency "capistrano-pending"
end
19 changes: 17 additions & 2 deletions lib/generators/butler/deploy/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def add_gems
gem 'capistrano-chruby', '~> 0.1.1'
end

run 'bundle'
bundle_install
end

def capify
Expand Down Expand Up @@ -67,14 +67,29 @@ def add_unicorn_gem
gem 'unicorn-rails'
end

run 'bundle'
bundle_install
end

def copy_unicorn_config
template 'unicorn/production.rb', File.join('config', 'unicorn', 'production.rb')
template 'unicorn/staging.rb', File.join('config', 'unicorn', 'staging.rb')
end

def capistrano_pending
gem_group :development do
gem 'capistrano-pending', require: false
end

append_to_file 'Capfile', "require 'capistrano-pending'"

bundle_install
end

private

def bundle_install
run 'bundle'
end
end
end
end