gemika 0.3.4 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +114 -0
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +91 -0
  5. data/{gemfiles/Gemfile.3.2.mysql2 → Gemfile.3.2.mysql2} +4 -3
  6. data/{gemfiles/Gemfile.3.2.mysql2.lock → Gemfile.3.2.mysql2.lock} +19 -5
  7. data/{gemfiles/Gemfile.4.2.mysql2 → Gemfile.4.2.mysql2} +3 -2
  8. data/{gemfiles/Gemfile.4.2.mysql2.lock → Gemfile.4.2.mysql2.lock} +11 -5
  9. data/{gemfiles/Gemfile.4.2.pg → Gemfile.4.2.pg} +2 -1
  10. data/{gemfiles/Gemfile.4.2.pg.lock → Gemfile.4.2.pg.lock} +9 -3
  11. data/{gemfiles/Gemfile.5.0.mysql2 → Gemfile.5.2.mysql2} +4 -3
  12. data/{gemfiles/Gemfile.5.0.mysql2.lock → Gemfile.5.2.mysql2.lock} +28 -21
  13. data/{gemfiles/Gemfile.5.0.pg → Gemfile.5.2.pg} +3 -2
  14. data/{gemfiles/Gemfile.5.0.pg.lock → Gemfile.5.2.pg.lock} +26 -19
  15. data/{gemfiles/Gemfile.5.0.sqlite3 → Gemfile.5.2.sqlite3} +3 -2
  16. data/{gemfiles/Gemfile.5.0.sqlite3.lock → Gemfile.5.2.sqlite3.lock} +20 -14
  17. data/Gemfile.6.1.pg +17 -0
  18. data/Gemfile.6.1.pg.lock +66 -0
  19. data/README.md +117 -49
  20. data/gemika.gemspec +2 -2
  21. data/lib/gemika/database.rb +9 -3
  22. data/lib/gemika/env.rb +15 -1
  23. data/lib/gemika/errors.rb +2 -0
  24. data/lib/gemika/github_actions_generator.rb +150 -0
  25. data/lib/gemika/matrix.rb +38 -33
  26. data/lib/gemika/matrix/github_actions_config.rb +61 -0
  27. data/lib/gemika/matrix/travis_config.rb +42 -0
  28. data/lib/gemika/tasks.rb +1 -0
  29. data/lib/gemika/tasks/gemika.rb +14 -0
  30. data/lib/gemika/tasks/matrix.rb +4 -4
  31. data/lib/gemika/version.rb +1 -1
  32. data/spec/fixtures/github_actions_yml/Gemfile_without_gemika +1 -0
  33. data/spec/fixtures/github_actions_yml/excludes.yml +13 -0
  34. data/spec/fixtures/github_actions_yml/gemfile_without_gemika.yml +8 -0
  35. data/spec/fixtures/github_actions_yml/includes.yml +20 -0
  36. data/spec/fixtures/github_actions_yml/invalid.yml +8 -0
  37. data/spec/fixtures/github_actions_yml/missing_gemfile.yml +8 -0
  38. data/spec/fixtures/github_actions_yml/multiple_jobs.yml +16 -0
  39. data/spec/fixtures/github_actions_yml/two_by_two.yml +10 -0
  40. data/spec/fixtures/migrate/expected_github_actions.yml +129 -0
  41. data/spec/fixtures/migrate/travis.yml +66 -0
  42. data/spec/fixtures/travis_yml/includes.yml +12 -0
  43. data/spec/gemika/matrix_spec.rb +116 -0
  44. data/spec/spec_helper.rb +1 -0
  45. data/spec/support/database.github.yml +13 -0
  46. metadata +35 -21
  47. data/.travis.yml +0 -62
  48. data/Gemfile.lock +0 -63
  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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c560743c889bf6b598685415ad4dbc94adfbad6570e3b6339df77bc0c875ca1
4
- data.tar.gz: 26ae03d7ebe63ebe866c10084fbc841deb2e4e51b5b6dfa41fd83e5cdb0e0990
3
+ metadata.gz: 3c7ab1dd1d59d375e354fb1f813fc99a4069c4ca6bdf9809b9dde265dd3a6303
4
+ data.tar.gz: 4c939b12f8e97fab3dc3b9167755ad3c75515c336350e2e9b290f242db7306fe
5
5
  SHA512:
6
- metadata.gz: a199f7f00ee13cae08ee7b35f3b2bbe6f970643e2fb2e134c7f95418f75fcefd8573077780fdc344e2bf3b5128c767827d2ee6cc6cbf1a7331bddbef4b4a1198
7
- data.tar.gz: 4c2a678c94e8c52590efeb78aa251631c5c820ed5fb3f6e396e3e9838f51fc0181181dc2cc0a33564f532b33955e7bfe4dc4d3cc95aad508c24256038324b84a
6
+ metadata.gz: bcc629b0f418542484818474228f7c3df7a146bfb00d470f2a46a58fcfb64393d775a57a3b3da7e9bed602c7af17dcc7cac5e84fc3dbdb0cd5dee1471e787bcf
7
+ data.tar.gz: 03a1396b343eb55039ed22d62744cef219be934d946dc02a83912c7117a40a0b0e8e049675d87f98286a07ac34b589af6c4db2792a4493dcbc7872e0573a4a4c
@@ -0,0 +1,114 @@
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.3.8
27
+ gemfile: Gemfile.3.2.mysql2
28
+ - ruby: 2.3.8
29
+ gemfile: Gemfile.4.2.mysql2
30
+ - ruby: 2.3.8
31
+ gemfile: Gemfile.4.2.mysql2
32
+ - ruby: 2.3.8
33
+ gemfile: Gemfile.5.2.mysql2
34
+ env:
35
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
36
+ steps:
37
+ - uses: actions/checkout@v2
38
+ - name: Install ruby
39
+ uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: "${{ matrix.ruby }}"
42
+ - name: Setup database
43
+ run: |
44
+ sudo apt-get install -y mysql-client libmariadbclient-dev
45
+ mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
46
+ - name: Bundle
47
+ run: |
48
+ gem install bundler:2.2.15
49
+ bundle install --no-deployment
50
+ - name: Run tests
51
+ run: bundle exec rspec
52
+ test_pg:
53
+ runs-on: ubuntu-20.04
54
+ services:
55
+ postgres:
56
+ image: postgres
57
+ env:
58
+ POSTGRES_PASSWORD: postgres
59
+ options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
60
+ --health-retries 5"
61
+ ports:
62
+ - 5432:5432
63
+ strategy:
64
+ fail-fast: false
65
+ matrix:
66
+ include:
67
+ - ruby: 2.3.8
68
+ gemfile: Gemfile.4.2.pg
69
+ - ruby: 2.3.8
70
+ gemfile: Gemfile.5.2.pg
71
+ - ruby: 2.6.4
72
+ gemfile: Gemfile.6.1.pg
73
+ - ruby: 3.0.1
74
+ gemfile: Gemfile.6.1.pg
75
+ env:
76
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
77
+ steps:
78
+ - uses: actions/checkout@v2
79
+ - name: Install ruby
80
+ uses: ruby/setup-ruby@v1
81
+ with:
82
+ ruby-version: "${{ matrix.ruby }}"
83
+ - name: Setup database
84
+ run: |
85
+ sudo apt-get install -y postgresql-client
86
+ PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
87
+ - name: Bundle
88
+ run: |
89
+ gem install bundler:2.2.15
90
+ bundle install --no-deployment
91
+ - name: Run tests
92
+ run: bundle exec rspec
93
+ test_sqlite:
94
+ runs-on: ubuntu-20.04
95
+ strategy:
96
+ fail-fast: false
97
+ matrix:
98
+ include:
99
+ - ruby: 2.3.8
100
+ gemfile: Gemfile.5.2.sqlite3
101
+ env:
102
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
103
+ steps:
104
+ - uses: actions/checkout@v2
105
+ - name: Install ruby
106
+ uses: ruby/setup-ruby@v1
107
+ with:
108
+ ruby-version: "${{ matrix.ruby }}"
109
+ - name: Bundle
110
+ run: |
111
+ gem install bundler:2.2.15
112
+ bundle install --no-deployment
113
+ - name: Run tests
114
+ run: bundle exec rspec
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.4
1
+ 2.6.4
data/CHANGELOG.md ADDED
@@ -0,0 +1,91 @@
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.6.1 - 2021-04-20
17
+
18
+ ### Compatible changes
19
+
20
+ - fix deprecation warning for Bundler.with_clean_env on Bundler >= 2
21
+
22
+ ## 0.6.0 - 2021-04-20
23
+
24
+ ### Compatible changes
25
+
26
+ - add Ruby 3 compatibility
27
+ - drop Ruby 2.2 support
28
+
29
+ ## 0.5.0 - 2020-10-09
30
+
31
+ ### Compatible changes
32
+
33
+ - add support for github actions instead of travis
34
+ - add method to migrate travis to github actions workflow
35
+
36
+ ## 0.4.0 - 2019-08-07
37
+
38
+ ### Compatible changes
39
+
40
+ - Move gemfiles to project root
41
+ - Added support to read the `include` option from the `travis.yml` file. All combinations defined in the include option
42
+ are added to the existing matrix. If no matrix exist, these are the only ones that are run.
43
+
44
+ Example:
45
+
46
+ ```
47
+ rvm:
48
+ - 2.1.8
49
+ - 2.3.1
50
+
51
+ gemfile:
52
+ - gemfiles/Gemfile1
53
+ - gemfiles/Gemfile2
54
+
55
+ matrix:
56
+ include:
57
+ - rvm: 2.6.3
58
+ gemfile: gemfiles/Gemfile3
59
+ ```
60
+
61
+ ## 0.3.4 - 2018-08-29
62
+
63
+ ### Compatible changes
64
+
65
+ - Print a warning instead of crashing when `database.yml` is missing.
66
+
67
+
68
+ ## 0.3.3 - 2018-08-01
69
+
70
+ ### Compatible changes
71
+
72
+ - Add support for sqlite3.
73
+
74
+
75
+ ## 0.3.2 - 2016-09-28
76
+
77
+ ### Compatible changes
78
+
79
+ - Remove some debug output.
80
+
81
+
82
+ ## 0.3.1 - 2016-09-28
83
+
84
+ ### Compatible changes
85
+
86
+ - `rake current_rspec` no longer does a second unnecessary `bundle exec` call
87
+
88
+
89
+ ## Older releases
90
+
91
+ Please check commits.
@@ -1,17 +1,18 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Ruby
4
- ruby '< 2.3'
4
+ ruby '< 2.4'
5
5
 
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.4)
11
+ gemika (0.6.1)
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.16.1
73
+ 2.2.15
@@ -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,7 +1,7 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
- gemika (0.3.4)
4
+ gemika (0.6.1)
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
- 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)
30
35
  rake (11.3.0)
31
36
  rspec (3.5.0)
32
37
  rspec-core (~> 3.5.0)
@@ -52,7 +57,8 @@ DEPENDENCIES
52
57
  activerecord (~> 4.2.1)
53
58
  database_cleaner
54
59
  gemika!
55
- mysql2 (~> 0.3.17)
60
+ mysql2 (~> 0.4.10)
61
+ pry
56
62
  rake
57
63
  rspec (~> 3.4)
58
64
 
@@ -60,4 +66,4 @@ RUBY VERSION
60
66
  ruby 2.2.4p230
61
67
 
62
68
  BUNDLED WITH
63
- 1.16.1
69
+ 2.2.15
@@ -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.4)
4
+ gemika (0.6.1)
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.16.1
69
+ 2.2.15
@@ -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,29 +1,35 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
- gemika (0.3.4)
4
+ gemika (0.6.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- activemodel (5.0.0.1)
10
- activesupport (= 5.0.0.1)
11
- activerecord (5.0.0.1)
12
- activemodel (= 5.0.0.1)
13
- activesupport (= 5.0.0.1)
14
- arel (~> 7.0)
15
- 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)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (~> 0.7)
17
+ i18n (>= 0.7, < 2)
18
18
  minitest (~> 5.1)
19
19
  tzinfo (~> 1.1)
20
- arel (7.1.2)
21
- concurrent-ruby (1.0.2)
22
- 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)
23
24
  diff-lcs (1.2.5)
24
- i18n (0.7.0)
25
- minitest (5.9.0)
26
- 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)
27
33
  rake (11.3.0)
28
34
  rspec (3.5.0)
29
35
  rspec-core (~> 3.5.0)
@@ -38,18 +44,19 @@ GEM
38
44
  diff-lcs (>= 1.2.0, < 2.0)
39
45
  rspec-support (~> 3.5.0)
40
46
  rspec-support (3.5.0)
41
- thread_safe (0.3.5)
42
- tzinfo (1.2.2)
47
+ thread_safe (0.3.6)
48
+ tzinfo (1.2.5)
43
49
  thread_safe (~> 0.1)
44
50
 
45
51
  PLATFORMS
46
52
  ruby
47
53
 
48
54
  DEPENDENCIES
49
- activerecord (~> 5.0.0)
55
+ activerecord (~> 5.2.0)
50
56
  database_cleaner
51
57
  gemika!
52
- mysql2 (~> 0.4.4)
58
+ mysql2
59
+ pry
53
60
  rake
54
61
  rspec (~> 3.5)
55
62
 
@@ -57,4 +64,4 @@ RUBY VERSION
57
64
  ruby 2.2.4p230
58
65
 
59
66
  BUNDLED WITH
60
- 1.16.1
67
+ 2.2.15