ridgepole 0.8.7 → 0.8.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +63 -0
  3. data/.rubocop.yml +11 -2
  4. data/README.md +14 -2
  5. data/lib/ridgepole/delta.rb +28 -21
  6. data/lib/ridgepole/diff.rb +12 -0
  7. data/lib/ridgepole/dsl_parser.rb +3 -4
  8. data/lib/ridgepole/dsl_parser/context.rb +2 -3
  9. data/lib/ridgepole/dsl_parser/table_definition.rb +7 -0
  10. data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +1 -1
  11. data/lib/ridgepole/external_sql_executer.rb +1 -1
  12. data/lib/ridgepole/version.rb +1 -1
  13. data/ridgepole.gemspec +1 -1
  14. data/spec/erb_helper.rb +4 -4
  15. data/spec/mysql/collation/collation_spec.rb +6 -0
  16. data/spec/mysql/diff/diff2_spec.rb +3 -3
  17. data/spec/mysql/diff/diff_spec.rb +3 -3
  18. data/spec/mysql/fk/migrate_create_fk_spec.rb +79 -10
  19. data/spec/mysql/fk/migrate_drop_fk_spec.rb +1 -1
  20. data/spec/mysql/fk/migrate_fk_with_column_spec.rb +2 -2
  21. data/spec/mysql/migrate/migrate_add_column_spec.rb +5 -5
  22. data/spec/mysql/migrate/migrate_change_column3_spec.rb +109 -18
  23. data/spec/mysql/migrate/migrate_change_column_spec.rb +5 -5
  24. data/spec/mysql/migrate/migrate_change_index_spec.rb +9 -9
  25. data/spec/mysql/migrate/migrate_create_index_spec.rb +6 -6
  26. data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +7 -7
  27. data/spec/mysql/migrate/migrate_create_table_with_options_spec.rb +8 -8
  28. data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +4 -4
  29. data/spec/mysql/migrate/migrate_drop_column_spec.rb +3 -3
  30. data/spec/mysql/migrate/migrate_drop_index_spec.rb +6 -6
  31. data/spec/mysql/migrate/migrate_rename_column_spec.rb +3 -3
  32. data/spec/mysql/migrate/migrate_script_error_spec.rb +1 -1
  33. data/spec/mysql/text_blob_types/text_blob_types_spec.rb +4 -1
  34. data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +1 -1
  35. data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +1 -1
  36. data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +7 -7
  37. data/spec/postgresql/diff/diff_spec.rb +2 -2
  38. data/spec/postgresql/fk/migrate_create_fk_spec.rb +2 -2
  39. data/spec/postgresql/fk/migrate_drop_fk_spec.rb +1 -1
  40. data/spec/postgresql/migrate/migrate_add_column_spec.rb +5 -5
  41. data/spec/postgresql/migrate/migrate_change_column_spec.rb +4 -4
  42. data/spec/postgresql/migrate/migrate_change_index_spec.rb +9 -9
  43. data/spec/postgresql/migrate/migrate_drop_column_spec.rb +3 -3
  44. data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +5 -5
  45. data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +1 -1
  46. data/spec/postgresql/migrate/migrate_drop_index_spec.rb +6 -6
  47. data/spec/postgresql/migrate/migrate_rename_column_spec.rb +2 -2
  48. data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +1 -1
  49. data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +1 -1
  50. data/spec/spec_condition.rb +4 -4
  51. data/spec/spec_helper.rb +2 -1
  52. metadata +7 -7
  53. data/.travis.yml +0 -44
@@ -80,7 +80,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
80
80
  expect(subject.dump).to match_ruby actual_dsl
81
81
 
82
82
  errmsg = Regexp.new(Regexp.escape(<<-MSG.strip))
83
- 33: add_index("employee_clubs", ["emp_no", "Xclub_id"], {:name=>"idx_emp_no_club_id", :using=>:btree})
83
+ 33: add_index("employee_clubs", ["emp_no", "Xclub_id"], **{:name=>"idx_emp_no_club_id", :using=>:btree})
84
84
  MSG
85
85
 
86
86
  expect do
@@ -5,7 +5,7 @@ describe 'Ridgepole::Client (with new text/blob types)' do
5
5
  subject { client }
6
6
 
7
7
  it do
8
- delta = subject.diff(<<-RUBY)
8
+ table_def = <<-RUBY
9
9
  create_table :foos, id: :unsigned_integer do |t|
10
10
  t.blob :blob
11
11
  t.tinyblob :tiny_blob
@@ -20,6 +20,7 @@ describe 'Ridgepole::Client (with new text/blob types)' do
20
20
  t.unsigned_integer :unsigned_integer
21
21
  end
22
22
  RUBY
23
+ delta = subject.diff(table_def)
23
24
 
24
25
  expect(delta.differ?).to be_truthy
25
26
  delta.migrate
@@ -39,6 +40,8 @@ describe 'Ridgepole::Client (with new text/blob types)' do
39
40
  t.integer "unsigned_integer", unsigned: true
40
41
  end
41
42
  ERB
43
+
44
+ expect(subject.diff(table_def).differ?).to be_falsey
42
45
  end
43
46
  end
44
47
 
@@ -36,7 +36,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
36
36
  expect(delta.differ?).to be_truthy
37
37
  expect(subject.dump).to match_ruby actual_dsl
38
38
  expect(delta.script).to match_fuzzy <<-RUBY
39
- add_foreign_key("child", "parent", {:name=>"fk_rails_e74ce85cbc"})
39
+ add_foreign_key("child", "parent", **{:name=>"fk_rails_e74ce85cbc"})
40
40
  RUBY
41
41
  delta.migrate
42
42
  expect(subject.dump).to match_ruby expected_dsl
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  expect(delta.differ?).to be_truthy
51
51
  expect(subject.dump).to match_fuzzy sorted_actual_dsl
52
52
  expect(delta.script).to match_fuzzy <<-RUBY
53
- remove_foreign_key("child", {:name=>"fk_rails_e74ce85cbc"})
53
+ remove_foreign_key("child", name: "fk_rails_e74ce85cbc")
54
54
  RUBY
55
55
  delta.migrate
56
56
  expect(subject.dump).to match_ruby expected_dsl
@@ -25,13 +25,13 @@ describe 'Ridgepole::Client#diff -> migrate (with index)', condition: '>= 5.1.0'
25
25
  expect(delta.differ?).to be_truthy
26
26
 
27
27
  expect(delta.script).to match_fuzzy erbh(<<-ERB)
28
- create_table("dept_emp", {:primary_key=>["emp_no", "dept_no"]}) do |t|
29
- t.column("emp_no", :"integer", {:null=>false, :limit=>4})
30
- t.column("dept_no", :"integer", {:null=>false, :auto_increment=>true, :limit=>4})
31
- t.column("from_date", :"date", {:null=>false})
32
- t.column("to_date", :"date", {:null=>false})
33
- t.index(["dept_no"], <%= {:name=>"dept_no"} + cond(5.0, using: :btree) %>)
34
- t.index(["emp_no"], <%= {:name=>"emp_no"} + cond(5.0, using: :btree) %>)
28
+ create_table("dept_emp", **{:primary_key=>["emp_no", "dept_no"]}) do |t|
29
+ t.column("emp_no", :"integer", **{:null=>false, :limit=>4})
30
+ t.column("dept_no", :"integer", **{:null=>false, :auto_increment=>true, :limit=>4})
31
+ t.column("from_date", :"date", **{:null=>false})
32
+ t.column("to_date", :"date", **{:null=>false})
33
+ t.index(["dept_no"], **<%= {:name=>"dept_no"} + cond(5.0, using: :btree) %>)
34
+ t.index(["emp_no"], **<%= {:name=>"emp_no"} + cond(5.0, using: :btree) %>)
35
35
  end
36
36
  ERB
37
37
 
@@ -148,9 +148,9 @@ describe 'Ridgepole::Client.diff' do
148
148
  delta = subject.diff(actual_dsl, expected_dsl)
149
149
  expect(delta.differ?).to be_truthy
150
150
  expect(delta.script).to match_fuzzy <<-RUBY
151
- change_column("employee_clubs", "club_id", :integer, {:null=>true, :default=>nil})
151
+ change_column("employee_clubs", "club_id", :integer, **{:null=>true, :default=>nil})
152
152
 
153
- change_column("employees", "last_name", :string, {:limit=>20, :default=>"XXX"})
153
+ change_column("employees", "last_name", :string, **{:limit=>20, :default=>"XXX"})
154
154
  RUBY
155
155
  }
156
156
  end
@@ -36,7 +36,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
36
36
  expect(delta.differ?).to be_truthy
37
37
  expect(subject.dump).to match_ruby actual_dsl
38
38
  expect(delta.script).to match_fuzzy <<-RUBY
39
- add_foreign_key("child", "parent", {:name=>"child_ibfk_1"})
39
+ add_foreign_key("child", "parent", **{:name=>"child_ibfk_1"})
40
40
  RUBY
41
41
  delta.migrate
42
42
  expect(subject.dump).to match_ruby expected_dsl
@@ -147,7 +147,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
147
147
  expect(delta.differ?).to be_truthy
148
148
  expect(subject.dump).to match_ruby actual_dsl
149
149
  expect(delta.script).to match_fuzzy <<-RUBY
150
- add_foreign_key("child", "parent", {})
150
+ add_foreign_key("child", "parent", **{})
151
151
  RUBY
152
152
  delta.migrate
153
153
  expect(subject.dump).to match_ruby expected_dsl
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  expect(delta.differ?).to be_truthy
51
51
  expect(subject.dump).to match_fuzzy sorted_actual_dsl
52
52
  expect(delta.script).to match_fuzzy <<-RUBY
53
- remove_foreign_key("child", {:name=>"child_ibfk_1"})
53
+ remove_foreign_key("child", name: "child_ibfk_1")
54
54
  RUBY
55
55
  delta.migrate
56
56
  expect(subject.dump).to match_ruby expected_dsl
@@ -141,13 +141,13 @@ describe 'Ridgepole::Client#diff -> migrate' do
141
141
  expect(delta.differ?).to be_truthy
142
142
  expect(subject.dump).to match_ruby actual_dsl
143
143
  expect(delta.script).to match_fuzzy <<-RUBY
144
- change_table("employee_clubs", {:bulk => true}) do |t|
145
- t.column("any_col", :string, {:limit=>255, :null=>false})
144
+ change_table("employee_clubs", bulk: true) do |t|
145
+ t.column("any_col", :string, **{:limit=>255, :null=>false})
146
146
  end
147
147
 
148
- change_table("employees", {:bulk => true}) do |t|
149
- t.column("age", :integer, {:null=>false})
150
- t.column("updated_at", :date, {})
148
+ change_table("employees", bulk: true) do |t|
149
+ t.column("age", :integer, **{:null=>false})
150
+ t.column("updated_at", :date, **{})
151
151
  end
152
152
  RUBY
153
153
  delta.migrate
@@ -138,12 +138,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
138
138
  expect(delta.differ?).to be_truthy
139
139
  expect(subject.dump).to match_ruby actual_dsl
140
140
  expect(delta.script).to match_fuzzy <<-RUBY
141
- change_table("employee_clubs", {:bulk => true}) do |t|
142
- t.change("club_id", :integer, {:null=>true, :default=>nil})
141
+ change_table("employee_clubs", bulk: true) do |t|
142
+ t.change("club_id", :integer, **{:null=>true, :default=>nil})
143
143
  end
144
144
 
145
- change_table("employees", {:bulk => true}) do |t|
146
- t.change("last_name", :string, {:limit=>20, :default=>"XXX"})
145
+ change_table("employees", bulk: true) do |t|
146
+ t.change("last_name", :string, **{:limit=>20, :default=>"XXX"})
147
147
  end
148
148
  RUBY
149
149
  delta.migrate
@@ -140,19 +140,19 @@ describe 'Ridgepole::Client#diff -> migrate' do
140
140
  expect(delta.differ?).to be_truthy
141
141
  expect(subject.dump).to match_ruby actual_dsl
142
142
  expect(delta.script).to match_fuzzy <<-RUBY
143
- change_table("dept_emp", {:bulk => true}) do |t|
144
- t.remove_index({:name=>"idx_dept_emp_emp_no"})
145
- t.index(["from_date"], {:name=>"idx_dept_emp_emp_no", :using=>:btree, :unique=>false})
143
+ change_table("dept_emp", bulk: true) do |t|
144
+ t.remove_index(name: "idx_dept_emp_emp_no")
145
+ t.index(["from_date"], **{:name=>"idx_dept_emp_emp_no", :using=>:btree, :unique=>false})
146
146
  end
147
147
 
148
- change_table("dept_manager", {:bulk => true}) do |t|
149
- t.remove_index({:name=>"idx_dept_manager_emp_no"})
150
- t.index(["from_date"], {:name=>"idx_dept_manager_emp_no", :using=>:btree, :unique=>false})
148
+ change_table("dept_manager", bulk: true) do |t|
149
+ t.remove_index(name: "idx_dept_manager_emp_no")
150
+ t.index(["from_date"], **{:name=>"idx_dept_manager_emp_no", :using=>:btree, :unique=>false})
151
151
  end
152
152
 
153
- change_table("salaries", {:bulk => true}) do |t|
154
- t.remove_index({:name=>"idx_salaries_emp_no"})
155
- t.index(["from_date"], {:name=>"idx_salaries_emp_no", :using=>:btree, :unique=>false})
153
+ change_table("salaries", bulk: true) do |t|
154
+ t.remove_index(name: "idx_salaries_emp_no")
155
+ t.index(["from_date"], **{:name=>"idx_salaries_emp_no", :using=>:btree, :unique=>false})
156
156
  end
157
157
  RUBY
158
158
 
@@ -134,17 +134,17 @@ describe 'Ridgepole::Client#diff -> migrate' do
134
134
  expect(delta.differ?).to be_truthy
135
135
  expect(subject.dump).to match_ruby actual_dsl
136
136
  expect(delta.script).to match_fuzzy <<-RUBY
137
- change_table("dept_emp", {:bulk => true}) do |t|
137
+ change_table("dept_emp", bulk: true) do |t|
138
138
  t.remove("from_date")
139
139
  t.remove("to_date")
140
140
  end
141
141
 
142
- change_table("dept_manager", {:bulk => true}) do |t|
142
+ change_table("dept_manager", bulk: true) do |t|
143
143
  t.remove("from_date")
144
144
  t.remove("to_date")
145
145
  end
146
146
 
147
- change_table("employees", {:bulk => true}) do |t|
147
+ change_table("employees", bulk: true) do |t|
148
148
  t.remove("last_name")
149
149
  t.remove("hire_date")
150
150
  end
@@ -137,24 +137,24 @@ describe 'Ridgepole::Client#diff -> migrate' do
137
137
  expect(delta.differ?).to be_truthy
138
138
  expect(subject.dump).to match_ruby actual_dsl
139
139
  expect(delta.script).to match_fuzzy erbh(<<-ERB)
140
- change_table("dept_emp", {:bulk => true}) do |t|
140
+ change_table("dept_emp", bulk: true) do |t|
141
141
  t.remove("emp_no")
142
142
  t.remove("from_date")
143
143
  t.remove("to_date")
144
144
  end
145
145
 
146
- change_table("dept_manager", {:bulk => true}) do |t|
146
+ change_table("dept_manager", bulk: true) do |t|
147
147
  t.remove("emp_no")
148
148
  t.remove("from_date")
149
149
  t.remove("to_date")
150
150
  end
151
151
 
152
- change_table("employee_clubs", {:bulk => true}) do |t|
152
+ change_table("employee_clubs", bulk: true) do |t|
153
153
  t.remove("club_id")
154
- t.index(["emp_no"], <%= {:name=>"idx_employee_clubs_emp_no"} + cond(5.0, using: :btree) %>)
154
+ t.index(["emp_no"], **<%= {:name=>"idx_employee_clubs_emp_no"} + cond(5.0, using: :btree) %>)
155
155
  end
156
156
 
157
- change_table("employees", {:bulk => true}) do |t|
157
+ change_table("employees", bulk: true) do |t|
158
158
  t.remove("last_name")
159
159
  t.remove("hire_date")
160
160
  end
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  specify do
51
51
  delta = subject.diff(expected_dsl)
52
52
  expect(delta).to be_differ
53
- expect(delta.script).to match_fuzzy('remove_index("users", {:name=>"index_users_on_lower_name"})')
53
+ expect(delta.script).to match_fuzzy('remove_index("users", name: "index_users_on_lower_name")')
54
54
  expect(subject.dump).to match_fuzzy(actual_dsl)
55
55
  delta.migrate
56
56
  expect(subject.dump).to match_fuzzy(expected_dsl)
@@ -139,16 +139,16 @@ describe 'Ridgepole::Client#diff -> migrate' do
139
139
  expect(delta.differ?).to be_truthy
140
140
  expect(subject.dump).to match_ruby actual_dsl
141
141
  expect(delta.script).to match_fuzzy <<-RUBY
142
- change_table("clubs", {:bulk => true}) do |t|
143
- t.remove_index({:name=>"idx_name"})
142
+ change_table("clubs", bulk: true) do |t|
143
+ t.remove_index(name: "idx_name")
144
144
  end
145
145
 
146
- change_table("employee_clubs", {:bulk => true}) do |t|
147
- t.remove_index({:name=>"idx_employee_clubs_emp_no_club_id"})
146
+ change_table("employee_clubs", bulk: true) do |t|
147
+ t.remove_index(name: "idx_employee_clubs_emp_no_club_id")
148
148
  end
149
149
 
150
- change_table("titles", {:bulk => true}) do |t|
151
- t.remove_index({:name=>"idx_titles_emp_no"})
150
+ change_table("titles", bulk: true) do |t|
151
+ t.remove_index(name: "idx_titles_emp_no")
152
152
  end
153
153
  RUBY
154
154
  delta.migrate
@@ -140,11 +140,11 @@ describe 'Ridgepole::Client#diff -> migrate' do
140
140
  expect(delta.differ?).to be_truthy
141
141
  expect(subject.dump).to match_ruby actual_dsl
142
142
  expect(delta.script).to match_fuzzy <<-RUBY
143
- change_table("dept_emp", {:bulk => true}) do |t|
143
+ change_table("dept_emp", bulk: true) do |t|
144
144
  t.rename("from_date", "from_date2")
145
145
  end
146
146
 
147
- change_table("dept_manager", {:bulk => true}) do |t|
147
+ change_table("dept_manager", bulk: true) do |t|
148
148
  t.rename("to_date", "to_date2")
149
149
  end
150
150
  RUBY
@@ -36,7 +36,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
36
36
  expect(delta.differ?).to be_truthy
37
37
  expect(subject.dump).to match_ruby actual_dsl
38
38
  expect(delta.script).to match_fuzzy <<-RUBY
39
- add_foreign_key("child", "parent", {:name=>"fk_rails_e74ce85cbc"})
39
+ add_foreign_key("child", "parent", **{:name=>"fk_rails_e74ce85cbc"})
40
40
  RUBY
41
41
  delta.migrate
42
42
  expect(subject.dump).to match_ruby expected_dsl
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  expect(delta.differ?).to be_truthy
51
51
  expect(subject.dump).to match_fuzzy sorted_actual_dsl
52
52
  expect(delta.script).to match_fuzzy <<-RUBY
53
- remove_foreign_key("child", {:name=>"fk_rails_e74ce85cbc"})
53
+ remove_foreign_key("child", name: "fk_rails_e74ce85cbc")
54
54
  RUBY
55
55
  delta.migrate
56
56
  expect(subject.dump).to match_ruby expected_dsl
@@ -12,10 +12,6 @@ module SpecCondition
12
12
  ENV['MYSQL57'] == '1'
13
13
  end
14
14
 
15
- def mysql_awesome_enabled?
16
- ENV['ENABLE_MYSQL_AWESOME'] == '1'
17
- end
18
-
19
15
  def activerecord_5?
20
16
  (ActiveRecord::VERSION::MAJOR >= 5) && (ActiveRecord::VERSION::MAJOR < 6)
21
17
  end
@@ -23,6 +19,10 @@ module SpecCondition
23
19
  def debug?
24
20
  ENV['DEBUG'] == '1'
25
21
  end
22
+
23
+ def verbose?
24
+ ENV['VERBOSE'] == '1'
25
+ end
26
26
  end
27
27
 
28
28
  def check_version_or_cond(version_or_cond)
@@ -25,10 +25,11 @@ require 'erb_helper'
25
25
 
26
26
  RSpec.configure do |config|
27
27
  config.before(:all) do
28
- if condition(:debug)
28
+ if condition(:debug) || condition(:verbose)
29
29
  ActiveRecord::Migration.verbose = true
30
30
  logger = Ridgepole::Logger.instance
31
31
  logger.level = ::Logger::DEBUG
32
+ logger.verbose = condition(:verbose)
32
33
  ActiveRecord::Base.logger = logger
33
34
  else
34
35
  ActiveRecord::Migration.verbose = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-04 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -235,10 +235,10 @@ executables:
235
235
  extensions: []
236
236
  extra_rdoc_files: []
237
237
  files:
238
+ - ".github/workflows/test.yml"
238
239
  - ".gitignore"
239
240
  - ".rspec"
240
241
  - ".rubocop.yml"
241
- - ".travis.yml"
242
242
  - Appraisals
243
243
  - Gemfile
244
244
  - LICENSE.txt
@@ -429,7 +429,7 @@ homepage: https://github.com/winebarrel/ridgepole
429
429
  licenses:
430
430
  - MIT
431
431
  metadata: {}
432
- post_install_message:
432
+ post_install_message:
433
433
  rdoc_options: []
434
434
  require_paths:
435
435
  - lib
@@ -444,8 +444,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
444
  - !ruby/object:Gem::Version
445
445
  version: '0'
446
446
  requirements: []
447
- rubygems_version: 3.0.3
448
- signing_key:
447
+ rubygems_version: 3.1.2
448
+ signing_key:
449
449
  specification_version: 4
450
450
  summary: Ridgepole is a tool to manage DB schema.
451
451
  test_files:
@@ -1,44 +0,0 @@
1
- dist: trusty
2
- sudo: required
3
- group: edge
4
- language: ruby
5
- cache:
6
- - bundler
7
- rvm:
8
- - 2.4.9
9
- - 2.5.7
10
- - 2.6.5
11
- before_script:
12
- - sudo service mysql stop
13
- - sudo service postgresql stop
14
- - for i in {1..60}; do docker-compose up -d && break; sleep 1; done
15
- - function mysql_ping { mysqladmin -u root -h 127.0.0.1 -P 13316 -ppassword ping; }
16
- - function mysql57_ping { mysqladmin -u root -h 127.0.0.1 -P 13317 -ppassword ping; }
17
- - function pg_ping { PGPASSWORD=password pg_isready -U postgres -h 127.0.0.1 -p 15442; }
18
- - for i in {1..60}; do mysql_ping && break; sleep 1; done
19
- - for i in {1..60}; do mysql57_ping && break; sleep 1; done
20
- - for i in {1..60}; do pg_ping && break; sleep 1; done
21
- script:
22
- - bundle exec rake
23
- gemfile:
24
- - gemfiles/activerecord_5.0.gemfile
25
- - gemfiles/activerecord_5.1.gemfile
26
- - gemfiles/activerecord_5.2.gemfile
27
- - gemfiles/activerecord_6.0.gemfile
28
- env:
29
- matrix:
30
- - MYSQL56=1
31
- - MYSQL57=1
32
- - POSTGRESQL=1
33
- services:
34
- - docker
35
- addons:
36
- apt:
37
- packages:
38
- - mysql-client-core-5.6
39
- - mysql-client-5.6
40
- - postgresql-client-9.4
41
- matrix:
42
- exclude:
43
- - rvm: 2.4.9
44
- gemfile: gemfiles/activerecord_6.0.gemfile