Permalink
Browse files

add the database gem

  • Loading branch information...
1 parent f77e211 commit 469eafa70f2c293d462e2880fbf52203d5145708 @tenderlove tenderlove committed Oct 27, 2013
@@ -121,11 +121,9 @@ def set_default_accessors!
end
def database_gemfile_entry
- options[:skip_active_record] ? "" :
- <<-GEMFILE.strip_heredoc
- # Use #{options[:database]} as the database for Active Record
- gem '#{gem_for_database}'
- GEMFILE
+ return [] if options[:skip_active_record]
+ gem = GemfileGem.new gem_for_database, "Use #{options[:database]} as the database for Active Record"
+ return [gem]
end
def include_all_railties?
@@ -163,7 +163,7 @@ def initialize(*args)
end
def gemfile_gems
- rails_gemfile_entry
+ rails_gemfile_entry + database_gemfile_entry
end
public_task :set_default_accessors!
@@ -2,7 +2,10 @@ source 'https://rubygems.org'
<% max_width = gemfile_gems.map { |g| g.name.length }.max -%>
<% gemfile_gems.each do |gem| -%>
-<%= gem.comment -%>
+<% if gem.comment -%>
+
+# <%= gem.comment %>
+<% end -%>
<% if gem.version -%>
gem '<%= gem.name %>',<%= gem.padding(max_width) %>'<%= gem.version %>'
<% elsif gem.path -%>
@@ -14,8 +17,6 @@ gem '<%= gem.name %>'
<% end -%>
<% end -%>
-<%= database_gemfile_entry -%>
-
<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry -%>

0 comments on commit 469eafa

Please sign in to comment.