Browse files

refactor Gemfile template

  • Loading branch information...
1 parent ba98ade commit 93857528fdb5eed93646931d3134fb4df051fee1 @tenderlove tenderlove committed Oct 27, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 railties/lib/rails/generators/rails/app/templates/Gemfile
View
14 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 -%>

0 comments on commit 9385752

Please sign in to comment.