Permalink
Browse files

We don't want to wrap sqlite3 in :development, :test twice.

  • Loading branch information...
1 parent db08246 commit c385b7ad1ccc7c75a28f6e91b254a6f39f9fbda8 @parndt parndt committed Mar 23, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 core/lib/generators/refinery/cms/cms_generator.rb
@@ -59,9 +59,11 @@ def append_asset_pipeline!
end
def append_gemfile!
- gsub_file 'Gemfile', %q{gem 'sqlite3'}, %q{group :development, :test do
+ if destination_path.join('Gemfile').file? &&
+ destination_path.join('Gemfile').read !~ %r{group :development, :test do\n.+?gem 'sqlite3'\nend}m
+ gsub_file 'Gemfile', %q{gem 'sqlite3'}, %q{group :development, :test do
gem 'sqlite3'
-end} if destination_path.join('Gemfile').file?
+end} end
end
def append_gitignore!

0 comments on commit c385b7a

Please sign in to comment.