Last active
December 19, 2015 18:29
-
-
Save Sergey-B/5999118 to your computer and use it in GitHub Desktop.
Revisions
-
Sergey-B revised this gist
Jul 19, 2013 . 1 changed file with 23 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,12 @@ # Rails template appication file for gem 'deployconfig' https://github.com/Sergey-B/deployconfig-generator #USAGE #rails new app_name -m template.rb #Application name from command-line arguments 'rails new application_name' application_name = ARGV[0] #Gemfile gem 'deployconfig', '0.0.1', :git => 'sh://git@git.snpdev.ru:42204/deployconfig.git' gem 'capistrano' gem 'capistrano-ext' gem_group :assets do @@ -10,19 +15,31 @@ run 'bundle install' #create config/deploy.rb file 'config/deploy.rb', <<-CODE require 'deploy_config' require 'capistrano/ext/multistage' set :application, "#{application_name}" set :use_sudo, false default_run_options[:pty] = true CODE #write to Capfile "load 'deploy/assets'" file 'Capfile',<<-CODE load 'deploy' # Uncomment if you are using Rails' asset pipeline load 'deploy/assets' load 'config/deploy' # remove this line to skip loading any of the default tasks CODE run 'capify .' #create config/deploy/testing.rb and config/deploy/production.rb run 'rails g deploy' #create unicorn.rb in config/deploy/ run 'rails g unicorn' #install gem from git, because bundler not install it from Gemfile run 'cd .. && git clone sh://git@git.snpdev.ru:42204/deployconfig.git && cd deployconfig-generator && rake install && cd - && cd -' run 'gem sources -a http://gems.github.com' -
Sergey-B created this gist
Jul 15, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ # template1.rb application_name = ask("Please enter your application name:") gem 'deployconfig', '0.0.1', :path => '/home/sergey/documents/Projects/Rails/deployconfig'#:git => 'git@github.com:Sergey-B/deployconfig-generator.git'# gem 'capistrano' gem 'capistrano-ext' gem_group :assets do gem 'therubyracer', :platforms => :ruby end run 'bundle install' file 'config/deploy.rb', <<-CODE require '/home/sergey/documents/Projects/Rails/deployconfig/lib/deployconfig' require 'capistrano/ext/multistage' set :application, "#{application_name}" CODE file 'Capfile',<<-CODE load 'deploy' # Uncomment if you are using Rails' asset pipeline load 'deploy/assets' load 'config/deploy' # remove this line to skip loading any of the default tasks CODE # run 'capify .' run 'rails g deploy' run 'rails g unicorn'