gemika 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +6 -6
- data/CHANGELOG.md +6 -0
- data/Gemfile.5.2.mysql2.lock +2 -2
- data/Gemfile.5.2.pg.lock +2 -2
- data/Gemfile.5.2.sqlite3.lock +2 -2
- data/Gemfile.6.1.pg.lock +2 -2
- data/Gemfile.7.0.pg.lock +6 -6
- data/README.md +21 -9
- data/bin/matrix +65 -0
- data/lib/gemika/version.rb +1 -1
- data/spec/fixtures/migrate/expected_github_actions.yml +3 -3
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b533117c01bb5d6011e1e2f41291be1e6aa14af11eb876cba896ed0a4f2630f7
|
4
|
+
data.tar.gz: 53f1415288ad8653657966277cab42c128dfd2cb8ddf5e2aeb811a01b518043c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8b3695cd7dc1c01fdf9a558b0795d8590f90876350f65aee69348927f987a4e92b818f57c2895dcffc0b0a807745137a7f3151e549f88508b478f4d2735834
|
7
|
+
data.tar.gz: 3d28afbc37f5492990f55034aa0889e10506db61c427a816f0f072ec1e35cf4e9fbde658176593f1c24c881d12f9a44c75c912f8a48f0638622edbe8d84f3cfd
|
data/.github/workflows/test.yml
CHANGED
@@ -28,7 +28,7 @@ jobs:
|
|
28
28
|
env:
|
29
29
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
30
30
|
steps:
|
31
|
-
- uses: actions/checkout@
|
31
|
+
- uses: actions/checkout@v3
|
32
32
|
- name: Install ruby
|
33
33
|
uses: ruby/setup-ruby@v1
|
34
34
|
with:
|
@@ -38,7 +38,7 @@ jobs:
|
|
38
38
|
mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
|
39
39
|
- name: Bundle
|
40
40
|
run: |
|
41
|
-
gem install bundler:2.
|
41
|
+
gem install bundler:2.3.1
|
42
42
|
bundle install --no-deployment
|
43
43
|
- name: Run tests
|
44
44
|
run: bundle exec rspec
|
@@ -72,7 +72,7 @@ jobs:
|
|
72
72
|
env:
|
73
73
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
74
74
|
steps:
|
75
|
-
- uses: actions/checkout@
|
75
|
+
- uses: actions/checkout@v3
|
76
76
|
- name: Install ruby
|
77
77
|
uses: ruby/setup-ruby@v1
|
78
78
|
with:
|
@@ -84,7 +84,7 @@ jobs:
|
|
84
84
|
PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
|
85
85
|
- name: Bundle
|
86
86
|
run: |
|
87
|
-
gem install bundler:2.
|
87
|
+
gem install bundler:2.3.1
|
88
88
|
bundle install --no-deployment
|
89
89
|
- name: Run tests
|
90
90
|
run: bundle exec rspec
|
@@ -99,14 +99,14 @@ jobs:
|
|
99
99
|
env:
|
100
100
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
101
101
|
steps:
|
102
|
-
- uses: actions/checkout@
|
102
|
+
- uses: actions/checkout@v3
|
103
103
|
- name: Install ruby
|
104
104
|
uses: ruby/setup-ruby@v1
|
105
105
|
with:
|
106
106
|
ruby-version: "${{ matrix.ruby }}"
|
107
107
|
- name: Bundle
|
108
108
|
run: |
|
109
|
-
gem install bundler:2.
|
109
|
+
gem install bundler:2.3.1
|
110
110
|
bundle install --no-deployment
|
111
111
|
- name: Run tests
|
112
112
|
run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
@@ -14,6 +14,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
14
14
|
-
|
15
15
|
|
16
16
|
|
17
|
+
## 0.8.2 - 2023-07-13
|
18
|
+
|
19
|
+
### Compatible changes
|
20
|
+
|
21
|
+
- Update gem and bundler versions
|
22
|
+
- Provide dev script `bin/matrix` and update README
|
17
23
|
|
18
24
|
## 0.8.1 - 2023-01-24
|
19
25
|
|
data/Gemfile.5.2.mysql2.lock
CHANGED
data/Gemfile.5.2.pg.lock
CHANGED
data/Gemfile.5.2.sqlite3.lock
CHANGED
data/Gemfile.6.1.pg.lock
CHANGED
data/Gemfile.7.0.pg.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gemika (0.8.
|
4
|
+
gemika (0.8.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
coderay (1.1.3)
|
20
20
|
concurrent-ruby (1.1.10)
|
21
21
|
database_cleaner (1.7.0)
|
22
|
-
diff-lcs (1.
|
22
|
+
diff-lcs (1.5.0)
|
23
23
|
i18n (1.12.0)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
25
|
method_source (1.0.0)
|
@@ -35,13 +35,13 @@ GEM
|
|
35
35
|
rspec-mocks (~> 3.8.0)
|
36
36
|
rspec-core (3.8.2)
|
37
37
|
rspec-support (~> 3.8.0)
|
38
|
-
rspec-expectations (3.8.
|
38
|
+
rspec-expectations (3.8.6)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
40
|
rspec-support (~> 3.8.0)
|
41
|
-
rspec-mocks (3.8.
|
41
|
+
rspec-mocks (3.8.2)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
43
|
rspec-support (~> 3.8.0)
|
44
|
-
rspec-support (3.8.
|
44
|
+
rspec-support (3.8.3)
|
45
45
|
tzinfo (2.0.5)
|
46
46
|
concurrent-ruby (~> 1.0)
|
47
47
|
|
@@ -61,4 +61,4 @@ RUBY VERSION
|
|
61
61
|
ruby 2.2.4p230
|
62
62
|
|
63
63
|
BUNDLED WITH
|
64
|
-
2.
|
64
|
+
2.3.1
|
data/README.md
CHANGED
@@ -693,22 +693,34 @@ Development
|
|
693
693
|
|
694
694
|
Here are some hints when you try to make changes to Gemika itself:
|
695
695
|
|
696
|
-
There are tests in `spec`. We only accept PRs with tests.
|
696
|
+
There are tests in `spec`. We only accept PRs with tests. If you create a PR, the tests will automatically run on
|
697
|
+
GitHub actions on each push. We will only merge pull requests after a green GitHub actions run.
|
698
|
+
|
699
|
+
To run tests locally for development, first setup your test databases:
|
697
700
|
|
698
|
-
- Install Ruby 2.6.4
|
699
701
|
- Create a local test database `gemika_test` in both MySQL and PostgreSQL
|
700
702
|
- Copy `spec/support/database.sample.yml` to `spec/support/database.yml` and enter your local credentials for the test databases
|
701
|
-
- Create the databases specified in `database.yml`
|
702
|
-
- Install development dependencies using `bundle install`
|
703
|
-
- Run tests using `bundle exec rspec`
|
704
703
|
|
705
|
-
|
704
|
+
Afterwards you have multiple options:
|
706
705
|
|
707
|
-
|
708
|
-
-
|
706
|
+
1. Run tests against the "main development" Ruby version (`.ruby-version`) and dependencies (`Gemfile`/`Gemfile.lock` symlinks):
|
707
|
+
- Install the Ruby version specified in `.ruby-version`
|
708
|
+
- Install development dependencies using `bundle install`
|
709
|
+
- Run tests using `bundle exec rspec`
|
709
710
|
|
710
|
-
|
711
|
+
2. Run tests against a specific Ruby version (out of those mentioned in `.github/workflows/test.yml`) and all Gemfiles compatible with that version:
|
712
|
+
- Install and switch to the Ruby version
|
713
|
+
- Install development dependencies for all compatible Gemfiles using `rake matrix:install`
|
714
|
+
- Run tests for all compatible Gemfiles using `rake matrix:spec`
|
715
|
+
|
716
|
+
3. Run tests against all compatible combinations of Ruby and Gemfile:
|
717
|
+
- Install all Ruby versions mentioned in `.github/workflows/test.yml`
|
718
|
+
- run `bin/matrix` (only supports `rbenv` for switching Ruby versions currently)
|
711
719
|
|
720
|
+
Hints:
|
721
|
+
- We recommend to have sufficiently new versions of bundler (> 2.3.0) and rubygems (> 3.3.0) installed for each Ruby version.
|
722
|
+
- The script `bin/matrix` will warn you, if that is not the case. For all other methods you need to ensure that yourself.
|
723
|
+
- Supported "Ruby <-> Gemfile" combinations are configured in `.github/workflows/test.yml`.
|
712
724
|
|
713
725
|
Credits
|
714
726
|
-------
|
data/bin/matrix
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -euo pipefail
|
3
|
+
|
4
|
+
# utility for comparing version strings
|
5
|
+
# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
|
6
|
+
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
7
|
+
|
8
|
+
# store current Ruby version and restore it on exit
|
9
|
+
original_ruby_version=$(cat .ruby-version)
|
10
|
+
trap "rbenv local $original_ruby_version" EXIT
|
11
|
+
|
12
|
+
# determine employed Ruby versions (awk command == "strip whitespace", sed command == "delete_prefix")
|
13
|
+
readarray -t versions < <(grep ruby: .github/workflows/test.yml | awk '{$1=$1};1' | sed 's/- ruby: //' | sort | uniq)
|
14
|
+
echo "Detected Ruby versions:"
|
15
|
+
for version in "${versions[@]}"
|
16
|
+
do
|
17
|
+
echo "- $version"
|
18
|
+
done
|
19
|
+
echo ""
|
20
|
+
|
21
|
+
for version in "${versions[@]}"
|
22
|
+
do
|
23
|
+
# switch Ruby version
|
24
|
+
rbenv local "$version"
|
25
|
+
|
26
|
+
# determine actual versions
|
27
|
+
ruby_version=$(ruby -v)
|
28
|
+
rubygems_version=$(gem -v)
|
29
|
+
bundler_version=$(bundler -v | sed 's/Bundler version //')
|
30
|
+
|
31
|
+
# debug output
|
32
|
+
echo "====================="
|
33
|
+
echo "Target Ruby version: $version"
|
34
|
+
echo ""
|
35
|
+
echo "Ruby: $ruby_version"
|
36
|
+
echo "rubygems: $rubygems_version"
|
37
|
+
echo "Bundler: $bundler_version"
|
38
|
+
echo "====================="
|
39
|
+
echo ""
|
40
|
+
|
41
|
+
# version checks (minimum versions to make 'BUNDLED WITH' in Gemfile.lock work correctly)
|
42
|
+
if [ $(version $rubygems_version) -lt $(version "3.3.0") ]; then
|
43
|
+
echo "Please ensure that your rubygems version is > 3.3.0 for Ruby $ruby_version!"
|
44
|
+
echo "Install newest version:"
|
45
|
+
echo "gem update --system"
|
46
|
+
echo "Install specific version:"
|
47
|
+
echo "gem update --system <version>"
|
48
|
+
exit 1
|
49
|
+
fi
|
50
|
+
|
51
|
+
if [ $(version $bundler_version) -lt $(version "2.3.0") ]; then
|
52
|
+
echo "Please ensure that your Bundler version is > 2.3.0 for Ruby $ruby_version!"
|
53
|
+
echo "Install newest version:"
|
54
|
+
echo "gem install bundler"
|
55
|
+
echo "Install specific version:"
|
56
|
+
echo "gem install bundler:<version>"
|
57
|
+
exit 1
|
58
|
+
fi
|
59
|
+
|
60
|
+
# bundle and run specs
|
61
|
+
rake matrix:install
|
62
|
+
rake matrix:spec
|
63
|
+
done
|
64
|
+
|
65
|
+
exit 0
|
data/lib/gemika/version.rb
CHANGED
@@ -54,7 +54,7 @@ jobs:
|
|
54
54
|
mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
|
55
55
|
- name: Bundle
|
56
56
|
run: |
|
57
|
-
gem install bundler:2.
|
57
|
+
gem install bundler:2.3.1
|
58
58
|
bundle install --no-deployment
|
59
59
|
- name: Run tests
|
60
60
|
run: bundle exec rspec
|
@@ -99,7 +99,7 @@ jobs:
|
|
99
99
|
PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
|
100
100
|
- name: Bundle
|
101
101
|
run: |
|
102
|
-
gem install bundler:2.
|
102
|
+
gem install bundler:2.3.1
|
103
103
|
bundle install --no-deployment
|
104
104
|
- name: Run tests
|
105
105
|
run: bundle exec rspec
|
@@ -123,7 +123,7 @@ jobs:
|
|
123
123
|
ruby-version: "${{ matrix.ruby }}"
|
124
124
|
- name: Bundle
|
125
125
|
run: |
|
126
|
-
gem install bundler:2.
|
126
|
+
gem install bundler:2.3.1
|
127
127
|
bundle install --no-deployment
|
128
128
|
- name: Run tests
|
129
129
|
run: bundle exec rspec
|
metadata
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemika
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Helpers for testing Ruby gems
|
14
14
|
email: henning.koch@makandra.de
|
15
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- matrix
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
@@ -35,6 +36,7 @@ files:
|
|
35
36
|
- LICENSE
|
36
37
|
- README.md
|
37
38
|
- Rakefile
|
39
|
+
- bin/matrix
|
38
40
|
- doc/minidusen_test.png
|
39
41
|
- gemika.gemspec
|
40
42
|
- lib/gemika.rb
|
@@ -102,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
104
|
- !ruby/object:Gem::Version
|
103
105
|
version: '0'
|
104
106
|
requirements: []
|
105
|
-
rubygems_version: 3.4.
|
107
|
+
rubygems_version: 3.4.14
|
106
108
|
signing_key:
|
107
109
|
specification_version: 4
|
108
110
|
summary: Helpers for testing Ruby gems
|