Skip to content

Commit 10d339f

Browse files
committed
Simplify rails app generation especially Gemfile for test
1 parent a85d32e commit 10d339f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/support/application_generator.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,12 @@ def generate_files
5959
c.gsub!(/(gem '(byebug|web-console|sdoc|jbuilder)')/, "# \\1")
6060

6161
if @version.to_s < '5.2'
62-
c.gsub!(/(gem 'sqlite3')/, "# \\1")
62+
c.gsub!(/(gem 'sqlite3')/, "\\1, '< 1.4'")
6363
end
6464

6565
c
6666
end
6767

68-
if @version.to_s < '5.2'
69-
append_to_file(application.gemfile, "gem 'sqlite3', '< 1.4'")
70-
end
71-
7268
rewrite_file(application.path("config/environments/test.rb")) do |c|
7369
c.sub!(/config\.cache_classes\s*=\s*true/, "config.cache_classes = false")
7470
c

0 commit comments

Comments
 (0)