diff options
author | Sam Ruby <rubys@intertwingly.net> | 2013-04-10 17:56:29 -0400 |
---|---|---|
committer | Sam Ruby <rubys@intertwingly.net> | 2013-04-10 19:33:42 -0400 |
commit | 0171c475f2dd374cf43c1a8a9200165208596483 (patch) | |
tree | b7e7837356b1650bff20e0956fd788a82662e542 /railties/lib/rails | |
parent | 0235cdf5ce0e92b88d49b8e135e696a89b76d097 (diff) | |
download | rails-0171c475f2dd374cf43c1a8a9200165208596483.tar.gz rails-0171c475f2dd374cf43c1a8a9200165208596483.tar.bz2 rails-0171c475f2dd374cf43c1a8a9200165208596483.zip |
Editorial pass over generated Gemfile
* When run with default options, no repeated blank lines
* Every gem has a comment, perhaps a generic one, but a comment nonetheless
* Most comments used to start with "Use", some with "To use" => made consistent
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 12 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index b53142d20c..b62d1fff14 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -115,7 +115,11 @@ module Rails end def database_gemfile_entry - options[:skip_active_record] ? "" : "gem '#{gem_for_database}'" + options[:skip_active_record] ? "" : + <<-GEMFILE.gsub(/^ {12}/, '').strip + # Use #{options[:database]} as the database for ActiveRecord + gem '#{gem_for_database}' + GEMFILE end def include_all_railties? @@ -185,7 +189,7 @@ module Rails # Use SCSS for stylesheets gem 'sass-rails', github: 'rails/sass-rails' - # To use Uglifier as compressor for JavaScript assets + # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '~> 1.3' GEMFILE else @@ -193,7 +197,7 @@ module Rails # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0.beta1' - # To use Uglifier as compressor for JavaScript assets + # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '~> 1.3' GEMFILE end @@ -229,7 +233,7 @@ module Rails <<-GEMFILE.gsub(/^ {12}/, '').strip_heredoc #{coffee_gemfile_entry} #{javascript_runtime_gemfile_entry} - + # Use #{options[:javascript]} as the JavaScript library gem '#{options[:javascript]}-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 07cf31dd83..1842e09bae 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -17,16 +17,16 @@ end # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.0.1' -# To use ActiveModel has_secure_password +# Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the app server # gem 'unicorn' -# Deploy with Capistrano +# Use Capistrano for deployment # gem 'capistrano', group: :development <% unless defined?(JRUBY_VERSION) -%> -# To use debugger +# Use debugger # gem 'debugger', group: [:development, :test] <% end -%> |