diff options
Diffstat (limited to 'railties')
-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 -%> |