diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 589066cc12..42d62c6d93 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -6,14 +6,12 @@ source 'https://rubygems.org' # <%= gem.comment %> <% end -%> -<% if gem.version -%> -gem '<%= gem.name %>',<%= gem.padding(max_width) %>'<%= gem.version %>' -<% elsif gem.path -%> -gem '<%= gem.name %>',<%= gem.padding(max_width) %>path: '<%= gem.path %>' -<% elsif gem.github -%> -gem '<%= gem.name %>',<%= gem.padding(max_width) %>github: '<%= gem.github %>' -<% else -%> -gem '<%= gem.name %>' +gem '<%= gem.name %>'<% if gem.version -%> +, '<%= gem.version %>' +<% elsif gem.options.any? -%> +,<%= gem.padding(max_width) %><%= gem.options.map { |k,v| + "#{k}: '#{v}'" }.join(', ') %> +<% else %> <% end -%> <% end -%> |