active_cucumber 1.0.0 → 1.1.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.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +28 -0
- data/.rubocop.yml +12 -24
- data/.ruby-version +1 -0
- data/CHANGELOG.md +73 -0
- data/DEVELOPMENT.md +14 -0
- data/Gemfile +17 -2
- data/Gemfile.lock +132 -110
- data/LICENSE.txt +1 -1
- data/README.md +63 -76
- data/Rakefile +15 -18
- data/active_cucumber.gemspec +22 -27
- data/cucumber.yml +1 -0
- data/documentation/horizontal_diff.png +0 -0
- data/documentation/vertical_diff.png +0 -0
- data/dprint.json +11 -0
- data/features/active_cucumber/attributes_for.feature +2 -12
- data/features/active_cucumber/create_many.feature +7 -13
- data/features/active_cucumber/create_one.feature +5 -9
- data/features/active_cucumber/diff_all/arrays_of_objects.feature +2 -11
- data/features/active_cucumber/diff_all/context_values.feature +1 -10
- data/features/active_cucumber/diff_all/converting_data.feature +4 -13
- data/features/active_cucumber/diff_all/filtering_columns.feature +2 -11
- data/features/active_cucumber/diff_all/filtering_rows.feature +2 -13
- data/features/active_cucumber/diff_all/mismatching_data.feature +4 -14
- data/features/active_cucumber/diff_one.feature +8 -13
- data/features/step_definitions/steps.rb +16 -15
- data/features/support/director.rb +2 -0
- data/features/support/env.rb +23 -25
- data/features/support/episode.rb +2 -0
- data/features/support/episode_creator.rb +6 -6
- data/features/support/episode_cucumberator.rb +2 -2
- data/features/support/genre.rb +2 -0
- data/features/support/show.rb +2 -0
- data/features/support/show_creator.rb +5 -4
- data/features/support/show_cucumberator.rb +3 -3
- data/features/support/subscription.rb +2 -0
- data/features/support/subscription_creator.rb +6 -6
- data/features/support/subscription_cucumberator.rb +4 -4
- data/lib/active_cucumber/active_record_builder.rb +26 -18
- data/lib/active_cucumber/creator.rb +44 -25
- data/lib/active_cucumber/cucumberator.rb +17 -15
- data/lib/active_cucumber/cucumparer.rb +13 -12
- data/lib/active_cucumber.rb +97 -25
- metadata +26 -166
- data/.coveralls.yml +0 -1
- data/circle.yml +0 -16
- data/cucumber_lint.yml +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5efdfe95694b05ce4b86d7551cd2fa1902fb523169024b123c1ea1e823ed5487
|
|
4
|
+
data.tar.gz: 041a943efc320b6611edabb3067bc0159e4cddf80a11efdb7c016470858f1b94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b97a6a78803764a118a6211c93c791f15f73a97ab4e2a15d9d86c48f430c294e6a784191857dd939bcd6c3b6147d7c075bb60bf5204fb463f9a8d8e904a49701
|
|
7
|
+
data.tar.gz: 834bca7d1394210efd7514382fa2340f791f7229cf7d8202b91d67389e49406391a53f1f0cc73d6d9e8f7e36d3308248cf3723bf4f35142781eb85e00078e4ad
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
ruby-version: ["3.4"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: dprint/check@v2.2
|
|
21
|
+
- uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
24
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
25
|
+
- run: bundle exec rake
|
|
26
|
+
- run: bundle exec rake fix
|
|
27
|
+
- run: git diff HEAD --exit-code --color
|
|
28
|
+
- uses: coverallsapp/github-action@v2
|
data/.rubocop.yml
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
-
|
|
2
|
+
NewCops: enable
|
|
3
3
|
DisplayCopNames: true
|
|
4
|
-
|
|
5
4
|
DisplayStyleGuide: true
|
|
6
|
-
|
|
7
5
|
Include:
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Lint/Eval:
|
|
12
|
-
Enabled: false
|
|
6
|
+
- "**/Rakefile"
|
|
7
|
+
SuggestExtensions: false
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
Metrics/LineLength:
|
|
9
|
+
Layout/LineLength:
|
|
16
10
|
Max: 100
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
EnforcedStyle: outdent
|
|
12
|
+
# Security/Eval is enabled globally. Specific eval usage in test step definitions
|
|
13
|
+
# is documented with inline rubocop:disable comments explaining the justification.
|
|
21
14
|
|
|
22
15
|
Style/Documentation:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Style/EmptyLines:
|
|
26
|
-
Enabled: false
|
|
27
|
-
|
|
28
|
-
Style/EmptyLinesAroundClassBody:
|
|
29
|
-
Enabled: false
|
|
16
|
+
Exclude:
|
|
17
|
+
- "features/support/*"
|
|
30
18
|
|
|
31
|
-
Style/
|
|
32
|
-
EnforcedStyle:
|
|
19
|
+
Style/StringLiterals:
|
|
20
|
+
EnforcedStyle: double_quotes
|
|
33
21
|
|
|
34
|
-
Style/
|
|
35
|
-
EnforcedStyle:
|
|
22
|
+
Style/SymbolArray:
|
|
23
|
+
EnforcedStyle: brackets
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.2
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.1.0 (2025-11-04)
|
|
4
|
+
|
|
5
|
+
- Update required Ruby version to >= 3.2
|
|
6
|
+
- Use modern Ruby features
|
|
7
|
+
- More careful meta programming
|
|
8
|
+
- More explicit return values
|
|
9
|
+
|
|
10
|
+
## 1.0.0 (2016-05-10)
|
|
11
|
+
|
|
12
|
+
- stable release
|
|
13
|
+
|
|
14
|
+
## 0.2.1 (2015-09-01)
|
|
15
|
+
|
|
16
|
+
- Update dependencies
|
|
17
|
+
|
|
18
|
+
## 0.2.0 (2015-08-31)
|
|
19
|
+
|
|
20
|
+
- Add `attributes_for` method to parse Cucumber tables into attribute hashes
|
|
21
|
+
|
|
22
|
+
## 0.1.0 (2015-08-30)
|
|
23
|
+
|
|
24
|
+
- Can compare objects in addition to AREL relations
|
|
25
|
+
|
|
26
|
+
## 0.0.10 (2015-08-29)
|
|
27
|
+
|
|
28
|
+
- Add context support to Cucumberators
|
|
29
|
+
|
|
30
|
+
## 0.0.9 (2015-08-28)
|
|
31
|
+
|
|
32
|
+
- Sort table entries by id
|
|
33
|
+
|
|
34
|
+
## 0.0.8 (2015-08-27)
|
|
35
|
+
|
|
36
|
+
- nil columns for association fields now work for factories that would make that
|
|
37
|
+
association by default
|
|
38
|
+
|
|
39
|
+
## 0.0.7 (2015-08-26)
|
|
40
|
+
|
|
41
|
+
- Context support for creators
|
|
42
|
+
|
|
43
|
+
## 0.0.6 (2015-08-25)
|
|
44
|
+
|
|
45
|
+
- Require FactoryGirl explicitly
|
|
46
|
+
|
|
47
|
+
## 0.0.5 (2015-08-24)
|
|
48
|
+
|
|
49
|
+
- Include FactoryGirl methods
|
|
50
|
+
|
|
51
|
+
## 0.0.4 (2015-08-23)
|
|
52
|
+
|
|
53
|
+
- Rename creator to active_record_builder
|
|
54
|
+
|
|
55
|
+
## 0.0.3 (2015-08-22)
|
|
56
|
+
|
|
57
|
+
- `create_many` now returns the created records
|
|
58
|
+
- Remove database indexes for speed improvements
|
|
59
|
+
- Better error logging
|
|
60
|
+
|
|
61
|
+
## 0.0.2 (2015-08-21)
|
|
62
|
+
|
|
63
|
+
- Add `create_one` method
|
|
64
|
+
|
|
65
|
+
## 0.0.1 (2015-08-20)
|
|
66
|
+
|
|
67
|
+
- Core functionality for creating ActiveRecord objects from Cucumber tables
|
|
68
|
+
- Support for comparing ActiveRecord objects against Cucumber tables
|
|
69
|
+
- `diff_one!` for vertical table comparisons
|
|
70
|
+
- `diff_all!` for horizontal table comparisons
|
|
71
|
+
- Creator classes for transforming Cucumber table values
|
|
72
|
+
- Cucumberator classes for decorating ActiveRecord instances
|
|
73
|
+
- FactoryBot integration
|
data/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Development handbook
|
|
2
|
+
|
|
3
|
+
- run all tests: `bundle exec rake`
|
|
4
|
+
- auto-fix all fixable issues: `bundle exec fix`
|
|
5
|
+
- update dependencies: `bundle update`
|
|
6
|
+
|
|
7
|
+
## Release a new version to RubyGems
|
|
8
|
+
|
|
9
|
+
- in a branch:
|
|
10
|
+
- update CHANGELOG.md
|
|
11
|
+
- search and replace all occurrences of `1.1.0`
|
|
12
|
+
- run `bundle install`
|
|
13
|
+
- ship this branch
|
|
14
|
+
- push a new version to Rubygems: `rake release`
|
data/Gemfile
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
source
|
|
1
|
+
source "https://rubygems.org"
|
|
2
2
|
|
|
3
|
-
# Specify your gem's dependencies in
|
|
3
|
+
# Specify your gem's dependencies in active_cucumber.gemspec
|
|
4
4
|
gemspec
|
|
5
|
+
|
|
6
|
+
gem "activerecord"
|
|
7
|
+
gem "bundler"
|
|
8
|
+
gem "cucumber"
|
|
9
|
+
gem "factory_bot"
|
|
10
|
+
gem "faker"
|
|
11
|
+
gem "kappamaki"
|
|
12
|
+
gem "mortadella"
|
|
13
|
+
gem "observer"
|
|
14
|
+
gem "rake"
|
|
15
|
+
gem "rspec"
|
|
16
|
+
gem "rspec-collection_matchers"
|
|
17
|
+
gem "rubocop"
|
|
18
|
+
gem "simplecov", "~> 0.22"
|
|
19
|
+
gem "sqlite3"
|
data/Gemfile.lock
CHANGED
|
@@ -1,120 +1,142 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
active_cucumber (1.
|
|
4
|
+
active_cucumber (1.1.0)
|
|
5
|
+
activerecord (>= 6.0)
|
|
6
|
+
cucumber (>= 7.0)
|
|
7
|
+
factory_bot (>= 5.0)
|
|
8
|
+
mortadella (>= 1.0)
|
|
5
9
|
|
|
6
10
|
GEM
|
|
7
11
|
remote: https://rubygems.org/
|
|
8
12
|
specs:
|
|
9
|
-
activemodel (
|
|
10
|
-
activesupport (=
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
cucumber (2.1
|
|
36
|
-
builder (
|
|
37
|
-
cucumber-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
13
|
+
activemodel (8.0.2)
|
|
14
|
+
activesupport (= 8.0.2)
|
|
15
|
+
activerecord (8.0.2)
|
|
16
|
+
activemodel (= 8.0.2)
|
|
17
|
+
activesupport (= 8.0.2)
|
|
18
|
+
timeout (>= 0.4.0)
|
|
19
|
+
activesupport (8.0.2)
|
|
20
|
+
base64
|
|
21
|
+
benchmark (>= 0.3)
|
|
22
|
+
bigdecimal
|
|
23
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
24
|
+
connection_pool (>= 2.2.5)
|
|
25
|
+
drb
|
|
26
|
+
i18n (>= 1.6, < 2)
|
|
27
|
+
logger (>= 1.4.2)
|
|
28
|
+
minitest (>= 5.1)
|
|
29
|
+
securerandom (>= 0.3)
|
|
30
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
31
|
+
uri (>= 0.13.1)
|
|
32
|
+
ast (2.4.2)
|
|
33
|
+
base64 (0.2.0)
|
|
34
|
+
benchmark (0.4.0)
|
|
35
|
+
bigdecimal (3.1.9)
|
|
36
|
+
builder (3.3.0)
|
|
37
|
+
concurrent-ruby (1.3.5)
|
|
38
|
+
connection_pool (2.5.0)
|
|
39
|
+
cucumber (9.2.1)
|
|
40
|
+
builder (~> 3.2)
|
|
41
|
+
cucumber-ci-environment (> 9, < 11)
|
|
42
|
+
cucumber-core (> 13, < 14)
|
|
43
|
+
cucumber-cucumber-expressions (~> 17.0)
|
|
44
|
+
cucumber-gherkin (> 24, < 28)
|
|
45
|
+
cucumber-html-formatter (> 20.3, < 22)
|
|
46
|
+
cucumber-messages (> 19, < 25)
|
|
47
|
+
diff-lcs (~> 1.5)
|
|
48
|
+
mini_mime (~> 1.1)
|
|
49
|
+
multi_test (~> 1.1)
|
|
50
|
+
sys-uname (~> 1.2)
|
|
51
|
+
cucumber-ci-environment (10.0.1)
|
|
52
|
+
cucumber-core (13.0.3)
|
|
53
|
+
cucumber-gherkin (>= 27, < 28)
|
|
54
|
+
cucumber-messages (>= 20, < 23)
|
|
55
|
+
cucumber-tag-expressions (> 5, < 7)
|
|
56
|
+
cucumber-cucumber-expressions (17.1.0)
|
|
57
|
+
bigdecimal
|
|
58
|
+
cucumber-gherkin (27.0.0)
|
|
59
|
+
cucumber-messages (>= 19.1.4, < 23)
|
|
60
|
+
cucumber-html-formatter (21.9.0)
|
|
61
|
+
cucumber-messages (> 19, < 28)
|
|
62
|
+
cucumber-messages (22.0.0)
|
|
63
|
+
cucumber-tag-expressions (6.1.2)
|
|
64
|
+
diff-lcs (1.6.0)
|
|
65
|
+
docile (1.4.1)
|
|
66
|
+
drb (2.2.1)
|
|
67
|
+
factory_bot (6.5.1)
|
|
68
|
+
activesupport (>= 6.1.0)
|
|
69
|
+
faker (3.5.1)
|
|
70
|
+
i18n (>= 1.8.11, < 2)
|
|
71
|
+
ffi (1.17.1)
|
|
72
|
+
i18n (1.14.7)
|
|
73
|
+
concurrent-ruby (~> 1.0)
|
|
74
|
+
json (2.10.2)
|
|
75
|
+
kappamaki (1.0.0)
|
|
76
|
+
language_server-protocol (3.17.0.4)
|
|
77
|
+
lint_roller (1.1.0)
|
|
78
|
+
logger (1.6.6)
|
|
79
|
+
mini_mime (1.1.5)
|
|
80
|
+
mini_portile2 (2.8.8)
|
|
81
|
+
minitest (5.25.5)
|
|
82
|
+
mortadella (1.1.0)
|
|
83
|
+
multi_test (1.1.0)
|
|
84
|
+
observer (0.1.2)
|
|
85
|
+
parallel (1.26.3)
|
|
86
|
+
parser (3.3.7.1)
|
|
87
|
+
ast (~> 2.4.1)
|
|
88
|
+
racc
|
|
89
|
+
racc (1.8.1)
|
|
90
|
+
rainbow (3.1.1)
|
|
91
|
+
rake (13.2.1)
|
|
92
|
+
regexp_parser (2.10.0)
|
|
93
|
+
rspec (3.13.0)
|
|
94
|
+
rspec-core (~> 3.13.0)
|
|
95
|
+
rspec-expectations (~> 3.13.0)
|
|
96
|
+
rspec-mocks (~> 3.13.0)
|
|
97
|
+
rspec-collection_matchers (1.2.1)
|
|
84
98
|
rspec-expectations (>= 2.99.0.beta1)
|
|
85
|
-
rspec-core (3.
|
|
86
|
-
rspec-support (~> 3.
|
|
87
|
-
rspec-expectations (3.
|
|
99
|
+
rspec-core (3.13.3)
|
|
100
|
+
rspec-support (~> 3.13.0)
|
|
101
|
+
rspec-expectations (3.13.3)
|
|
88
102
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
89
|
-
rspec-support (~> 3.
|
|
90
|
-
rspec-mocks (3.
|
|
103
|
+
rspec-support (~> 3.13.0)
|
|
104
|
+
rspec-mocks (3.13.2)
|
|
91
105
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
|
-
rspec-support (~> 3.
|
|
93
|
-
rspec-support (3.
|
|
94
|
-
rubocop (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
rspec-support (~> 3.13.0)
|
|
107
|
+
rspec-support (3.13.2)
|
|
108
|
+
rubocop (1.74.0)
|
|
109
|
+
json (~> 2.3)
|
|
110
|
+
language_server-protocol (~> 3.17.0.2)
|
|
111
|
+
lint_roller (~> 1.1.0)
|
|
112
|
+
parallel (~> 1.10)
|
|
113
|
+
parser (>= 3.3.0.2)
|
|
114
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
115
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
116
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
99
117
|
ruby-progressbar (~> 1.7)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
119
|
+
rubocop-ast (1.40.0)
|
|
120
|
+
parser (>= 3.3.1.0)
|
|
121
|
+
ruby-progressbar (1.13.0)
|
|
122
|
+
securerandom (0.4.1)
|
|
123
|
+
simplecov (0.22.0)
|
|
124
|
+
docile (~> 1.1)
|
|
125
|
+
simplecov-html (~> 0.11)
|
|
126
|
+
simplecov_json_formatter (~> 0.1)
|
|
127
|
+
simplecov-html (0.13.2)
|
|
128
|
+
simplecov_json_formatter (0.1.4)
|
|
129
|
+
sqlite3 (2.6.0)
|
|
130
|
+
mini_portile2 (~> 2.8.0)
|
|
131
|
+
sys-uname (1.3.1)
|
|
132
|
+
ffi (~> 1.1)
|
|
133
|
+
timeout (0.4.3)
|
|
134
|
+
tzinfo (2.0.6)
|
|
135
|
+
concurrent-ruby (~> 1.0)
|
|
136
|
+
unicode-display_width (3.1.4)
|
|
137
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
138
|
+
unicode-emoji (4.0.4)
|
|
139
|
+
uri (1.0.3)
|
|
118
140
|
|
|
119
141
|
PLATFORMS
|
|
120
142
|
ruby
|
|
@@ -123,18 +145,18 @@ DEPENDENCIES
|
|
|
123
145
|
active_cucumber!
|
|
124
146
|
activerecord
|
|
125
147
|
bundler
|
|
126
|
-
coveralls
|
|
127
148
|
cucumber
|
|
128
|
-
|
|
129
|
-
factory_girl
|
|
149
|
+
factory_bot
|
|
130
150
|
faker
|
|
131
151
|
kappamaki
|
|
132
152
|
mortadella
|
|
153
|
+
observer
|
|
133
154
|
rake
|
|
134
155
|
rspec
|
|
135
156
|
rspec-collection_matchers
|
|
136
157
|
rubocop
|
|
158
|
+
simplecov (~> 0.22)
|
|
137
159
|
sqlite3
|
|
138
160
|
|
|
139
161
|
BUNDLED WITH
|
|
140
|
-
|
|
162
|
+
2.6.6
|
data/LICENSE.txt
CHANGED