Sha256: 452916a1e1bf5f421e38dbc8f4627055f538825b104273ab6e2d1da1bacd8dcf
Contents?: true
Size: 1.98 KB
Versions: 26
Compression:
Stored size: 1.98 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' copy_with_symlink = <<-EOS require 'capistrano/recipes/deploy/strategy/copy' set :deploy_via, :copy set :copy_compression, :zip # monkey patch so that zip includes symlinked contents for vendored rubber for testing module ::Capistrano module Deploy module Strategy class Copy < Base # The compression method to use, defaults to :gzip. def compression Compression.new("zip", %w(zip -qr), %w(unzip -q)) end end end end end EOS gsub_file 'config/deploy.rb', /set :deploy_via, :copy/, copy_with_symlink 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
26 entries across 26 versions & 1 rubygems