diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-07 16:10:14 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-07 16:10:14 -0700 |
commit | cc1de71bfaced172fe00a66fd381da69d9528e8b (patch) | |
tree | dc1d28d7ab43c7b2e972c9a439c8f5c62c80e8ae /railties/lib/rails/generators | |
parent | b89c5a043e81298527f369fdb5fc83eb1f290dfe (diff) | |
download | rails-cc1de71bfaced172fe00a66fd381da69d9528e8b.tar.gz rails-cc1de71bfaced172fe00a66fd381da69d9528e8b.tar.bz2 rails-cc1de71bfaced172fe00a66fd381da69d9528e8b.zip |
Stop using padding in the generated Gemfile -- it looks shit
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 3 |
2 files changed, 1 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 7f5a916c5d..c0fcf7d3b4 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -195,10 +195,6 @@ module Rails def self.path(name, path, comment = nil) new(name, nil, comment, path: path) end - - def padding(max_width) - ' ' * (max_width - name.length + 2) - end end def rails_gemfile_entry diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 5bdbd58097..826fb86058 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -1,6 +1,5 @@ source 'https://rubygems.org' -<% max_width = gemfile_entries.map { |g| g.name.length }.max -%> <% gemfile_entries.each do |gem| -%> <% if gem.comment -%> @@ -8,7 +7,7 @@ source 'https://rubygems.org' <% end -%> <%= gem.commented_out ? '# ' : '' %>gem '<%= gem.name %>'<%= %(, '#{gem.version}') if gem.version -%> <% if gem.options.any? -%> -,<%= gem.padding(max_width) %><%= gem.options.map { |k,v| +, <%= gem.options.map { |k,v| "#{k}: #{v.inspect}" }.join(', ') %> <% end -%> <% end -%> |