File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def gem_for_database(database = options[:database])
30
30
def docker_for_database_build ( database = options [ :database ] )
31
31
case database
32
32
when "mysql" then "build-essential default-libmysqlclient-dev git"
33
- when "trilogy" then "build-essential default-libmysqlclient-dev git"
33
+ when "trilogy" then "build-essential git"
34
34
when "postgresql" then "build-essential git libpq-dev"
35
35
when "sqlite3" then "build-essential git"
36
36
else nil
@@ -40,7 +40,7 @@ def docker_for_database_build(database = options[:database])
40
40
def docker_for_database_deploy ( database = options [ :database ] )
41
41
case database
42
42
when "mysql" then "curl default-mysql-client libvips"
43
- when "trilogy" then "curl default-mysql-client libvips"
43
+ when "trilogy" then "curl libvips"
44
44
when "postgresql" then "curl libvips postgresql-client"
45
45
when "sqlite3" then "curl libsqlite3-0 libvips"
46
46
else nil
Original file line number Diff line number Diff line change @@ -90,6 +90,26 @@ class ChangeGeneratorTest < Rails::Generators::TestCase
90
90
end
91
91
end
92
92
93
+ test "change to trilogy" do
94
+ run_generator [ "--to" , "trilogy" ]
95
+
96
+ assert_file ( "config/database.yml" ) do |content |
97
+ assert_match "adapter: trilogy" , content
98
+ assert_match "database: tmp_production" , content
99
+ end
100
+
101
+ assert_file ( "Gemfile" ) do |content |
102
+ assert_match "# Use trilogy as the database for Active Record" , content
103
+ assert_match 'gem "trilogy", "~> 2.4"' , content
104
+ end
105
+
106
+ assert_file ( "Dockerfile" ) do |content |
107
+ assert_match "build-essential git" , content
108
+ assert_match "curl libvips" , content
109
+ assert_no_match "default-libmysqlclient-dev" , content
110
+ end
111
+ end
112
+
93
113
test "change from versioned gem to other versioned gem" do
94
114
run_generator [ "--to" , "sqlite3" ]
95
115
run_generator [ "--to" , "mysql" , "--force" ]
You can’t perform that action at this time.
0 commit comments