diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-27 16:01:26 -0300 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-27 16:01:26 -0300 |
commit | 93857528fdb5eed93646931d3134fb4df051fee1 (patch) | |
tree | ee0638bfac09de09e226186810cc7d06dd0698e2 /railties | |
parent | ba98adef0851d744cd470251a750f3a03641d21e (diff) | |
download | rails-93857528fdb5eed93646931d3134fb4df051fee1.tar.gz rails-93857528fdb5eed93646931d3134fb4df051fee1.tar.bz2 rails-93857528fdb5eed93646931d3134fb4df051fee1.zip |
refactor Gemfile template
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 -%> |