Skip to content

Commit

Permalink
We don't want to wrap sqlite3 in :development, :test twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Mar 23, 2012
1 parent db08246 commit c385b7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/lib/generators/refinery/cms/cms_generator.rb
Expand Up @@ -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!
Expand Down

0 comments on commit c385b7a

Please sign in to comment.