Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 0171c475f2dd374cf43c1a8a9200165208596483 1 parent 0235cdf
Sam Ruby authored April 10, 2013
12  railties/lib/rails/generators/app_base.rb
@@ -115,7 +115,11 @@ def set_default_accessors!
115 115
       end
116 116
 
117 117
       def database_gemfile_entry
118  
-        options[:skip_active_record] ? "" : "gem '#{gem_for_database}'"
  118
+        options[:skip_active_record] ? "" : 
  119
+          <<-GEMFILE.gsub(/^ {12}/, '').strip
  120
+            # Use #{options[:database]} as the database for ActiveRecord
  121
+            gem '#{gem_for_database}'
  122
+          GEMFILE
119 123
       end
120 124
 
121 125
       def include_all_railties?
@@ -185,7 +189,7 @@ def assets_gemfile_entry
185 189
             # Use SCSS for stylesheets
186 190
             gem 'sass-rails',   github: 'rails/sass-rails'
187 191
 
188  
-            # To use Uglifier as compressor for JavaScript assets
  192
+            # Use Uglifier as compressor for JavaScript assets
189 193
             gem 'uglifier', '~> 1.3'
190 194
           GEMFILE
191 195
         else
@@ -193,7 +197,7 @@ def assets_gemfile_entry
193 197
             # Use SCSS for stylesheets
194 198
             gem 'sass-rails',   '~> 4.0.0.beta1'
195 199
 
196  
-            # To use Uglifier as compressor for JavaScript assets
  200
+            # Use Uglifier as compressor for JavaScript assets
197 201
             gem 'uglifier', '~> 1.3'
198 202
           GEMFILE
199 203
         end
@@ -229,7 +233,7 @@ def javascript_gemfile_entry
229 233
           <<-GEMFILE.gsub(/^ {12}/, '').strip_heredoc
230 234
             #{coffee_gemfile_entry}
231 235
             #{javascript_runtime_gemfile_entry}
232  
-
  236
+            # Use #{options[:javascript]} as the JavaScript library
233 237
             gem '#{options[:javascript]}-rails'
234 238
 
235 239
             # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
6  railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -17,16 +17,16 @@ end
17 17
 # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
18 18
 gem 'jbuilder', '~> 1.0.1'
19 19
 
20  
-# To use ActiveModel has_secure_password
  20
+# Use ActiveModel has_secure_password
21 21
 # gem 'bcrypt-ruby', '~> 3.0.0'
22 22
 
23 23
 # Use unicorn as the app server
24 24
 # gem 'unicorn'
25 25
 
26  
-# Deploy with Capistrano
  26
+# Use Capistrano for deployment
27 27
 # gem 'capistrano', group: :development
28 28
 
29 29
 <% unless defined?(JRUBY_VERSION) -%>
30  
-# To use debugger
  30
+# Use debugger
31 31
 # gem 'debugger', group: [:development, :test]
32 32
 <% end -%>

0 notes on commit 0171c47

Please sign in to comment.
Something went wrong with that request. Please try again.