cucumber_factory 2.3.0 → 2.4.1
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 +63 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile +1 -1
- data/Gemfile.cucumber-1.3 +1 -1
- data/Gemfile.cucumber-1.3.lock +4 -4
- data/Gemfile.cucumber-2.4 +1 -1
- data/Gemfile.cucumber-2.4.lock +5 -5
- data/Gemfile.cucumber-3.0 +1 -1
- data/Gemfile.cucumber-3.0.lock +4 -4
- data/Gemfile.cucumber-3.1 +1 -1
- data/Gemfile.cucumber-3.1.lock +4 -4
- data/Gemfile.cucumber-4.1 +20 -0
- data/Gemfile.cucumber-4.1.lock +140 -0
- data/Gemfile.cucumber-5.3 +20 -0
- data/Gemfile.cucumber-5.3.lock +140 -0
- data/Gemfile.lock +1 -1
- data/Gemfile.rails-7 +20 -0
- data/Gemfile.rails-7.lock +138 -0
- data/README.md +5 -6
- data/cucumber_factory.gemspec +1 -0
- data/lib/cucumber_factory/factory.rb +6 -5
- data/lib/cucumber_factory/version.rb +1 -1
- data/spec/assets/symlink.txt +1 -1
- data/spec/cucumber_factory/steps_spec.rb +12 -3
- data/spec/support/database.github.yml +6 -0
- data/spec/support/database.sample.yml +3 -3
- metadata +13 -6
- data/.travis.yml +0 -32
- data/spec/support/database.travis.yml +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f76beddebb040ece5bb2d2abcdbfdf88faa7a8dbab377d5c629e90295e6cdc40
|
|
4
|
+
data.tar.gz: c6fd350598cb06ea39f2f9f1a56d097a17b0142a5c29eeb642b1da0ec9162403
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c44055b4383af7bf6ede22171f6750649ab5f86ec8fa62e519b1e65f975b1a22639e26822d7ef406d04635ea076fd81f4e5f5d143532b09c7e964a5149f00d4c
|
|
7
|
+
data.tar.gz: a655404558a255c6bbe71984d45f3495c98b00ed76f98aa3401dd324c7cbaad7ee6df5eadb9a97ddb6de4c1a94cc24dc10e4a56e48a39073f8b7795bd3057d75
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Tests
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-20.04
|
|
13
|
+
services:
|
|
14
|
+
postgres:
|
|
15
|
+
image: postgres:12.4
|
|
16
|
+
env:
|
|
17
|
+
POSTGRES_PASSWORD: postgres
|
|
18
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
19
|
+
ports:
|
|
20
|
+
- 5432:5432
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
- ruby: 2.5.3
|
|
26
|
+
gemfile: Gemfile.cucumber-1.3
|
|
27
|
+
- ruby: 2.5.3
|
|
28
|
+
gemfile: Gemfile.cucumber-2.4
|
|
29
|
+
- ruby: 2.5.3
|
|
30
|
+
gemfile: Gemfile.cucumber-3.0
|
|
31
|
+
- ruby: 2.5.3
|
|
32
|
+
gemfile: Gemfile.cucumber-3.1
|
|
33
|
+
|
|
34
|
+
- ruby: 2.6.6
|
|
35
|
+
gemfile: Gemfile.cucumber-4.1
|
|
36
|
+
|
|
37
|
+
- ruby: 2.7.2
|
|
38
|
+
gemfile: Gemfile.cucumber-5.3
|
|
39
|
+
|
|
40
|
+
- ruby: 3.0.0
|
|
41
|
+
gemfile: Gemfile.cucumber-4.1
|
|
42
|
+
- ruby: 3.0.0
|
|
43
|
+
gemfile: Gemfile.cucumber-5.3
|
|
44
|
+
- ruby: 3.0.0
|
|
45
|
+
gemfile: Gemfile.rails-7
|
|
46
|
+
env:
|
|
47
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v2
|
|
50
|
+
- name: Install ruby
|
|
51
|
+
uses: ruby/setup-ruby@v1
|
|
52
|
+
with:
|
|
53
|
+
ruby-version: "${{ matrix.ruby }}"
|
|
54
|
+
- name: Setup database
|
|
55
|
+
run: |
|
|
56
|
+
sudo apt-get install -y postgresql-client
|
|
57
|
+
PGPASSWORD=postgres psql -c 'create database cucumber_factory_test;' -U postgres -p 5432 -h localhost
|
|
58
|
+
- name: Bundle
|
|
59
|
+
run: |
|
|
60
|
+
gem install bundler:1.17.3
|
|
61
|
+
bundle install --no-deployment
|
|
62
|
+
- name: Run tests
|
|
63
|
+
run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,24 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
|
15
15
|
|
|
16
16
|
-
|
|
17
17
|
|
|
18
|
+
## 2.4.1 - 2022-03-16
|
|
19
|
+
|
|
20
|
+
### Compatible changes
|
|
21
|
+
|
|
22
|
+
- Enabled MFA for RubyGems
|
|
23
|
+
|
|
24
|
+
## 2.4.0 - 2021-03-30
|
|
25
|
+
|
|
26
|
+
### Compatible changes
|
|
27
|
+
|
|
28
|
+
- Added support for ActiveRecord >= 6.
|
|
29
|
+
|
|
30
|
+
## 2.3.1 - 2020-10-01
|
|
31
|
+
|
|
32
|
+
### Compatible changes
|
|
33
|
+
|
|
34
|
+
- Lowered the priority of all steps in this gem to avoid issues with overlapping steps.
|
|
35
|
+
|
|
18
36
|
## 2.3.0 - 2020-09-24
|
|
19
37
|
|
|
20
38
|
### Compatible changes
|
data/Gemfile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Gemfile.cucumber-2.4
|
data/Gemfile.cucumber-1.3
CHANGED
data/Gemfile.cucumber-1.3.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cucumber_factory (2.
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
cucumber
|
|
@@ -41,7 +41,7 @@ GEM
|
|
|
41
41
|
diff-lcs (1.3)
|
|
42
42
|
factory_bot (4.11.1)
|
|
43
43
|
activesupport (>= 3.0.0)
|
|
44
|
-
gemika (0.
|
|
44
|
+
gemika (0.5.0)
|
|
45
45
|
gherkin (2.12.2)
|
|
46
46
|
multi_json (~> 1.3)
|
|
47
47
|
i18n (0.9.5)
|
|
@@ -52,7 +52,7 @@ GEM
|
|
|
52
52
|
minitest (5.12.0)
|
|
53
53
|
multi_json (1.14.1)
|
|
54
54
|
multi_test (0.1.2)
|
|
55
|
-
|
|
55
|
+
pg (0.21.0)
|
|
56
56
|
rake (12.3.3)
|
|
57
57
|
rspec (3.9.0)
|
|
58
58
|
rspec-core (~> 3.9.0)
|
|
@@ -83,7 +83,7 @@ DEPENDENCIES
|
|
|
83
83
|
database_cleaner (~> 1.0.0)
|
|
84
84
|
factory_bot (< 5)
|
|
85
85
|
gemika
|
|
86
|
-
|
|
86
|
+
pg (< 1)
|
|
87
87
|
rake (>= 10.0.4)
|
|
88
88
|
rspec (> 3.0)
|
|
89
89
|
|
data/Gemfile.cucumber-2.4
CHANGED
data/Gemfile.cucumber-2.4.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cucumber_factory (2.
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
cucumber
|
|
@@ -46,7 +46,7 @@ GEM
|
|
|
46
46
|
diff-lcs (1.3)
|
|
47
47
|
factory_bot (4.11.1)
|
|
48
48
|
activesupport (>= 3.0.0)
|
|
49
|
-
gemika (0.
|
|
49
|
+
gemika (0.5.0)
|
|
50
50
|
gherkin (4.1.3)
|
|
51
51
|
i18n (0.9.5)
|
|
52
52
|
concurrent-ruby (~> 1.0)
|
|
@@ -56,7 +56,7 @@ GEM
|
|
|
56
56
|
minitest (5.11.3)
|
|
57
57
|
multi_json (1.13.1)
|
|
58
58
|
multi_test (0.1.2)
|
|
59
|
-
|
|
59
|
+
pg (0.21.0)
|
|
60
60
|
rake (12.3.0)
|
|
61
61
|
rspec (3.7.0)
|
|
62
62
|
rspec-core (~> 3.7.0)
|
|
@@ -87,9 +87,9 @@ DEPENDENCIES
|
|
|
87
87
|
database_cleaner
|
|
88
88
|
factory_bot (< 5)
|
|
89
89
|
gemika
|
|
90
|
-
|
|
90
|
+
pg (< 1)
|
|
91
91
|
rake
|
|
92
92
|
rspec (~> 3.0)
|
|
93
93
|
|
|
94
94
|
BUNDLED WITH
|
|
95
|
-
|
|
95
|
+
2.3.0
|
data/Gemfile.cucumber-3.0
CHANGED
data/Gemfile.cucumber-3.0.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cucumber_factory (2.
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
cucumber
|
|
@@ -51,7 +51,7 @@ GEM
|
|
|
51
51
|
diff-lcs (1.3)
|
|
52
52
|
factory_bot (5.1.1)
|
|
53
53
|
activesupport (>= 4.2.0)
|
|
54
|
-
gemika (0.
|
|
54
|
+
gemika (0.5.0)
|
|
55
55
|
gherkin (4.1.3)
|
|
56
56
|
i18n (0.9.5)
|
|
57
57
|
concurrent-ruby (~> 1.0)
|
|
@@ -61,7 +61,7 @@ GEM
|
|
|
61
61
|
minitest (5.11.3)
|
|
62
62
|
multi_json (1.13.1)
|
|
63
63
|
multi_test (0.1.2)
|
|
64
|
-
|
|
64
|
+
pg (0.21.0)
|
|
65
65
|
rake (12.3.0)
|
|
66
66
|
rspec (3.7.0)
|
|
67
67
|
rspec-core (~> 3.7.0)
|
|
@@ -92,7 +92,7 @@ DEPENDENCIES
|
|
|
92
92
|
database_cleaner
|
|
93
93
|
factory_bot
|
|
94
94
|
gemika
|
|
95
|
-
|
|
95
|
+
pg (< 1)
|
|
96
96
|
rake
|
|
97
97
|
rspec (~> 3.0)
|
|
98
98
|
|
data/Gemfile.cucumber-3.1
CHANGED
data/Gemfile.cucumber-3.1.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cucumber_factory (2.
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
cucumber
|
|
@@ -51,7 +51,7 @@ GEM
|
|
|
51
51
|
diff-lcs (1.3)
|
|
52
52
|
factory_bot (5.1.1)
|
|
53
53
|
activesupport (>= 4.2.0)
|
|
54
|
-
gemika (0.
|
|
54
|
+
gemika (0.5.0)
|
|
55
55
|
gherkin (5.0.0)
|
|
56
56
|
i18n (0.9.5)
|
|
57
57
|
concurrent-ruby (~> 1.0)
|
|
@@ -61,7 +61,7 @@ GEM
|
|
|
61
61
|
minitest (5.11.3)
|
|
62
62
|
multi_json (1.13.1)
|
|
63
63
|
multi_test (0.1.2)
|
|
64
|
-
|
|
64
|
+
pg (1.2.3)
|
|
65
65
|
rake (12.3.0)
|
|
66
66
|
rspec (3.7.0)
|
|
67
67
|
rspec-core (~> 3.7.0)
|
|
@@ -92,7 +92,7 @@ DEPENDENCIES
|
|
|
92
92
|
database_cleaner
|
|
93
93
|
factory_bot
|
|
94
94
|
gemika
|
|
95
|
-
|
|
95
|
+
pg
|
|
96
96
|
rake
|
|
97
97
|
rspec (~> 3.0)
|
|
98
98
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Runtime dependencies
|
|
4
|
+
gem 'cucumber', '~> 4.1.0'
|
|
5
|
+
gem 'activesupport', '~> 6.0.0'
|
|
6
|
+
gem 'activerecord', '~> 6.0.0'
|
|
7
|
+
gem 'pg'
|
|
8
|
+
|
|
9
|
+
# Development dependencies
|
|
10
|
+
gem 'rspec', '~> 3.0'
|
|
11
|
+
gem 'rake'
|
|
12
|
+
gem 'database_cleaner'
|
|
13
|
+
gem 'gemika'
|
|
14
|
+
|
|
15
|
+
# Test dependencies
|
|
16
|
+
gem 'factory_bot'
|
|
17
|
+
gem 'carrierwave'
|
|
18
|
+
|
|
19
|
+
# Gem under test
|
|
20
|
+
gem 'cucumber_factory', :path => '.'
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
|
+
activerecord
|
|
6
|
+
activesupport
|
|
7
|
+
cucumber
|
|
8
|
+
cucumber_priority (>= 0.2.0)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
activemodel (6.0.3.6)
|
|
14
|
+
activesupport (= 6.0.3.6)
|
|
15
|
+
activerecord (6.0.3.6)
|
|
16
|
+
activemodel (= 6.0.3.6)
|
|
17
|
+
activesupport (= 6.0.3.6)
|
|
18
|
+
activesupport (6.0.3.6)
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
i18n (>= 0.7, < 2)
|
|
21
|
+
minitest (~> 5.1)
|
|
22
|
+
tzinfo (~> 1.1)
|
|
23
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
24
|
+
addressable (2.7.0)
|
|
25
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
26
|
+
builder (3.2.4)
|
|
27
|
+
carrierwave (2.2.1)
|
|
28
|
+
activemodel (>= 5.0.0)
|
|
29
|
+
activesupport (>= 5.0.0)
|
|
30
|
+
addressable (~> 2.6)
|
|
31
|
+
image_processing (~> 1.1)
|
|
32
|
+
marcel (~> 1.0.0)
|
|
33
|
+
mini_mime (>= 0.1.3)
|
|
34
|
+
ssrf_filter (~> 1.0)
|
|
35
|
+
concurrent-ruby (1.1.8)
|
|
36
|
+
cucumber (4.1.0)
|
|
37
|
+
builder (~> 3.2, >= 3.2.3)
|
|
38
|
+
cucumber-core (~> 7.1, >= 7.1.0)
|
|
39
|
+
cucumber-create-meta (~> 1.0.0, >= 1.0.0)
|
|
40
|
+
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
|
|
41
|
+
cucumber-gherkin (~> 14.0, >= 14.0.1)
|
|
42
|
+
cucumber-html-formatter (~> 7.0, >= 7.0.0)
|
|
43
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
|
44
|
+
cucumber-wire (~> 3.1, >= 3.1.0)
|
|
45
|
+
diff-lcs (~> 1.3, >= 1.3, < 1.4)
|
|
46
|
+
multi_test (~> 0.1, >= 0.1.2)
|
|
47
|
+
sys-uname (~> 1.0, >= 1.0.2)
|
|
48
|
+
cucumber-core (7.1.0)
|
|
49
|
+
cucumber-gherkin (~> 14.0, >= 14.0.1)
|
|
50
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
|
51
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
|
52
|
+
cucumber-create-meta (1.0.0)
|
|
53
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
|
54
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
|
55
|
+
cucumber-cucumber-expressions (10.3.0)
|
|
56
|
+
cucumber-gherkin (14.2.0)
|
|
57
|
+
cucumber-messages (~> 12.4, >= 12.4.0)
|
|
58
|
+
cucumber-html-formatter (7.2.0)
|
|
59
|
+
cucumber-messages (~> 12.4, >= 12.4.0)
|
|
60
|
+
cucumber-messages (12.4.0)
|
|
61
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
|
62
|
+
cucumber-tag-expressions (2.0.4)
|
|
63
|
+
cucumber-wire (3.1.0)
|
|
64
|
+
cucumber-core (~> 7.1, >= 7.1.0)
|
|
65
|
+
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
|
|
66
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
|
67
|
+
cucumber_priority (0.3.2)
|
|
68
|
+
cucumber
|
|
69
|
+
database_cleaner (2.0.1)
|
|
70
|
+
database_cleaner-active_record (~> 2.0.0)
|
|
71
|
+
database_cleaner-active_record (2.0.0)
|
|
72
|
+
activerecord (>= 5.a)
|
|
73
|
+
database_cleaner-core (~> 2.0.0)
|
|
74
|
+
database_cleaner-core (2.0.1)
|
|
75
|
+
diff-lcs (1.3)
|
|
76
|
+
factory_bot (6.1.0)
|
|
77
|
+
activesupport (>= 5.0.0)
|
|
78
|
+
ffi (1.15.0)
|
|
79
|
+
gemika (0.5.0)
|
|
80
|
+
i18n (1.8.9)
|
|
81
|
+
concurrent-ruby (~> 1.0)
|
|
82
|
+
image_processing (1.12.1)
|
|
83
|
+
mini_magick (>= 4.9.5, < 5)
|
|
84
|
+
ruby-vips (>= 2.0.17, < 3)
|
|
85
|
+
marcel (1.0.0)
|
|
86
|
+
middleware (0.1.0)
|
|
87
|
+
mini_magick (4.11.0)
|
|
88
|
+
mini_mime (1.0.3)
|
|
89
|
+
minitest (5.14.4)
|
|
90
|
+
multi_test (0.1.2)
|
|
91
|
+
pg (1.2.3)
|
|
92
|
+
protobuf-cucumber (3.10.8)
|
|
93
|
+
activesupport (>= 3.2)
|
|
94
|
+
middleware
|
|
95
|
+
thor
|
|
96
|
+
thread_safe
|
|
97
|
+
public_suffix (4.0.6)
|
|
98
|
+
rake (13.0.3)
|
|
99
|
+
rspec (3.10.0)
|
|
100
|
+
rspec-core (~> 3.10.0)
|
|
101
|
+
rspec-expectations (~> 3.10.0)
|
|
102
|
+
rspec-mocks (~> 3.10.0)
|
|
103
|
+
rspec-core (3.10.1)
|
|
104
|
+
rspec-support (~> 3.10.0)
|
|
105
|
+
rspec-expectations (3.10.1)
|
|
106
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
107
|
+
rspec-support (~> 3.10.0)
|
|
108
|
+
rspec-mocks (3.10.2)
|
|
109
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
110
|
+
rspec-support (~> 3.10.0)
|
|
111
|
+
rspec-support (3.10.2)
|
|
112
|
+
ruby-vips (2.1.0)
|
|
113
|
+
ffi (~> 1.12)
|
|
114
|
+
ssrf_filter (1.0.7)
|
|
115
|
+
sys-uname (1.2.2)
|
|
116
|
+
ffi (~> 1.1)
|
|
117
|
+
thor (1.1.0)
|
|
118
|
+
thread_safe (0.3.6)
|
|
119
|
+
tzinfo (1.2.9)
|
|
120
|
+
thread_safe (~> 0.1)
|
|
121
|
+
zeitwerk (2.4.2)
|
|
122
|
+
|
|
123
|
+
PLATFORMS
|
|
124
|
+
ruby
|
|
125
|
+
|
|
126
|
+
DEPENDENCIES
|
|
127
|
+
activerecord (~> 6.0.0)
|
|
128
|
+
activesupport (~> 6.0.0)
|
|
129
|
+
carrierwave
|
|
130
|
+
cucumber (~> 4.1.0)
|
|
131
|
+
cucumber_factory!
|
|
132
|
+
database_cleaner
|
|
133
|
+
factory_bot
|
|
134
|
+
gemika
|
|
135
|
+
pg
|
|
136
|
+
rake
|
|
137
|
+
rspec (~> 3.0)
|
|
138
|
+
|
|
139
|
+
BUNDLED WITH
|
|
140
|
+
2.1.4
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Runtime dependencies
|
|
4
|
+
gem 'cucumber', '~> 5.3.0'
|
|
5
|
+
gem 'activesupport', '~> 6.1.0'
|
|
6
|
+
gem 'activerecord', '~> 6.1.0'
|
|
7
|
+
gem 'pg'
|
|
8
|
+
|
|
9
|
+
# Development dependencies
|
|
10
|
+
gem 'rspec', '~> 3.0'
|
|
11
|
+
gem 'rake'
|
|
12
|
+
gem 'database_cleaner'
|
|
13
|
+
gem 'gemika'
|
|
14
|
+
|
|
15
|
+
# Test dependencies
|
|
16
|
+
gem 'factory_bot'
|
|
17
|
+
gem 'carrierwave'
|
|
18
|
+
|
|
19
|
+
# Gem under test
|
|
20
|
+
gem 'cucumber_factory', :path => '.'
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
|
+
activerecord
|
|
6
|
+
activesupport
|
|
7
|
+
cucumber
|
|
8
|
+
cucumber_priority (>= 0.2.0)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
activemodel (6.1.3.1)
|
|
14
|
+
activesupport (= 6.1.3.1)
|
|
15
|
+
activerecord (6.1.3.1)
|
|
16
|
+
activemodel (= 6.1.3.1)
|
|
17
|
+
activesupport (= 6.1.3.1)
|
|
18
|
+
activesupport (6.1.3.1)
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
i18n (>= 1.6, < 2)
|
|
21
|
+
minitest (>= 5.1)
|
|
22
|
+
tzinfo (~> 2.0)
|
|
23
|
+
zeitwerk (~> 2.3)
|
|
24
|
+
addressable (2.7.0)
|
|
25
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
26
|
+
builder (3.2.4)
|
|
27
|
+
carrierwave (2.2.1)
|
|
28
|
+
activemodel (>= 5.0.0)
|
|
29
|
+
activesupport (>= 5.0.0)
|
|
30
|
+
addressable (~> 2.6)
|
|
31
|
+
image_processing (~> 1.1)
|
|
32
|
+
marcel (~> 1.0.0)
|
|
33
|
+
mini_mime (>= 0.1.3)
|
|
34
|
+
ssrf_filter (~> 1.0)
|
|
35
|
+
concurrent-ruby (1.1.8)
|
|
36
|
+
cucumber (5.3.0)
|
|
37
|
+
builder (~> 3.2, >= 3.2.4)
|
|
38
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
|
39
|
+
cucumber-create-meta (~> 2.0, >= 2.0.2)
|
|
40
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
|
41
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
|
42
|
+
cucumber-html-formatter (~> 9.0, >= 9.0.0)
|
|
43
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
|
44
|
+
cucumber-wire (~> 4.0, >= 4.0.1)
|
|
45
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
|
46
|
+
multi_test (~> 0.1, >= 0.1.2)
|
|
47
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
|
48
|
+
cucumber-core (8.0.1)
|
|
49
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
|
50
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
51
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
|
52
|
+
cucumber-create-meta (2.0.4)
|
|
53
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
|
54
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
|
55
|
+
cucumber-cucumber-expressions (10.3.0)
|
|
56
|
+
cucumber-gherkin (15.0.2)
|
|
57
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
58
|
+
cucumber-html-formatter (9.0.0)
|
|
59
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
60
|
+
cucumber-messages (13.2.1)
|
|
61
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
|
62
|
+
cucumber-tag-expressions (2.0.4)
|
|
63
|
+
cucumber-wire (4.0.1)
|
|
64
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
|
65
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
|
66
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
67
|
+
cucumber_priority (0.3.2)
|
|
68
|
+
cucumber
|
|
69
|
+
database_cleaner (2.0.1)
|
|
70
|
+
database_cleaner-active_record (~> 2.0.0)
|
|
71
|
+
database_cleaner-active_record (2.0.0)
|
|
72
|
+
activerecord (>= 5.a)
|
|
73
|
+
database_cleaner-core (~> 2.0.0)
|
|
74
|
+
database_cleaner-core (2.0.1)
|
|
75
|
+
diff-lcs (1.4.4)
|
|
76
|
+
factory_bot (6.1.0)
|
|
77
|
+
activesupport (>= 5.0.0)
|
|
78
|
+
ffi (1.15.0)
|
|
79
|
+
gemika (0.5.0)
|
|
80
|
+
i18n (1.8.9)
|
|
81
|
+
concurrent-ruby (~> 1.0)
|
|
82
|
+
image_processing (1.12.1)
|
|
83
|
+
mini_magick (>= 4.9.5, < 5)
|
|
84
|
+
ruby-vips (>= 2.0.17, < 3)
|
|
85
|
+
marcel (1.0.0)
|
|
86
|
+
middleware (0.1.0)
|
|
87
|
+
mini_magick (4.11.0)
|
|
88
|
+
mini_mime (1.0.3)
|
|
89
|
+
minitest (5.14.4)
|
|
90
|
+
multi_test (0.1.2)
|
|
91
|
+
pg (1.2.3)
|
|
92
|
+
protobuf-cucumber (3.10.8)
|
|
93
|
+
activesupport (>= 3.2)
|
|
94
|
+
middleware
|
|
95
|
+
thor
|
|
96
|
+
thread_safe
|
|
97
|
+
public_suffix (4.0.6)
|
|
98
|
+
rake (13.0.3)
|
|
99
|
+
rspec (3.10.0)
|
|
100
|
+
rspec-core (~> 3.10.0)
|
|
101
|
+
rspec-expectations (~> 3.10.0)
|
|
102
|
+
rspec-mocks (~> 3.10.0)
|
|
103
|
+
rspec-core (3.10.1)
|
|
104
|
+
rspec-support (~> 3.10.0)
|
|
105
|
+
rspec-expectations (3.10.1)
|
|
106
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
107
|
+
rspec-support (~> 3.10.0)
|
|
108
|
+
rspec-mocks (3.10.2)
|
|
109
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
110
|
+
rspec-support (~> 3.10.0)
|
|
111
|
+
rspec-support (3.10.2)
|
|
112
|
+
ruby-vips (2.1.0)
|
|
113
|
+
ffi (~> 1.12)
|
|
114
|
+
ssrf_filter (1.0.7)
|
|
115
|
+
sys-uname (1.2.2)
|
|
116
|
+
ffi (~> 1.1)
|
|
117
|
+
thor (1.1.0)
|
|
118
|
+
thread_safe (0.3.6)
|
|
119
|
+
tzinfo (2.0.4)
|
|
120
|
+
concurrent-ruby (~> 1.0)
|
|
121
|
+
zeitwerk (2.4.2)
|
|
122
|
+
|
|
123
|
+
PLATFORMS
|
|
124
|
+
ruby
|
|
125
|
+
|
|
126
|
+
DEPENDENCIES
|
|
127
|
+
activerecord (~> 6.1.0)
|
|
128
|
+
activesupport (~> 6.1.0)
|
|
129
|
+
carrierwave
|
|
130
|
+
cucumber (~> 5.3.0)
|
|
131
|
+
cucumber_factory!
|
|
132
|
+
database_cleaner
|
|
133
|
+
factory_bot
|
|
134
|
+
gemika
|
|
135
|
+
pg
|
|
136
|
+
rake
|
|
137
|
+
rspec (~> 3.0)
|
|
138
|
+
|
|
139
|
+
BUNDLED WITH
|
|
140
|
+
2.1.4
|
data/Gemfile.lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Gemfile.cucumber-2.4.lock
|
data/Gemfile.rails-7
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Runtime dependencies
|
|
4
|
+
gem 'cucumber', '~> 5.3.0'
|
|
5
|
+
gem 'activesupport', '~> 7.0.0'
|
|
6
|
+
gem 'activerecord', '~> 7.0.0'
|
|
7
|
+
gem 'pg'
|
|
8
|
+
|
|
9
|
+
# Development dependencies
|
|
10
|
+
gem 'rspec', '~> 3.0'
|
|
11
|
+
gem 'rake'
|
|
12
|
+
gem 'database_cleaner'
|
|
13
|
+
gem 'gemika'
|
|
14
|
+
|
|
15
|
+
# Test dependencies
|
|
16
|
+
gem 'factory_bot'
|
|
17
|
+
gem 'carrierwave'
|
|
18
|
+
|
|
19
|
+
# Gem under test
|
|
20
|
+
gem 'cucumber_factory', :path => '.'
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
cucumber_factory (2.4.1)
|
|
5
|
+
activerecord
|
|
6
|
+
activesupport
|
|
7
|
+
cucumber
|
|
8
|
+
cucumber_priority (>= 0.2.0)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
activemodel (7.0.0)
|
|
14
|
+
activesupport (= 7.0.0)
|
|
15
|
+
activerecord (7.0.0)
|
|
16
|
+
activemodel (= 7.0.0)
|
|
17
|
+
activesupport (= 7.0.0)
|
|
18
|
+
activesupport (7.0.0)
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
i18n (>= 1.6, < 2)
|
|
21
|
+
minitest (>= 5.1)
|
|
22
|
+
tzinfo (~> 2.0)
|
|
23
|
+
addressable (2.8.0)
|
|
24
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
25
|
+
builder (3.2.4)
|
|
26
|
+
carrierwave (2.2.2)
|
|
27
|
+
activemodel (>= 5.0.0)
|
|
28
|
+
activesupport (>= 5.0.0)
|
|
29
|
+
addressable (~> 2.6)
|
|
30
|
+
image_processing (~> 1.1)
|
|
31
|
+
marcel (~> 1.0.0)
|
|
32
|
+
mini_mime (>= 0.1.3)
|
|
33
|
+
ssrf_filter (~> 1.0)
|
|
34
|
+
concurrent-ruby (1.1.9)
|
|
35
|
+
cucumber (5.3.0)
|
|
36
|
+
builder (~> 3.2, >= 3.2.4)
|
|
37
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
|
38
|
+
cucumber-create-meta (~> 2.0, >= 2.0.2)
|
|
39
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
|
40
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
|
41
|
+
cucumber-html-formatter (~> 9.0, >= 9.0.0)
|
|
42
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
|
43
|
+
cucumber-wire (~> 4.0, >= 4.0.1)
|
|
44
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
|
45
|
+
multi_test (~> 0.1, >= 0.1.2)
|
|
46
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
|
47
|
+
cucumber-core (8.0.1)
|
|
48
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
|
49
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
50
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
|
51
|
+
cucumber-create-meta (2.0.4)
|
|
52
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
|
53
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
|
54
|
+
cucumber-cucumber-expressions (10.3.0)
|
|
55
|
+
cucumber-gherkin (15.0.2)
|
|
56
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
57
|
+
cucumber-html-formatter (9.0.0)
|
|
58
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
59
|
+
cucumber-messages (13.2.1)
|
|
60
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
|
61
|
+
cucumber-tag-expressions (2.0.4)
|
|
62
|
+
cucumber-wire (4.0.1)
|
|
63
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
|
64
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
|
65
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
66
|
+
cucumber_priority (0.3.2)
|
|
67
|
+
cucumber
|
|
68
|
+
database_cleaner (2.0.1)
|
|
69
|
+
database_cleaner-active_record (~> 2.0.0)
|
|
70
|
+
database_cleaner-active_record (2.0.1)
|
|
71
|
+
activerecord (>= 5.a)
|
|
72
|
+
database_cleaner-core (~> 2.0.0)
|
|
73
|
+
database_cleaner-core (2.0.1)
|
|
74
|
+
diff-lcs (1.4.4)
|
|
75
|
+
factory_bot (6.2.0)
|
|
76
|
+
activesupport (>= 5.0.0)
|
|
77
|
+
ffi (1.15.4)
|
|
78
|
+
gemika (0.6.1)
|
|
79
|
+
i18n (1.8.11)
|
|
80
|
+
concurrent-ruby (~> 1.0)
|
|
81
|
+
image_processing (1.12.1)
|
|
82
|
+
mini_magick (>= 4.9.5, < 5)
|
|
83
|
+
ruby-vips (>= 2.0.17, < 3)
|
|
84
|
+
marcel (1.0.2)
|
|
85
|
+
middleware (0.1.0)
|
|
86
|
+
mini_magick (4.11.0)
|
|
87
|
+
mini_mime (1.1.2)
|
|
88
|
+
minitest (5.15.0)
|
|
89
|
+
multi_test (0.1.2)
|
|
90
|
+
pg (1.2.3)
|
|
91
|
+
protobuf-cucumber (3.10.8)
|
|
92
|
+
activesupport (>= 3.2)
|
|
93
|
+
middleware
|
|
94
|
+
thor
|
|
95
|
+
thread_safe
|
|
96
|
+
public_suffix (4.0.6)
|
|
97
|
+
rake (13.0.6)
|
|
98
|
+
rspec (3.10.0)
|
|
99
|
+
rspec-core (~> 3.10.0)
|
|
100
|
+
rspec-expectations (~> 3.10.0)
|
|
101
|
+
rspec-mocks (~> 3.10.0)
|
|
102
|
+
rspec-core (3.10.1)
|
|
103
|
+
rspec-support (~> 3.10.0)
|
|
104
|
+
rspec-expectations (3.10.1)
|
|
105
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
106
|
+
rspec-support (~> 3.10.0)
|
|
107
|
+
rspec-mocks (3.10.2)
|
|
108
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
109
|
+
rspec-support (~> 3.10.0)
|
|
110
|
+
rspec-support (3.10.3)
|
|
111
|
+
ruby-vips (2.1.4)
|
|
112
|
+
ffi (~> 1.12)
|
|
113
|
+
ssrf_filter (1.0.7)
|
|
114
|
+
sys-uname (1.2.2)
|
|
115
|
+
ffi (~> 1.1)
|
|
116
|
+
thor (1.1.0)
|
|
117
|
+
thread_safe (0.3.6)
|
|
118
|
+
tzinfo (2.0.4)
|
|
119
|
+
concurrent-ruby (~> 1.0)
|
|
120
|
+
|
|
121
|
+
PLATFORMS
|
|
122
|
+
x86_64-linux
|
|
123
|
+
|
|
124
|
+
DEPENDENCIES
|
|
125
|
+
activerecord (~> 7.0.0)
|
|
126
|
+
activesupport (~> 7.0.0)
|
|
127
|
+
carrierwave
|
|
128
|
+
cucumber (~> 5.3.0)
|
|
129
|
+
cucumber_factory!
|
|
130
|
+
database_cleaner
|
|
131
|
+
factory_bot
|
|
132
|
+
gemika
|
|
133
|
+
pg
|
|
134
|
+
rake
|
|
135
|
+
rspec (~> 3.0)
|
|
136
|
+
|
|
137
|
+
BUNDLED WITH
|
|
138
|
+
2.3.0
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cucumber_factory [](https://github.com/makandra/cucumber_factory/actions?query=branch:master)
|
|
2
2
|
================
|
|
3
3
|
|
|
4
4
|
Create ActiveRecord objects without step definitions
|
|
@@ -222,23 +222,22 @@ Development
|
|
|
222
222
|
There are tests in `spec`. We only accept PRs with tests. To run tests:
|
|
223
223
|
|
|
224
224
|
- Install the Ruby version stated in `.ruby-version`
|
|
225
|
-
- Create a local
|
|
225
|
+
- Create a local PostgreSQL database:
|
|
226
226
|
```
|
|
227
|
-
$
|
|
228
|
-
> create database cucumber_factory_test;
|
|
227
|
+
$ sudo -u postgres psql -c 'create database cucumber_factory_test;'
|
|
229
228
|
```
|
|
230
229
|
|
|
231
230
|
- Copy `spec/support/database.sample.yml` to `spec/support/database.yml` and enter your local credentials for the test databases
|
|
232
231
|
- Install development dependencies using `bundle install`
|
|
233
232
|
- Run tests with the default symlinked Gemfile using `bundle exec rspec` or explicit with `BUNDLE_GEMFILE=Gemfile.cucumber-x.x bundle exec rspec spec`
|
|
234
233
|
|
|
235
|
-
We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. Supported combinations are configured in
|
|
234
|
+
We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. Supported combinations are configured in .github/workflows/test.yml. We provide some rake tasks to help with this:
|
|
236
235
|
|
|
237
236
|
For each ruby version do (you need to change it manually):
|
|
238
237
|
- Install development dependencies using `rake matrix:install`
|
|
239
238
|
- Run tests using `rake matrix:spec`
|
|
240
239
|
|
|
241
|
-
Note that we have configured
|
|
240
|
+
Note that we have configured GitHub Actions to automatically run tests in all supported Ruby versions and dependency sets after each push. We will only merge pull requests after a green workflow build.
|
|
242
241
|
|
|
243
242
|
If you would like to contribute:
|
|
244
243
|
|
data/cucumber_factory.gemspec
CHANGED
|
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.summary = %q{Create records from Cucumber features without writing step definitions.}
|
|
12
12
|
s.description = %q{Cucumber Factory allows you to create ActiveRecord models from your Cucumber features without writing step definitions for each model.}
|
|
13
13
|
s.license = 'MIT'
|
|
14
|
+
s.metadata = { 'rubygems_mfa_required' => 'true' }
|
|
14
15
|
|
|
15
16
|
s.files = `git ls-files`.split("\n")
|
|
16
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
@@ -4,12 +4,12 @@ module CucumberFactory
|
|
|
4
4
|
|
|
5
5
|
ATTRIBUTES_PATTERN = '( with the .+?)?( (?:which|who|that) is .+?)?' # ... with the year 1979 which is science fiction
|
|
6
6
|
TEXT_ATTRIBUTES_PATTERN = ' (?:with|and) these attributes:'
|
|
7
|
-
UPDATE_ATTR_PATTERN = '(?: (?:has|belongs to)( the .+?)
|
|
7
|
+
UPDATE_ATTR_PATTERN = '(?: (?:has|belongs to)( the .+?)|(?: and| but|,)*( is .+?))' # ... belongs to the collection "Fantasy" and is trending
|
|
8
8
|
TEXT_UPDATE_ATTR_PATTERN = '(?: and|,)* has these attributes:'
|
|
9
9
|
|
|
10
10
|
RECORD_PATTERN = 'there is an? (.+?)( \(.+?\))?' # Given there is a movie (comedy)
|
|
11
11
|
NAMED_RECORD_PATTERN = '(?:"([^\"]*)"|\'([^\']*)\') is an? (.+?)( \(.+?\))?' # Given "LotR" is a movie
|
|
12
|
-
RECORD_UPDATE_PATTERN = 'the (
|
|
12
|
+
RECORD_UPDATE_PATTERN = 'the ([^"\',]+?) (above|".+?"|\'.+?\')' # Given the movie "LotR" ...
|
|
13
13
|
|
|
14
14
|
NAMED_RECORDS_VARIABLE = :'@named_cucumber_factory_records'
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@ module CucumberFactory
|
|
|
45
45
|
|
|
46
46
|
UPDATE_STEP_DESCRIPTOR = {
|
|
47
47
|
:kind => :And,
|
|
48
|
-
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}
|
|
48
|
+
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}+$/,
|
|
49
49
|
:block => lambda { |a1, a2, a3, a4| CucumberFactory::Factory.send(:parse_update, self, a1, a2, a3, a4) }
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ module CucumberFactory
|
|
|
65
65
|
|
|
66
66
|
UPDATE_STEP_DESCRIPTOR_WITH_TEXT_ATTRIBUTES = {
|
|
67
67
|
:kind => :And,
|
|
68
|
-
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}
|
|
68
|
+
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}*#{TEXT_UPDATE_ATTR_PATTERN}$/,
|
|
69
69
|
:block => lambda { |a1, a2, a3, a4, a5| CucumberFactory::Factory.send(:parse_update, self, a1, a2, a3, a4, a5) },
|
|
70
70
|
:priority => true
|
|
71
71
|
}
|
|
@@ -88,7 +88,8 @@ module CucumberFactory
|
|
|
88
88
|
main.instance_eval {
|
|
89
89
|
kind = descriptor[:kind]
|
|
90
90
|
object = send(kind, *[descriptor[:pattern]].compact, &descriptor[:block])
|
|
91
|
-
|
|
91
|
+
# cucumber_factory steps get a low priority due to their generic syntax
|
|
92
|
+
object.overridable(:priority => descriptor[:priority] ? -1 : -2) if kind != :Before
|
|
92
93
|
object
|
|
93
94
|
}
|
|
94
95
|
end
|
data/spec/assets/symlink.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
file.txt
|
|
@@ -175,7 +175,10 @@ describe 'steps provided by cucumber_factory' do
|
|
|
175
175
|
it "should give created_at precedence over id when saying 'above' if the primary key is not numeric" do
|
|
176
176
|
invoke_cucumber_step('there is a uuid user with the name "Jane" and the id "jane"')
|
|
177
177
|
invoke_cucumber_step('there is a uuid user with the name "John" and the id "john"')
|
|
178
|
-
|
|
178
|
+
|
|
179
|
+
uuid_user = UuidUser.find_by_name("John")
|
|
180
|
+
ActiveRecord::VERSION::MAJOR >= 6 ? uuid_user.update!(:created_at => 1.day.ago) : uuid_user.update_attributes!(:created_at => 1.day.ago)
|
|
181
|
+
|
|
179
182
|
invoke_cucumber_step('there is a movie with the title "Before Sunset" and the uuid reviewer above')
|
|
180
183
|
before_sunset = Movie.find_by_title!("Before Sunset")
|
|
181
184
|
before_sunset.uuid_reviewer.name.should == "Jane"
|
|
@@ -184,7 +187,10 @@ describe 'steps provided by cucumber_factory' do
|
|
|
184
187
|
it "should ignore created_at if the primary key is numeric" do
|
|
185
188
|
invoke_cucumber_step('there is a user with the name "Jane"')
|
|
186
189
|
invoke_cucumber_step('there is a user with the name "John"')
|
|
187
|
-
|
|
190
|
+
|
|
191
|
+
user = User.find_by_name("John")
|
|
192
|
+
ActiveRecord::VERSION::MAJOR >= 6 ? user.update!(:created_at => 1.day.ago) : user.update_attributes!(:created_at => 1.day.ago)
|
|
193
|
+
|
|
188
194
|
invoke_cucumber_step('there is a movie with the title "Before Sunset" and the reviewer above')
|
|
189
195
|
before_sunset = Movie.find_by_title!("Before Sunset")
|
|
190
196
|
before_sunset.reviewer.name.should == "John"
|
|
@@ -198,7 +204,10 @@ describe 'steps provided by cucumber_factory' do
|
|
|
198
204
|
|
|
199
205
|
it "should reload an object assigned to a belongs_to before assigning" do
|
|
200
206
|
invoke_cucumber_step('"Jane" is a user who is deleted')
|
|
201
|
-
|
|
207
|
+
|
|
208
|
+
user = User.last
|
|
209
|
+
ActiveRecord::VERSION::MAJOR >= 6 ? user.update!(:deleted => false) : user.update_attributes!(:deleted => false)
|
|
210
|
+
|
|
202
211
|
proc { invoke_cucumber_step('there is a movie with the title "Before Sunset" and the reviewer "Jane"') }.should_not raise_error
|
|
203
212
|
end
|
|
204
213
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cucumber_factory
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henning Koch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|
|
@@ -73,10 +73,10 @@ executables: []
|
|
|
73
73
|
extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
|
75
75
|
files:
|
|
76
|
+
- ".github/workflows/test.yml"
|
|
76
77
|
- ".gitignore"
|
|
77
78
|
- ".rspec"
|
|
78
79
|
- ".ruby-version"
|
|
79
|
-
- ".travis.yml"
|
|
80
80
|
- CHANGELOG.md
|
|
81
81
|
- Gemfile
|
|
82
82
|
- Gemfile.cucumber-1.3
|
|
@@ -87,7 +87,13 @@ files:
|
|
|
87
87
|
- Gemfile.cucumber-3.0.lock
|
|
88
88
|
- Gemfile.cucumber-3.1
|
|
89
89
|
- Gemfile.cucumber-3.1.lock
|
|
90
|
+
- Gemfile.cucumber-4.1
|
|
91
|
+
- Gemfile.cucumber-4.1.lock
|
|
92
|
+
- Gemfile.cucumber-5.3
|
|
93
|
+
- Gemfile.cucumber-5.3.lock
|
|
90
94
|
- Gemfile.lock
|
|
95
|
+
- Gemfile.rails-7
|
|
96
|
+
- Gemfile.rails-7.lock
|
|
91
97
|
- LICENSE
|
|
92
98
|
- README.md
|
|
93
99
|
- Rakefile
|
|
@@ -106,9 +112,9 @@ files:
|
|
|
106
112
|
- spec/cucumber_factory/steps_spec.rb
|
|
107
113
|
- spec/spec_helper.rb
|
|
108
114
|
- spec/support/cucumber_helper.rb
|
|
115
|
+
- spec/support/database.github.yml
|
|
109
116
|
- spec/support/database.rb
|
|
110
117
|
- spec/support/database.sample.yml
|
|
111
|
-
- spec/support/database.travis.yml
|
|
112
118
|
- spec/support/factories/factories.rb
|
|
113
119
|
- spec/support/models/job_offer.rb
|
|
114
120
|
- spec/support/models/machinist_model.rb
|
|
@@ -123,7 +129,8 @@ files:
|
|
|
123
129
|
homepage: http://github.com/makandra/cucumber_factory
|
|
124
130
|
licenses:
|
|
125
131
|
- MIT
|
|
126
|
-
metadata:
|
|
132
|
+
metadata:
|
|
133
|
+
rubygems_mfa_required: 'true'
|
|
127
134
|
post_install_message:
|
|
128
135
|
rdoc_options: []
|
|
129
136
|
require_paths:
|
|
@@ -139,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
146
|
- !ruby/object:Gem::Version
|
|
140
147
|
version: '0'
|
|
141
148
|
requirements: []
|
|
142
|
-
rubygems_version: 3.
|
|
149
|
+
rubygems_version: 3.3.9
|
|
143
150
|
signing_key:
|
|
144
151
|
specification_version: 4
|
|
145
152
|
summary: Create records from Cucumber features without writing step definitions.
|
data/.travis.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
rvm:
|
|
2
|
-
- 2.1.10
|
|
3
|
-
- 2.5.3
|
|
4
|
-
|
|
5
|
-
gemfile:
|
|
6
|
-
- Gemfile.cucumber-1.3
|
|
7
|
-
- Gemfile.cucumber-2.4
|
|
8
|
-
- Gemfile.cucumber-3.0
|
|
9
|
-
- Gemfile.cucumber-3.1
|
|
10
|
-
|
|
11
|
-
dist: trusty
|
|
12
|
-
|
|
13
|
-
matrix:
|
|
14
|
-
exclude:
|
|
15
|
-
- gemfile: Gemfile.cucumber-3.1
|
|
16
|
-
rvm: 2.1.10 # cucumber 3 wants ruby >= 2.2
|
|
17
|
-
- gemfile: Gemfile.cucumber-3.0
|
|
18
|
-
rvm: 2.1.10 # cucumber 3 wants ruby >= 2.2
|
|
19
|
-
|
|
20
|
-
install:
|
|
21
|
-
# Replace default Travis CI bundler script with a version that doesn't
|
|
22
|
-
# explode when lockfile doesn't match recently bumped version
|
|
23
|
-
- bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
24
|
-
|
|
25
|
-
before_script:
|
|
26
|
-
- mysql -e 'create database IF NOT EXISTS cucumber_factory_test;'
|
|
27
|
-
|
|
28
|
-
script: bundle exec rake current_rspec
|
|
29
|
-
|
|
30
|
-
sudo: false
|
|
31
|
-
|
|
32
|
-
cache: bundler
|