gemika 0.3.4 → 0.4.0

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.
@@ -1,46 +1,45 @@
1
1
  language: ruby
2
2
 
3
- rvm:
4
- - 1.8.7
5
- - 2.1.8
6
- - 2.2.4
7
- - 2.3.1
8
-
9
- gemfile:
10
- - gemfiles/Gemfile.2.3.mysql2
11
- - gemfiles/Gemfile.3.2.mysql2
12
- - gemfiles/Gemfile.4.2.mysql2
13
- - gemfiles/Gemfile.4.2.pg
14
- - gemfiles/Gemfile.5.0.mysql2
15
- - gemfiles/Gemfile.5.0.pg
16
- - gemfiles/Gemfile.5.0.sqlite3
3
+ dist: trusty
17
4
 
18
5
  matrix:
19
- exclude:
20
- - gemfile: gemfiles/Gemfile.2.3.mysql2
21
- rvm: 2.1.8
22
- - gemfile: gemfiles/Gemfile.2.3.mysql2
23
- rvm: 2.2.4
24
- - gemfile: gemfiles/Gemfile.2.3.mysql2
25
- rvm: 2.3.1
26
- - gemfile: gemfiles/Gemfile.3.2.mysql2
27
- rvm: 2.3.1
28
- - gemfile: gemfiles/Gemfile.4.2.mysql2
29
- rvm: 1.8.7
30
- - gemfile: gemfiles/Gemfile.4.2.pg
6
+ include:
7
+ # Rails 2.3
8
+ - gemfile: Gemfile.2.3.mysql2
31
9
  rvm: 1.8.7
32
- - gemfile: gemfiles/Gemfile.5.0.mysql2
10
+ # Rails 3.2
11
+ - gemfile: Gemfile.3.2.mysql2
33
12
  rvm: 1.8.7
34
- - gemfile: gemfiles/Gemfile.5.0.pg
35
- rvm: 1.8.7
36
- - gemfile: gemfiles/Gemfile.5.0.sqlite3
37
- rvm: 1.8.7
38
- - gemfile: gemfiles/Gemfile.5.0.mysql2
13
+ - gemfile: Gemfile.3.2.mysql2
39
14
  rvm: 2.1.8
40
- - gemfile: gemfiles/Gemfile.5.0.pg
15
+ - gemfile: Gemfile.3.2.mysql2
16
+ rvm: 2.2.4
17
+ # Rails 4.2
18
+ - gemfile: Gemfile.4.2.mysql2
41
19
  rvm: 2.1.8
42
- - gemfile: gemfiles/Gemfile.5.0.sqlite3
20
+ - gemfile: Gemfile.4.2.pg
43
21
  rvm: 2.1.8
22
+ - gemfile: Gemfile.4.2.mysql2
23
+ rvm: 2.2.4
24
+ - gemfile: Gemfile.4.2.pg
25
+ rvm: 2.2.4
26
+ - gemfile: Gemfile.4.2.mysql2
27
+ rvm: 2.3.1
28
+ - gemfile: Gemfile.4.2.pg
29
+ rvm: 2.3.1
30
+ # Rails 5.0
31
+ - gemfile: Gemfile.5.0.mysql2
32
+ rvm: 2.2.4
33
+ - gemfile: Gemfile.5.0.pg
34
+ rvm: 2.2.4
35
+ - gemfile: Gemfile.5.0.sqlite3
36
+ rvm: 2.2.4
37
+ - gemfile: Gemfile.5.0.mysql2
38
+ rvm: 2.3.1
39
+ - gemfile: Gemfile.5.0.pg
40
+ rvm: 2.3.1
41
+ - gemfile: Gemfile.5.0.sqlite3
42
+ rvm: 2.3.1
44
43
 
45
44
  install:
46
45
  # Replace default Travis CI bundler script with a version that doesn't
@@ -57,6 +56,3 @@ sudo: false
57
56
 
58
57
  cache: bundler
59
58
 
60
- notifications:
61
- email:
62
- - fail@makandra.de
@@ -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.
@@ -12,6 +12,7 @@ gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
12
12
  # Development dependencies
13
13
  gem 'rake', '=10.0.4'
14
14
  gem 'database_cleaner'
15
+ gem 'pry'
15
16
 
16
17
  # Gem under test
17
- gem 'gemika', :path => '..'
18
+ gem 'gemika', :path => '.'
@@ -1,7 +1,7 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
- gemika (0.3.0)
4
+ gemika (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,11 +9,18 @@ GEM
9
9
  activerecord (2.3.18)
10
10
  activesupport (= 2.3.18)
11
11
  activesupport (2.3.18)
12
+ coderay (1.1.2)
12
13
  database_cleaner (1.0.1)
13
14
  i18n (0.6.11)
15
+ method_source (0.9.2)
14
16
  mysql2 (0.2.20)
17
+ pry (0.9.12.6)
18
+ coderay (~> 1.0)
19
+ method_source (~> 0.8)
20
+ slop (~> 3.4)
15
21
  rake (10.0.4)
16
22
  rspec (1.3.2)
23
+ slop (3.6.0)
17
24
 
18
25
  PLATFORMS
19
26
  ruby
@@ -24,6 +31,7 @@ DEPENDENCIES
24
31
  gemika!
25
32
  i18n (= 0.6.11)
26
33
  mysql2 (= 0.2.20)
34
+ pry
27
35
  rake (= 10.0.4)
28
36
  rspec (~> 1.3.0)
29
37
 
@@ -31,4 +39,4 @@ RUBY VERSION
31
39
  ruby 1.8.7p375
32
40
 
33
41
  BUNDLED WITH
34
- 1.12.5
42
+ 1.17.3
@@ -12,6 +12,7 @@ gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
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,7 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
- gemika (0.3.4)
4
+ gemika (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -19,11 +19,17 @@ GEM
19
19
  multi_json (~> 1.0)
20
20
  arel (3.0.3)
21
21
  builder (3.0.4)
22
+ coderay (1.1.2)
22
23
  database_cleaner (1.0.1)
23
24
  diff-lcs (1.2.5)
24
25
  i18n (0.6.11)
26
+ method_source (0.9.2)
25
27
  multi_json (1.12.1)
26
28
  mysql2 (0.3.17)
29
+ pry (0.9.12.6)
30
+ coderay (~> 1.0)
31
+ method_source (~> 0.8)
32
+ slop (~> 3.4)
27
33
  rake (10.0.4)
28
34
  rspec (3.5.0)
29
35
  rspec-core (~> 3.5.0)
@@ -38,6 +44,7 @@ GEM
38
44
  diff-lcs (>= 1.2.0, < 2.0)
39
45
  rspec-support (~> 3.5.0)
40
46
  rspec-support (3.5.0)
47
+ slop (3.6.0)
41
48
  tzinfo (0.3.51)
42
49
 
43
50
  PLATFORMS
@@ -49,6 +56,7 @@ DEPENDENCIES
49
56
  gemika!
50
57
  i18n (= 0.6.11)
51
58
  mysql2 (= 0.3.17)
59
+ pry
52
60
  rake (= 10.0.4)
53
61
  rspec (~> 3.4)
54
62
 
@@ -56,4 +64,4 @@ RUBY VERSION
56
64
  ruby 1.8.7p375
57
65
 
58
66
  BUNDLED WITH
59
- 1.16.1
67
+ 1.17.3
@@ -11,6 +11,7 @@ gem 'mysql2', '~> 0.3.17'
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.4.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
  mysql2 (0.3.21)
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
  mysql2 (~> 0.3.17)
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
+ 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.4)
4
+ gemika (0.4.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.16.1
69
+ 1.17.3
@@ -11,6 +11,7 @@ gem 'mysql2', '~>0.4.4'
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.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -18,12 +18,17 @@ GEM
18
18
  minitest (~> 5.1)
19
19
  tzinfo (~> 1.1)
20
20
  arel (7.1.2)
21
+ coderay (1.1.2)
21
22
  concurrent-ruby (1.0.2)
22
23
  database_cleaner (1.5.3)
23
24
  diff-lcs (1.2.5)
24
25
  i18n (0.7.0)
26
+ method_source (0.9.2)
25
27
  minitest (5.9.0)
26
28
  mysql2 (0.4.4)
29
+ pry (0.12.2)
30
+ coderay (~> 1.1.0)
31
+ method_source (~> 0.9.0)
27
32
  rake (11.3.0)
28
33
  rspec (3.5.0)
29
34
  rspec-core (~> 3.5.0)
@@ -50,6 +55,7 @@ DEPENDENCIES
50
55
  database_cleaner
51
56
  gemika!
52
57
  mysql2 (~> 0.4.4)
58
+ pry
53
59
  rake
54
60
  rspec (~> 3.5)
55
61
 
@@ -57,4 +63,4 @@ RUBY VERSION
57
63
  ruby 2.2.4p230
58
64
 
59
65
  BUNDLED WITH
60
- 1.16.1
66
+ 1.17.3
@@ -11,6 +11,7 @@ gem 'pg', '~>0.18.4'
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.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -18,12 +18,17 @@ GEM
18
18
  minitest (~> 5.1)
19
19
  tzinfo (~> 1.1)
20
20
  arel (7.1.2)
21
+ coderay (1.1.2)
21
22
  concurrent-ruby (1.0.2)
22
23
  database_cleaner (1.5.3)
23
24
  diff-lcs (1.2.5)
24
25
  i18n (0.7.0)
26
+ method_source (0.9.2)
25
27
  minitest (5.9.0)
26
28
  pg (0.18.4)
29
+ pry (0.12.2)
30
+ coderay (~> 1.1.0)
31
+ method_source (~> 0.9.0)
27
32
  rake (11.3.0)
28
33
  rspec (3.5.0)
29
34
  rspec-core (~> 3.5.0)
@@ -50,6 +55,7 @@ DEPENDENCIES
50
55
  database_cleaner
51
56
  gemika!
52
57
  pg (~> 0.18.4)
58
+ pry
53
59
  rake
54
60
  rspec (~> 3.5)
55
61
 
@@ -57,4 +63,4 @@ RUBY VERSION
57
63
  ruby 2.2.4p230
58
64
 
59
65
  BUNDLED WITH
60
- 1.16.1
66
+ 1.17.3
@@ -11,6 +11,7 @@ gem 'sqlite3'
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,5 +1,5 @@
1
1
  PATH
2
- remote: ..
2
+ remote: .
3
3
  specs:
4
4
  gemika (0.3.4)
5
5
 
@@ -18,12 +18,17 @@ GEM
18
18
  minitest (~> 5.1)
19
19
  tzinfo (~> 1.1)
20
20
  arel (7.1.4)
21
+ coderay (1.1.2)
21
22
  concurrent-ruby (1.0.5)
22
23
  database_cleaner (1.7.0)
23
24
  diff-lcs (1.3)
24
25
  i18n (1.0.1)
25
26
  concurrent-ruby (~> 1.0)
27
+ method_source (0.9.2)
26
28
  minitest (5.11.3)
29
+ pry (0.12.2)
30
+ coderay (~> 1.1.0)
31
+ method_source (~> 0.9.0)
27
32
  rake (12.3.1)
28
33
  rspec (3.7.0)
29
34
  rspec-core (~> 3.7.0)
@@ -50,6 +55,7 @@ DEPENDENCIES
50
55
  activerecord (~> 5.0.0)
51
56
  database_cleaner
52
57
  gemika!
58
+ pry
53
59
  rake
54
60
  rspec (~> 3.5)
55
61
  sqlite3
@@ -58,4 +64,4 @@ RUBY VERSION
58
64
  ruby 2.2.4p230
59
65
 
60
66
  BUNDLED WITH
61
- 1.16.1
67
+ 1.17.3
data/README.md CHANGED
@@ -43,14 +43,14 @@ Gemika also makes some assumption about your Gem:
43
43
  Below you can see the directory of a gem with a completed Gemika testing setup. The next section describes how to get there:
44
44
 
45
45
  ```shell
46
- gemfiles/Gemfile.set1 # First dependency set. Should include development dependencies and gemika.
47
- gemfiles/Gemfile.set1.lock # Generated by `rake matrix:install`
48
- gemfiles/Gemfile.set2 # Second dependency set. Should include development dependencies and gemika.
49
- gemfiles/Gemfile.set2.lock # Generated by `rake matrix:install`
50
- gemfiles/Gemfile.set3 # Third dependency set. Should include development dependencies and gemika.
51
- gemfiles/Gemfile.set3.lock # Generated by `rake matrix:install`
52
- Gemfile -> gemfiles/Gemfile.set2 # Symlink to default Gemfile for development
53
- Gemfile.lock -> gemfiles/Gemfile.set2.lock # Symlink to default Gemfile.lock for development
46
+ Gemfile.set1 # First dependency set. Should include development dependencies and gemika.
47
+ Gemfile.set1.lock # Generated by `rake matrix:install`
48
+ Gemfile.set2 # Second dependency set. Should include development dependencies and gemika.
49
+ Gemfile.set2.lock # Generated by `rake matrix:install`
50
+ Gemfile.set3 # Third dependency set. Should include development dependencies and gemika.
51
+ Gemfile.set3.lock # Generated by `rake matrix:install`
52
+ Gemfile -> Gemfile.set2 # Symlink to default Gemfile for development
53
+ Gemfile.lock -> Gemfile.set2.lock # Symlink to default Gemfile.lock for development
54
54
  .ruby-version # Default Ruby version for development
55
55
  .gitignore # Should ignore spec/support/database.yml
56
56
  .travis.yml # Configures all tested Ruby / gemfile combinations, for both local development and Travis CI
@@ -136,21 +136,16 @@ task :default => 'matrix:spec'
136
136
  ### Define multiple dependency sets
137
137
 
138
138
  We are now creating one `Gemfile` for each set of gems and database type you'd like to test again.
139
+ Your gemfiles should be placed directly in your project's root directory.
139
140
 
140
- First, create a directory for the gemfiles:
141
-
142
- ```shell
143
- mkdir gemfiles
144
- ```
145
-
146
- For each dependency set, create a `Gemfile` in the `gemfiles` directory that contains:
141
+ For each dependency set, create a `Gemfile` in the project root directory that contains:
147
142
 
148
143
  1. The runtime dependencies you'd like to test against (e.g. Rails 5)
149
- 2. The development dependencies for that set (e.g. `rspec`) in a version that is compatible with these runtime gependencies.
144
+ 2. The development dependencies for that set (e.g. `rspec`) in a version that is compatible with these runtime dependencies.
150
145
  3. The `gemika` gem
151
- 4. Your own gem from path `..`
152
-
153
- For instance, if one dependency set is Rails 3.2 with a MySQL database, we would create `gemfiles/Gemfile.4.2.mysql2` with these contents:
146
+ 4. Your own gem from path `.`
147
+
148
+ For instance, if one dependency set is Rails 3.2 with a MySQL database, we would create `./Gemfile.4.2.mysql2` with these contents:
154
149
 
155
150
  ```ruby
156
151
  source 'https://rubygems.org'
@@ -166,10 +161,10 @@ gem 'byebug'
166
161
  gem 'gemika'
167
162
 
168
163
  # Gem under test
169
- gem 'my_gem', :path => '..'
164
+ gem 'my_gem', :path => '.'
170
165
  ```
171
166
 
172
- If a second dependency is Rails 5.0 with a PostgreSQL database, we would create `gemfiles/Gemfile.5.0.pg` with these contents:
167
+ If a second dependency is Rails 5.0 with a PostgreSQL database, we would create `./Gemfile.5.0.pg` with these contents:
173
168
 
174
169
  ```ruby
175
170
  source 'https://rubygems.org'
@@ -185,14 +180,14 @@ gem 'byebug'
185
180
  gem 'gemika'
186
181
 
187
182
  # Gem under test
188
- gem 'my_gem', :path => '..'
183
+ gem 'my_gem', :path => '.'
189
184
  ```
190
185
 
191
- In this example, your `gemfiles` directory should now look like this:
186
+ In this example, your project directory should now also contain:
192
187
 
193
188
  ```
194
- gemfiles/Gemfile.4.2.mysql2
195
- gemfiles/Gemfile.5.0.pg
189
+ Gemfile.4.2.mysql2
190
+ Gemfile.5.0.pg
196
191
  ```
197
192
 
198
193
 
@@ -200,7 +195,7 @@ gemfiles/Gemfile.5.0.pg
200
195
 
201
196
  We will now define a test matrix that contains all permutations of gemfiles and tested Ruby versions.
202
197
 
203
- We store the matrix in a `.travis.yml` file, **even if the project is not using Travis CI**. This allows us to configure the matrix once and us it for both local developent and Travis CI builds.
198
+ We store the matrix in a `.travis.yml` file, **even if the project is not using Travis CI**. This allows us to configure the matrix once and us it for both local development and Travis CI builds.
204
199
 
205
200
  Create a `.travis.yml` that lists all gemfiles and Ruby versions you'd like to test against:
206
201
 
@@ -211,11 +206,11 @@ rvm:
211
206
  - 2.3.1
212
207
 
213
208
  gemfile:
214
- - gemfiles/Gemfile.3.2.mysql2
215
- - gemfiles/Gemfile.4.2.mysql2
216
- - gemfiles/Gemfile.4.2.pg
217
- - gemfiles/Gemfile.5.0.mysql2
218
- - gemfiles/Gemfile.5.0.pg
209
+ - Gemfile.3.2.mysql2
210
+ - Gemfile.4.2.mysql2
211
+ - Gemfile.4.2.pg
212
+ - Gemfile.5.0.mysql2
213
+ - Gemfile.5.0.pg
219
214
  ```
220
215
 
221
216
  Don't mind the `rvm` key if you're using a different version manager locally (like rbenv). Things will still work.
@@ -228,9 +223,9 @@ There might be incompatible combinations of gemfiles and Rubies, e.g. Rails 5.0
228
223
  ```yaml
229
224
  matrix:
230
225
  exclude:
231
- - gemfile: gemfiles/Gemfile.5.0.mysql2
226
+ - gemfile: Gemfile.5.0.mysql2
232
227
  rvm: 2.1.8
233
- - gemfile: gemfiles/Gemfile.5.0.pg
228
+ - gemfile: Gemfile.5.0.pg
234
229
  rvm: 2.1.8
235
230
  ```
236
231
 
@@ -242,13 +237,13 @@ Generate lockfiles for each bundle by running:
242
237
  rake matrix:install
243
238
  ```
244
239
 
245
- In this example, your `gemfiles` directory should now contain a lockfile for each gemfile:
240
+ In this example, your project directory should now contain a lockfile for each gemfile:
246
241
 
247
242
  ```
248
- gemfiles/Gemfile.4.2.mysql2
249
- gemfiles/Gemfile.4.2.mysql2.lock
250
- gemfiles/Gemfile.5.0.pg
251
- gemfiles/Gemfile.5.0.pg.lock
243
+ Gemfile.4.2.mysql2
244
+ Gemfile.4.2.mysql2.lock
245
+ Gemfile.5.0.pg
246
+ Gemfile.5.0.pg.lock
252
247
  ```
253
248
 
254
249
  Gemfiles and lockfiles should be committed to your repo.
@@ -269,8 +264,8 @@ Create a `.ruby-version` file with the default Ruby version:
269
264
  Choose a default dependency set and symlink both gemfile and lockfile to your project root:
270
265
 
271
266
  ```
272
- ln -s gemfiles/Gemfile.4.2.mysql2 Gemfile
273
- ln -s gemfiles/Gemfile.4.2.mysql2.lock Gemfile.lock
267
+ ln -s Gemfile.4.2.mysql2 Gemfile
268
+ ln -s Gemfile.4.2.mysql2.lock Gemfile.lock
274
269
  ```
275
270
 
276
271
  Commit both `.ruby-version` and symlinks to your repo.
@@ -295,6 +290,9 @@ postgresql:
295
290
  database: minidusen_test
296
291
  user:
297
292
  password:
293
+
294
+ sqlite:
295
+ database: ":memory:"
298
296
  ```
299
297
 
300
298
  We don't want to commit our local credentials, so add a line to your `.gitignore`:
@@ -431,8 +429,8 @@ rake matrix:spec
431
429
  Note that if your current Ruby version is *very* far away from your [default Ruby](#default-ruby-and-default-gemfile) in `.ruby-version`, you might need to run `rake` with a gemfile that has compatible dependencies:
432
430
 
433
431
  ```shell
434
- BUNDLE_GEMFILE=gemfiles/Gemfile.2.3 bundle exec rake matrix:install
435
- BUNDLE_GEMFILE=gemfiles/Gemfile.2.3 bundle exec rake matrix:spec
432
+ BUNDLE_GEMFILE=Gemfile.2.3 bundle exec rake matrix:install
433
+ BUNDLE_GEMFILE=Gemfile.2.3 bundle exec rake matrix:spec
436
434
  ```
437
435
 
438
436
  We recommend to setup Travis CI to check the entire test matrix after each push, including all Rubies. This way developers can stay on the [default Ruby and gemfile](#default-ruby-and-default-gemfile) most of the time while Travis CI checks make sure that nothing broken gets merged.
@@ -16,10 +16,12 @@ module Gemika
16
16
  def load_rows(options)
17
17
  path = options.fetch(:path, '.travis.yml')
18
18
  travis_yml = YAML.load_file(path)
19
- rubies = travis_yml.fetch('rvm')
20
- gemfiles = travis_yml.fetch('gemfile')
19
+ rubies = travis_yml.fetch('rvm', [])
20
+ gemfiles = travis_yml.fetch('gemfile', [])
21
21
  matrix_options = travis_yml.fetch('matrix', {})
22
+ includes = matrix_options.fetch('include', [])
22
23
  excludes = matrix_options.fetch('exclude', [])
24
+
23
25
  rows = []
24
26
  rubies.each do |ruby|
25
27
  gemfiles.each do |gemfile|
@@ -27,6 +29,8 @@ module Gemika
27
29
  rows << row unless excludes.include?(row)
28
30
  end
29
31
  end
32
+
33
+ rows = rows + includes
30
34
  rows = rows.map { |row| convert_row(row) }
31
35
  rows
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module Gemika
2
- VERSION = '0.3.4'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 2.1.8
3
+ - 2.3.1
4
+
5
+ gemfile:
6
+ - gemfiles/Gemfile1
7
+ - gemfiles/Gemfile2
8
+
9
+ matrix:
10
+ include:
11
+ - rvm: 2.6.3
12
+ gemfile: gemfiles/Gemfile3
@@ -131,6 +131,22 @@ EOF
131
131
  matrix.rows[2].gemfile.should == 'gemfiles/Gemfile2'
132
132
  end
133
133
 
134
+ it 'allows to include rows to the matrix' do
135
+ path = 'spec/fixtures/travis_yml/includes.yml'
136
+ matrix = Gemika::Matrix.from_travis_yml(:path => path, :validate => false)
137
+ matrix.rows.size.should == 5
138
+ matrix.rows[0].ruby.should == '2.1.8'
139
+ matrix.rows[0].gemfile.should == 'gemfiles/Gemfile1'
140
+ matrix.rows[1].ruby.should == '2.1.8'
141
+ matrix.rows[1].gemfile.should == 'gemfiles/Gemfile2'
142
+ matrix.rows[2].ruby.should == '2.3.1'
143
+ matrix.rows[2].gemfile.should == 'gemfiles/Gemfile1'
144
+ matrix.rows[3].ruby.should == '2.3.1'
145
+ matrix.rows[3].gemfile.should == 'gemfiles/Gemfile2'
146
+ matrix.rows[4].ruby.should == '2.6.3'
147
+ matrix.rows[4].gemfile.should == 'gemfiles/Gemfile3'
148
+ end
149
+
134
150
  it 'raises an error if a Gemfile does not exist' do
135
151
  path = 'spec/fixtures/travis_yml/missing_gemfile.yml'
136
152
  expect { Gemika::Matrix.from_travis_yml(:path => path) }.to raise_error(Gemika::MissingGemfile, /gemfile not found/i)
@@ -2,6 +2,7 @@ $: << File.join(File.dirname(__FILE__), "/../../lib" )
2
2
 
3
3
  require 'active_record'
4
4
  require 'gemika'
5
+ require 'pry'
5
6
 
6
7
  ActiveRecord::Base.default_timezone = :local
7
8
 
metadata CHANGED
@@ -1,45 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gemika
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 15
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - Henning Koch
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2018-08-29 00:00:00.000000000 Z
17
+
18
+ date: 2019-08-07 00:00:00 Z
12
19
  dependencies: []
20
+
13
21
  description: Helpers for testing Ruby gems
14
22
  email: henning.koch@makandra.de
15
23
  executables: []
24
+
16
25
  extensions: []
26
+
17
27
  extra_rdoc_files: []
18
- files:
19
- - ".gitignore"
20
- - ".rspec"
21
- - ".ruby-version"
22
- - ".travis.yml"
23
- - ".yardopts"
24
- - Gemfile.lock
28
+
29
+ files:
30
+ - .gitignore
31
+ - .rspec
32
+ - .ruby-version
33
+ - .travis.yml
34
+ - .yardopts
35
+ - CHANGELOG.md
36
+ - Gemfile.2.3.mysql2
37
+ - Gemfile.2.3.mysql2.lock
38
+ - Gemfile.3.2.mysql2
39
+ - Gemfile.3.2.mysql2.lock
40
+ - Gemfile.4.2.mysql2
41
+ - Gemfile.4.2.mysql2.lock
42
+ - Gemfile.4.2.pg
43
+ - Gemfile.4.2.pg.lock
44
+ - Gemfile.5.0.mysql2
45
+ - Gemfile.5.0.mysql2.lock
46
+ - Gemfile.5.0.pg
47
+ - Gemfile.5.0.pg.lock
48
+ - Gemfile.5.0.sqlite3
49
+ - Gemfile.5.0.sqlite3.lock
25
50
  - LICENSE
26
51
  - README.md
27
52
  - Rakefile
28
53
  - doc/minidusen_test.png
29
- - gemfiles/Gemfile.2.3.mysql2
30
- - gemfiles/Gemfile.2.3.mysql2.lock
31
- - gemfiles/Gemfile.3.2.mysql2
32
- - gemfiles/Gemfile.3.2.mysql2.lock
33
- - gemfiles/Gemfile.4.2.mysql2
34
- - gemfiles/Gemfile.4.2.mysql2.lock
35
- - gemfiles/Gemfile.4.2.pg
36
- - gemfiles/Gemfile.4.2.pg.lock
37
- - gemfiles/Gemfile.5.0.mysql2
38
- - gemfiles/Gemfile.5.0.mysql2.lock
39
- - gemfiles/Gemfile.5.0.pg
40
- - gemfiles/Gemfile.5.0.pg.lock
41
- - gemfiles/Gemfile.5.0.sqlite3
42
- - gemfiles/Gemfile.5.0.sqlite3.lock
43
54
  - gemika.gemspec
44
55
  - lib/gemika.rb
45
56
  - lib/gemika/database.rb
@@ -56,6 +67,7 @@ files:
56
67
  - spec/fixtures/travis_yml/Gemfile_without_gemika
57
68
  - spec/fixtures/travis_yml/excludes.yml
58
69
  - spec/fixtures/travis_yml/gemfile_without_gemika.yml
70
+ - spec/fixtures/travis_yml/includes.yml
59
71
  - spec/fixtures/travis_yml/missing_gemfile.yml
60
72
  - spec/fixtures/travis_yml/two_by_two.yml
61
73
  - spec/gemika/database_spec.rb
@@ -68,27 +80,38 @@ files:
68
80
  - spec/support/database.travis.yml
69
81
  - spec/support/models.rb
70
82
  homepage: https://github.com/makandra/gemika
71
- licenses:
83
+ licenses:
72
84
  - MIT
73
- metadata: {}
74
85
  post_install_message:
75
86
  rdoc_options: []
76
- require_paths:
87
+
88
+ require_paths:
77
89
  - lib
78
- required_ruby_version: !ruby/object:Gem::Requirement
79
- requirements:
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
80
93
  - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- required_rubygems_version: !ruby/object:Gem::Requirement
84
- requirements:
94
+ - !ruby/object:Gem::Version
95
+ hash: 3
96
+ segments:
97
+ - 0
98
+ version: "0"
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
85
102
  - - ">="
86
- - !ruby/object:Gem::Version
87
- version: '0'
103
+ - !ruby/object:Gem::Version
104
+ hash: 3
105
+ segments:
106
+ - 0
107
+ version: "0"
88
108
  requirements: []
109
+
89
110
  rubyforge_project:
90
- rubygems_version: 2.7.6
111
+ rubygems_version: 1.8.30
91
112
  signing_key:
92
- specification_version: 4
113
+ specification_version: 3
93
114
  summary: Helpers for testing Ruby gems
94
115
  test_files: []
116
+
117
+ has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA256:
3
- metadata.gz: 6c560743c889bf6b598685415ad4dbc94adfbad6570e3b6339df77bc0c875ca1
4
- data.tar.gz: 26ae03d7ebe63ebe866c10084fbc841deb2e4e51b5b6dfa41fd83e5cdb0e0990
5
- SHA512:
6
- metadata.gz: a199f7f00ee13cae08ee7b35f3b2bbe6f970643e2fb2e134c7f95418f75fcefd8573077780fdc344e2bf3b5128c767827d2ee6cc6cbf1a7331bddbef4b4a1198
7
- data.tar.gz: 4c2a678c94e8c52590efeb78aa251631c5c820ed5fb3f6e396e3e9838f51fc0181181dc2cc0a33564f532b33955e7bfe4dc4d3cc95aad508c24256038324b84a
@@ -1,63 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- gemika (0.3.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- activemodel (4.2.10)
10
- activesupport (= 4.2.10)
11
- builder (~> 3.1)
12
- activerecord (4.2.10)
13
- activemodel (= 4.2.10)
14
- activesupport (= 4.2.10)
15
- arel (~> 6.0)
16
- activesupport (4.2.10)
17
- i18n (~> 0.7)
18
- minitest (~> 5.1)
19
- thread_safe (~> 0.3, >= 0.3.4)
20
- tzinfo (~> 1.1)
21
- arel (6.0.4)
22
- builder (3.2.3)
23
- concurrent-ruby (1.0.5)
24
- database_cleaner (1.7.0)
25
- diff-lcs (1.3)
26
- i18n (0.9.5)
27
- concurrent-ruby (~> 1.0)
28
- minitest (5.11.3)
29
- pg (1.1.2)
30
- rake (12.3.1)
31
- rspec (3.8.0)
32
- rspec-core (~> 3.8.0)
33
- rspec-expectations (~> 3.8.0)
34
- rspec-mocks (~> 3.8.0)
35
- rspec-core (3.8.0)
36
- rspec-support (~> 3.8.0)
37
- rspec-expectations (3.8.1)
38
- diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.8.0)
40
- rspec-mocks (3.8.0)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.8.0)
43
- rspec-support (3.8.0)
44
- thread_safe (0.3.6)
45
- tzinfo (1.2.5)
46
- thread_safe (~> 0.1)
47
-
48
- PLATFORMS
49
- ruby
50
-
51
- DEPENDENCIES
52
- activerecord (~> 4.2.1)
53
- database_cleaner
54
- gemika!
55
- pg
56
- rake
57
- rspec (~> 3.4)
58
-
59
- RUBY VERSION
60
- ruby 2.2.4p230
61
-
62
- BUNDLED WITH
63
- 1.16.1