diff options
author | Xavier Noria <fxn@hashref.com> | 2011-03-28 01:42:30 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-03-28 01:44:48 +0200 |
commit | e6a8a3adaf08cc9d551b4a125aaa276812984be3 (patch) | |
tree | 9c1a8a6768fef366637cb13c4b11b9cd48e6e22c /railties/lib/rails/generators | |
parent | b023bcf71b685c0088b2b1f79bc52e8797ce3538 (diff) | |
download | rails-e6a8a3adaf08cc9d551b4a125aaa276812984be3.tar.gz rails-e6a8a3adaf08cc9d551b4a125aaa276812984be3.tar.bz2 rails-e6a8a3adaf08cc9d551b4a125aaa276812984be3.zip |
let these heredocs flow with the code
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 7c9494e46d..a2eaf7a6fb 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -1,5 +1,6 @@ require 'digest/md5' require 'active_support/secure_random' +require 'active_support/core_ext/string/strip' require 'rails/version' unless defined?(Rails::VERSION) require 'rbconfig' require 'open-uri' @@ -125,25 +126,25 @@ module Rails def rails_gemfile_entry if options.dev? - <<-GEMFILE -gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}' -gem 'arel', :git => 'git://github.com/rails/arel.git' -gem 'rack', :git => 'git://github.com/rack/rack.git' + <<-GEMFILE.strip_heredoc + gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}' + gem 'arel', :git => 'git://github.com/rails/arel.git' + gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE elsif options.edge? - <<-GEMFILE -gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'arel', :git => 'git://github.com/rails/arel.git' -gem 'rack', :git => 'git://github.com/rack/rack.git' + <<-GEMFILE.strip_heredoc + gem 'rails', :git => 'git://github.com/rails/rails.git' + gem 'arel', :git => 'git://github.com/rails/arel.git' + gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE else - <<-GEMFILE -gem 'rails', '#{Rails::VERSION::STRING}' + <<-GEMFILE.strip_heredoc + gem 'rails', '#{Rails::VERSION::STRING}' -# Bundle edge Rails instead: -# gem 'rails', :git => 'git://github.com/rails/rails.git' -# gem 'arel', :git => 'git://github.com/rails/arel.git' -# gem 'rack', :git => 'git://github.com/rack/rack.git' + # Bundle edge Rails instead: + # gem 'rails', :git => 'git://github.com/rails/rails.git' + # gem 'arel', :git => 'git://github.com/rails/arel.git' + # gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE end end |