Sha256: 9539e219525dc6242d79a6f64de0514b315d693daa02682e7fe36bdbc0b608bc

Contents?: true

Size: 1.53 KB

Versions: 13

Compression:

Stored size: 1.53 KB

Contents

# rm -rf rubbertest; rails new rubbertest -d postgresql -m rubber/test/test-rails-template.rb
# RUBBER_ENV=production bundle exec cap rubber:create_staging

run "mkdir -p vendor/gems"
run "ln -sf `pwd`/../rubber vendor/gems/rubber"

default_template = "complete_passenger_postgresql"
templates = ask("Which rubber templates [#{default_template}] ?")
templates = default_template if templates.blank?

run "ruby -I vendor/gems/rubber/lib vendor/gems/rubber/bin/rubber vulcanize #{templates}"

gsub_file 'Gemfile', /gem ["']rubber["'].*/, "gem 'rubber', :path => 'vendor/gems/rubber'"
gem 'therubyracer', :group => :assets

run "bundle install"
generate(:scaffold, "post", "title:string", "body:text")

gsub_file 'config/environment.rb', /^RAILS_GEM_VERSION/, '# RAILS_GEM_VERSION'
gsub_file 'config/deploy.rb', /set :deploy_via, :copy/, "set :deploy_via, :copy\nset :copy_compression, :zip"
gsub_file 'config/rubber/rubber.yml', /packages: \[/, "packages: [zip, "

# gsub_file 'config/rubber/rubber.yml', /rubber, /, ''
gsub_file 'config/rubber/rubber.yml', /, \[rubber, [^\]]*\]/, ''
gsub_file 'config/rubber/rubber.yml', /,db:primary=true/, ',db:primary=true,web_tools'
gsub_file 'config/rubber/rubber.yml', /image_type: m1.small/, 'image_type: c1.medium'

default_secret = "~/rubber-secret.yml"
secret = ask("Which rubber secret file [#{default_secret}] ?")
secret = default_secret if secret.blank?
run "cp -f #{secret} config/rubber/rubber-secret.yml"
chmod 'config/rubber/rubber-secret.yml', 0644
gsub_file 'config/rubber/rubber-secret.yml', /dns_provider: .*/, ''

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rubber-2.0.0 test/test-rails-template.rb
rubber-2.0.0.pre12 test/test-rails-template.rb
rubber-2.0.0.pre11 test/test-rails-template.rb
rubber-2.0.0.pre10 test/test-rails-template.rb
rubber-2.0.0.pre9 test/test-rails-template.rb
rubber-2.0.0.pre8 test/test-rails-template.rb
rubber-2.0.0.pre7 test/test-rails-template.rb
rubber-2.0.0.pre6 test/test-rails-template.rb
rubber-2.0.0.pre5 test/test-rails-template.rb
rubber-2.0.0.pre4 test/test-rails-template.rb
rubber-2.0.0.pre3 test/test-rails-template.rb
rubber-2.0.0.pre2 test/test-rails-template.rb
rubber-2.0.0.pre1 test/test-rails-template.rb