gemika 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/test.yml +122 -0
  3. data/.gitignore +1 -1
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +75 -0
  6. data/{gemfiles/Gemfile.3.2.mysql2 → Gemfile.3.2.mysql2} +3 -2
  7. data/{gemfiles/Gemfile.3.2.mysql2.lock → Gemfile.3.2.mysql2.lock} +19 -5
  8. data/{gemfiles/Gemfile.4.2.mysql2 → Gemfile.4.2.mysql2} +3 -2
  9. data/{gemfiles/Gemfile.4.2.mysql2.lock → Gemfile.4.2.mysql2.lock} +11 -4
  10. data/{gemfiles/Gemfile.4.2.pg → Gemfile.4.2.pg} +2 -1
  11. data/{gemfiles/Gemfile.4.2.pg.lock → Gemfile.4.2.pg.lock} +9 -3
  12. data/{gemfiles/Gemfile.5.0.mysql2 → Gemfile.5.2.mysql2} +4 -3
  13. data/{gemfiles/Gemfile.5.0.mysql2.lock → Gemfile.5.2.mysql2.lock} +28 -20
  14. data/{gemfiles/Gemfile.5.0.pg → Gemfile.5.2.pg} +3 -2
  15. data/{gemfiles/Gemfile.5.0.pg.lock → Gemfile.5.2.pg.lock} +26 -18
  16. data/Gemfile.5.2.sqlite3 +17 -0
  17. data/Gemfile.5.2.sqlite3.lock +67 -0
  18. data/Gemfile.6.0.pg +17 -0
  19. data/Gemfile.6.0.pg.lock +67 -0
  20. data/README.md +144 -71
  21. data/gemika.gemspec +2 -2
  22. data/lib/gemika/database.rb +13 -3
  23. data/lib/gemika/env.rb +6 -0
  24. data/lib/gemika/errors.rb +2 -0
  25. data/lib/gemika/github_actions_generator.rb +150 -0
  26. data/lib/gemika/matrix.rb +38 -33
  27. data/lib/gemika/matrix/github_actions_config.rb +61 -0
  28. data/lib/gemika/matrix/travis_config.rb +42 -0
  29. data/lib/gemika/tasks.rb +1 -0
  30. data/lib/gemika/tasks/gemika.rb +14 -0
  31. data/lib/gemika/tasks/matrix.rb +4 -4
  32. data/lib/gemika/version.rb +1 -1
  33. data/spec/fixtures/github_actions_yml/Gemfile_without_gemika +1 -0
  34. data/spec/fixtures/github_actions_yml/excludes.yml +13 -0
  35. data/spec/fixtures/github_actions_yml/gemfile_without_gemika.yml +8 -0
  36. data/spec/fixtures/github_actions_yml/includes.yml +20 -0
  37. data/spec/fixtures/github_actions_yml/invalid.yml +8 -0
  38. data/spec/fixtures/github_actions_yml/missing_gemfile.yml +8 -0
  39. data/spec/fixtures/github_actions_yml/multiple_jobs.yml +16 -0
  40. data/spec/fixtures/github_actions_yml/two_by_two.yml +10 -0
  41. data/spec/fixtures/migrate/expected_github_actions.yml +129 -0
  42. data/spec/fixtures/migrate/travis.yml +66 -0
  43. data/spec/fixtures/travis_yml/includes.yml +12 -0
  44. data/spec/gemika/matrix_spec.rb +116 -0
  45. data/spec/spec_helper.rb +1 -0
  46. data/spec/support/database.github.yml +13 -0
  47. metadata +35 -19
  48. data/.travis.yml +0 -58
  49. data/gemfiles/Gemfile.2.3.mysql2 +0 -17
  50. data/gemfiles/Gemfile.2.3.mysql2.lock +0 -34
  51. data/spec/support/database.travis.yml +0 -9
  52. data/spec/support/database.yml +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8b74ff49f303c17e7047fa450e11ad3c5b65877d
4
- data.tar.gz: 3667c4dc64eec83139c8a054c9a1fd05896e193a
2
+ SHA256:
3
+ metadata.gz: 701bc10b573451892d0ced9b83f58b61abf15c326f81c6db6e7b88b03bddf172
4
+ data.tar.gz: 928992d9c46eaa7bb770a94157a7c0c31bd1e25977b2f04b8146c9e6e8cc56e5
5
5
  SHA512:
6
- metadata.gz: 5113f8b4faa3a6b09e21cad5f477957c9db91232467e75fa82487e4942984399fbf078608ee03f75e8901f91b412355a5f73eada767aa2545c4612d5c9323795
7
- data.tar.gz: 458cf074cffbe66d7eacb5b77d16955387a06b7fd9654ebe6f638d68e271b4cdcf0c0c1c5acc75699ad2a1a44e008498928fff2498a0c9dc409e177cfde470db
6
+ metadata.gz: 00bb0cdd5ff56a7ee5a06bf67e89ac0a165b0517e0eda952d1f72f979fc6382559f14bcc13292a43eb1d1f2c024e381cba9484f2b11bc29f458d917d90b94217
7
+ data.tar.gz: 0f22df4164b5b72c452a445cd80f11013dd0aef557d431a7b2972c55dc0534461d077284b127e350d3ab79eccbc1c64c14e2e94980781a2e85bf9dffea20118e
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: Tests
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+ jobs:
11
+ test_mysql:
12
+ runs-on: ubuntu-20.04
13
+ services:
14
+ mysql:
15
+ image: mysql:5.6
16
+ env:
17
+ MYSQL_ROOT_PASSWORD: password
18
+ options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout
19
+ 5s --health-retries 5
20
+ ports:
21
+ - 3306:3306
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ include:
26
+ - ruby: 2.2.10
27
+ gemfile: Gemfile.3.2.mysql2
28
+ - ruby: 2.3.8
29
+ gemfile: Gemfile.4.2.mysql2
30
+ - ruby: 2.2.10
31
+ gemfile: Gemfile.4.2.mysql2
32
+ - ruby: 2.3.8
33
+ gemfile: Gemfile.4.2.mysql2
34
+ - ruby: 2.2.10
35
+ gemfile: Gemfile.5.2.mysql2
36
+ - ruby: 2.3.8
37
+ gemfile: Gemfile.5.2.mysql2
38
+ env:
39
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
40
+ steps:
41
+ - uses: actions/checkout@v2
42
+ - name: Install ruby
43
+ uses: ruby/setup-ruby@v1
44
+ with:
45
+ ruby-version: "${{ matrix.ruby }}"
46
+ - name: Setup database
47
+ run: |
48
+ sudo apt-get install -y mysql-client libmariadbclient-dev
49
+ mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
50
+ - name: Bundle
51
+ run: |
52
+ gem install bundler:1.17.3
53
+ bundle install --no-deployment
54
+ - name: Run tests
55
+ run: bundle exec rspec
56
+ test_pg:
57
+ runs-on: ubuntu-20.04
58
+ services:
59
+ postgres:
60
+ image: postgres
61
+ env:
62
+ POSTGRES_PASSWORD: postgres
63
+ options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
64
+ --health-retries 5"
65
+ ports:
66
+ - 5432:5432
67
+ strategy:
68
+ fail-fast: false
69
+ matrix:
70
+ include:
71
+ - ruby: 2.2.10
72
+ gemfile: Gemfile.4.2.pg
73
+ - ruby: 2.3.8
74
+ gemfile: Gemfile.4.2.pg
75
+ - ruby: 2.2.10
76
+ gemfile: Gemfile.5.2.pg
77
+ - ruby: 2.3.8
78
+ gemfile: Gemfile.5.2.pg
79
+ - ruby: 2.6.4
80
+ gemfile: Gemfile.6.0.pg
81
+ env:
82
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
83
+ steps:
84
+ - uses: actions/checkout@v2
85
+ - name: Install ruby
86
+ uses: ruby/setup-ruby@v1
87
+ with:
88
+ ruby-version: "${{ matrix.ruby }}"
89
+ - name: Setup database
90
+ run: |
91
+ sudo apt-get install -y postgresql-client
92
+ PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
93
+ - name: Bundle
94
+ run: |
95
+ gem install bundler:1.17.3
96
+ bundle install --no-deployment
97
+ - name: Run tests
98
+ run: bundle exec rspec
99
+ test_sqlite:
100
+ runs-on: ubuntu-20.04
101
+ strategy:
102
+ fail-fast: false
103
+ matrix:
104
+ include:
105
+ - ruby: 2.2.10
106
+ gemfile: Gemfile.5.2.sqlite3
107
+ - ruby: 2.3.8
108
+ gemfile: Gemfile.5.2.sqlite3
109
+ env:
110
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
111
+ steps:
112
+ - uses: actions/checkout@v2
113
+ - name: Install ruby
114
+ uses: ruby/setup-ruby@v1
115
+ with:
116
+ ruby-version: "${{ matrix.ruby }}"
117
+ - name: Bundle
118
+ run: |
119
+ gem install bundler:1.17.3
120
+ bundle install --no-deployment
121
+ - name: Run tests
122
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  .idea
2
2
  pkg
3
-
3
+ /spec/support/database.yml
@@ -1 +1 @@
1
- 2.2.4
1
+ 2.2.10
@@ -0,0 +1,75 @@
1
+ All notable changes to this project will be documented in this file.
2
+
3
+ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
+
5
+
6
+ ## Unreleased
7
+
8
+ ### Breaking changes
9
+
10
+ -
11
+
12
+ ### Compatible changes
13
+
14
+ -
15
+
16
+ ## 0.4.0 - 2019-08-07
17
+
18
+ ### Breaking changes
19
+
20
+ -
21
+
22
+ ### Compatible changes
23
+
24
+ - Move gemfiles to project root
25
+ - Added support to read the `include` option from the `travis.yml` file. All combinations defined in the include option
26
+ are added to the existing matrix. If no matrix exist, these are the only ones that are run.
27
+
28
+ Example:
29
+
30
+ ```
31
+ rvm:
32
+ - 2.1.8
33
+ - 2.3.1
34
+
35
+ gemfile:
36
+ - gemfiles/Gemfile1
37
+ - gemfiles/Gemfile2
38
+
39
+ matrix:
40
+ include:
41
+ - rvm: 2.6.3
42
+ gemfile: gemfiles/Gemfile3
43
+ ```
44
+
45
+ ## 0.3.4 - 2018-08-29
46
+
47
+ ### Compatible changes
48
+
49
+ - Print a warning instead of crashing when `database.yml` is missing.
50
+
51
+
52
+ ## 0.3.3 - 2018-08-01
53
+
54
+ ### Compatible changes
55
+
56
+ - Add support for sqlite3.
57
+
58
+
59
+ ## 0.3.2 - 2016-09-28
60
+
61
+ ### Compatible changes
62
+
63
+ - Remove some debug output.
64
+
65
+
66
+ ## 0.3.1 - 2016-09-28
67
+
68
+ ### Compatible changes
69
+
70
+ - `rake current_rspec` no longer does a second unnecessary `bundle exec` call
71
+
72
+
73
+ ## Older releases
74
+
75
+ Please check commits.
@@ -6,12 +6,13 @@ ruby '< 2.3'
6
6
  # Runtime dependencies
7
7
  gem 'activerecord', '=3.2.22'
8
8
  gem 'rspec', '~> 3.4'
9
- gem 'mysql2', '= 0.3.17'
9
+ gem 'mysql2', git: 'https://github.com/makandra/mysql2', branch: '0.3.x-lts'
10
10
  gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
11
11
 
12
12
  # Development dependencies
13
13
  gem 'rake', '=10.0.4'
14
14
  gem 'database_cleaner', '~>1.0.0'
15
+ gem 'pry'
15
16
 
16
17
  # Gem under test
17
- gem 'gemika', :path => '..'
18
+ gem 'gemika', :path => '.'
@@ -1,7 +1,14 @@
1
+ GIT
2
+ remote: https://github.com/makandra/mysql2
3
+ revision: c920d41e43c4722d4c065d2ea9d21494c560bd85
4
+ branch: 0.3.x-lts
5
+ specs:
6
+ mysql2 (0.3.21)
7
+
1
8
  PATH
2
- remote: ..
9
+ remote: .
3
10
  specs:
4
- gemika (0.3.0)
11
+ gemika (0.5.0)
5
12
 
6
13
  GEM
7
14
  remote: https://rubygems.org/
@@ -19,11 +26,16 @@ GEM
19
26
  multi_json (~> 1.0)
20
27
  arel (3.0.3)
21
28
  builder (3.0.4)
29
+ coderay (1.1.2)
22
30
  database_cleaner (1.0.1)
23
31
  diff-lcs (1.2.5)
24
32
  i18n (0.6.11)
33
+ method_source (0.9.2)
25
34
  multi_json (1.12.1)
26
- mysql2 (0.3.17)
35
+ pry (0.9.12.6)
36
+ coderay (~> 1.0)
37
+ method_source (~> 0.8)
38
+ slop (~> 3.4)
27
39
  rake (10.0.4)
28
40
  rspec (3.5.0)
29
41
  rspec-core (~> 3.5.0)
@@ -38,6 +50,7 @@ GEM
38
50
  diff-lcs (>= 1.2.0, < 2.0)
39
51
  rspec-support (~> 3.5.0)
40
52
  rspec-support (3.5.0)
53
+ slop (3.6.0)
41
54
  tzinfo (0.3.51)
42
55
 
43
56
  PLATFORMS
@@ -48,7 +61,8 @@ DEPENDENCIES
48
61
  database_cleaner (~> 1.0.0)
49
62
  gemika!
50
63
  i18n (= 0.6.11)
51
- mysql2 (= 0.3.17)
64
+ mysql2!
65
+ pry
52
66
  rake (= 10.0.4)
53
67
  rspec (~> 3.4)
54
68
 
@@ -56,4 +70,4 @@ RUBY VERSION
56
70
  ruby 1.8.7p375
57
71
 
58
72
  BUNDLED WITH
59
- 1.12.5
73
+ 1.17.3
@@ -6,11 +6,12 @@ ruby '>= 1.9.3'
6
6
  # Runtime dependencies
7
7
  gem 'activerecord', '~>4.2.1'
8
8
  gem 'rspec', '~>3.4'
9
- gem 'mysql2', '~> 0.3.17'
9
+ gem 'mysql2', '~>0.4.10'
10
10
 
11
11
  # Development dependencies
12
12
  gem 'rake'
13
13
  gem 'database_cleaner'
14
+ gem 'pry'
14
15
 
15
16
  # Gem under test
16
- gem 'gemika', :path => '..'
17
+ gem 'gemika', :path => '.'
@@ -1,6 +1,7 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
+ gemika (0.5.0)
4
5
 
5
6
  GEM
6
7
  remote: https://rubygems.org/
@@ -20,12 +21,17 @@ GEM
20
21
  tzinfo (~> 1.1)
21
22
  arel (6.0.3)
22
23
  builder (3.2.2)
24
+ coderay (1.1.2)
23
25
  database_cleaner (1.5.3)
24
26
  diff-lcs (1.2.5)
25
27
  i18n (0.7.0)
26
28
  json (1.8.3)
29
+ method_source (0.9.2)
27
30
  minitest (5.9.0)
28
- mysql2 (0.3.21)
31
+ mysql2 (0.4.10)
32
+ pry (0.12.2)
33
+ coderay (~> 1.1.0)
34
+ method_source (~> 0.9.0)
29
35
  rake (11.3.0)
30
36
  rspec (3.5.0)
31
37
  rspec-core (~> 3.5.0)
@@ -51,7 +57,8 @@ DEPENDENCIES
51
57
  activerecord (~> 4.2.1)
52
58
  database_cleaner
53
59
  gemika!
54
- mysql2 (~> 0.3.17)
60
+ mysql2 (~> 0.4.10)
61
+ pry
55
62
  rake
56
63
  rspec (~> 3.4)
57
64
 
@@ -59,4 +66,4 @@ RUBY VERSION
59
66
  ruby 2.2.4p230
60
67
 
61
68
  BUNDLED WITH
62
- 1.12.5
69
+ 1.17.3
@@ -11,8 +11,9 @@ gem 'pg'
11
11
  # Development dependencies
12
12
  gem 'rake'
13
13
  gem 'database_cleaner'
14
+ gem 'pry'
14
15
 
15
16
  # Gem under test
16
- gem 'gemika', :path => '..'
17
+ gem 'gemika', :path => '.'
17
18
 
18
19
  ruby '>= 1.9.3'
@@ -1,7 +1,7 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
- gemika (0.3.1)
4
+ gemika (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,12 +21,17 @@ GEM
21
21
  tzinfo (~> 1.1)
22
22
  arel (6.0.3)
23
23
  builder (3.2.2)
24
+ coderay (1.1.2)
24
25
  database_cleaner (1.5.3)
25
26
  diff-lcs (1.2.5)
26
27
  i18n (0.7.0)
27
28
  json (1.8.3)
29
+ method_source (0.9.2)
28
30
  minitest (5.9.0)
29
31
  pg (0.19.0)
32
+ pry (0.12.2)
33
+ coderay (~> 1.1.0)
34
+ method_source (~> 0.9.0)
30
35
  rake (11.3.0)
31
36
  rspec (3.5.0)
32
37
  rspec-core (~> 3.5.0)
@@ -53,6 +58,7 @@ DEPENDENCIES
53
58
  database_cleaner
54
59
  gemika!
55
60
  pg
61
+ pry
56
62
  rake
57
63
  rspec (~> 3.4)
58
64
 
@@ -60,4 +66,4 @@ RUBY VERSION
60
66
  ruby 2.3.1p112
61
67
 
62
68
  BUNDLED WITH
63
- 1.12.5
69
+ 1.17.3
@@ -4,13 +4,14 @@ source 'https://rubygems.org'
4
4
  ruby '>= 2.2'
5
5
 
6
6
  # Runtime dependencies
7
- gem 'activerecord', '~>5.0.0'
7
+ gem 'activerecord', '~>5.2.0'
8
8
  gem 'rspec', '~>3.5'
9
- gem 'mysql2', '~>0.4.4'
9
+ gem 'mysql2'
10
10
 
11
11
  # Development dependencies
12
12
  gem 'rake'
13
13
  gem 'database_cleaner'
14
+ gem 'pry'
14
15
 
15
16
  # Gem under test
16
- gem 'gemika', :path => '..'
17
+ gem 'gemika', :path => '.'
@@ -1,28 +1,35 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
+ gemika (0.5.0)
4
5
 
5
6
  GEM
6
7
  remote: https://rubygems.org/
7
8
  specs:
8
- activemodel (5.0.0.1)
9
- activesupport (= 5.0.0.1)
10
- activerecord (5.0.0.1)
11
- activemodel (= 5.0.0.1)
12
- activesupport (= 5.0.0.1)
13
- arel (~> 7.0)
14
- activesupport (5.0.0.1)
9
+ activemodel (5.2.3)
10
+ activesupport (= 5.2.3)
11
+ activerecord (5.2.3)
12
+ activemodel (= 5.2.3)
13
+ activesupport (= 5.2.3)
14
+ arel (>= 9.0)
15
+ activesupport (5.2.3)
15
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
- i18n (~> 0.7)
17
+ i18n (>= 0.7, < 2)
17
18
  minitest (~> 5.1)
18
19
  tzinfo (~> 1.1)
19
- arel (7.1.2)
20
- concurrent-ruby (1.0.2)
21
- database_cleaner (1.5.3)
20
+ arel (9.0.0)
21
+ coderay (1.1.2)
22
+ concurrent-ruby (1.1.5)
23
+ database_cleaner (1.7.0)
22
24
  diff-lcs (1.2.5)
23
- i18n (0.7.0)
24
- minitest (5.9.0)
25
- mysql2 (0.4.4)
25
+ i18n (1.5.1)
26
+ concurrent-ruby (~> 1.0)
27
+ method_source (0.9.2)
28
+ minitest (5.11.3)
29
+ mysql2 (0.5.3)
30
+ pry (0.12.2)
31
+ coderay (~> 1.1.0)
32
+ method_source (~> 0.9.0)
26
33
  rake (11.3.0)
27
34
  rspec (3.5.0)
28
35
  rspec-core (~> 3.5.0)
@@ -37,18 +44,19 @@ GEM
37
44
  diff-lcs (>= 1.2.0, < 2.0)
38
45
  rspec-support (~> 3.5.0)
39
46
  rspec-support (3.5.0)
40
- thread_safe (0.3.5)
41
- tzinfo (1.2.2)
47
+ thread_safe (0.3.6)
48
+ tzinfo (1.2.5)
42
49
  thread_safe (~> 0.1)
43
50
 
44
51
  PLATFORMS
45
52
  ruby
46
53
 
47
54
  DEPENDENCIES
48
- activerecord (~> 5.0.0)
55
+ activerecord (~> 5.2.0)
49
56
  database_cleaner
50
57
  gemika!
51
- mysql2 (~> 0.4.4)
58
+ mysql2
59
+ pry
52
60
  rake
53
61
  rspec (~> 3.5)
54
62
 
@@ -56,4 +64,4 @@ RUBY VERSION
56
64
  ruby 2.2.4p230
57
65
 
58
66
  BUNDLED WITH
59
- 1.12.5
67
+ 1.17.3