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.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.rubocop.yml +12 -24
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +73 -0
  6. data/DEVELOPMENT.md +14 -0
  7. data/Gemfile +17 -2
  8. data/Gemfile.lock +132 -110
  9. data/LICENSE.txt +1 -1
  10. data/README.md +63 -76
  11. data/Rakefile +15 -18
  12. data/active_cucumber.gemspec +22 -27
  13. data/cucumber.yml +1 -0
  14. data/documentation/horizontal_diff.png +0 -0
  15. data/documentation/vertical_diff.png +0 -0
  16. data/dprint.json +11 -0
  17. data/features/active_cucumber/attributes_for.feature +2 -12
  18. data/features/active_cucumber/create_many.feature +7 -13
  19. data/features/active_cucumber/create_one.feature +5 -9
  20. data/features/active_cucumber/diff_all/arrays_of_objects.feature +2 -11
  21. data/features/active_cucumber/diff_all/context_values.feature +1 -10
  22. data/features/active_cucumber/diff_all/converting_data.feature +4 -13
  23. data/features/active_cucumber/diff_all/filtering_columns.feature +2 -11
  24. data/features/active_cucumber/diff_all/filtering_rows.feature +2 -13
  25. data/features/active_cucumber/diff_all/mismatching_data.feature +4 -14
  26. data/features/active_cucumber/diff_one.feature +8 -13
  27. data/features/step_definitions/steps.rb +16 -15
  28. data/features/support/director.rb +2 -0
  29. data/features/support/env.rb +23 -25
  30. data/features/support/episode.rb +2 -0
  31. data/features/support/episode_creator.rb +6 -6
  32. data/features/support/episode_cucumberator.rb +2 -2
  33. data/features/support/genre.rb +2 -0
  34. data/features/support/show.rb +2 -0
  35. data/features/support/show_creator.rb +5 -4
  36. data/features/support/show_cucumberator.rb +3 -3
  37. data/features/support/subscription.rb +2 -0
  38. data/features/support/subscription_creator.rb +6 -6
  39. data/features/support/subscription_cucumberator.rb +4 -4
  40. data/lib/active_cucumber/active_record_builder.rb +26 -18
  41. data/lib/active_cucumber/creator.rb +44 -25
  42. data/lib/active_cucumber/cucumberator.rb +17 -15
  43. data/lib/active_cucumber/cucumparer.rb +13 -12
  44. data/lib/active_cucumber.rb +97 -25
  45. metadata +26 -166
  46. data/.coveralls.yml +0 -1
  47. data/circle.yml +0 -16
  48. data/cucumber_lint.yml +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bce953289c746351ec8d20989d7ee053ba1350a3
4
- data.tar.gz: 09cdbdbddcceb91aa82000d6b86b856a12ed66cc
2
+ SHA256:
3
+ metadata.gz: 5efdfe95694b05ce4b86d7551cd2fa1902fb523169024b123c1ea1e823ed5487
4
+ data.tar.gz: 041a943efc320b6611edabb3067bc0159e4cddf80a11efdb7c016470858f1b94
5
5
  SHA512:
6
- metadata.gz: 6176ae5507fe390ddb9dc53c6898c07dfda85ccde07b362755cb956c5c6d9927e7b4d02dd9e732ffc4201e3c9ab18d1f6afefdcf92b9e0ca7342dc5aaf6359d1
7
- data.tar.gz: b61c4e86ff167e45f89fb67d30c35000ead2efb3c72659fb314b91b8295b46cf9a16f180070efa2ddf0add06d5771b93d796dacf8f469e0a6b9d334e4703ca5f
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
- - '**/Rakefile'
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
- Style/AccessModifierIndentation:
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
- Enabled: false
24
-
25
- Style/EmptyLines:
26
- Enabled: false
27
-
28
- Style/EmptyLinesAroundClassBody:
29
- Enabled: false
16
+ Exclude:
17
+ - "features/support/*"
30
18
 
31
- Style/EmptyLinesAroundModuleBody:
32
- EnforcedStyle: empty_lines
19
+ Style/StringLiterals:
20
+ EnforcedStyle: double_quotes
33
21
 
34
- Style/MethodDefParentheses:
35
- EnforcedStyle: require_no_parentheses
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 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in mortadella.gemspec
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.0.0)
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 (4.2.5)
10
- activesupport (= 4.2.5)
11
- builder (~> 3.1)
12
- activerecord (4.2.5)
13
- activemodel (= 4.2.5)
14
- activesupport (= 4.2.5)
15
- arel (~> 6.0)
16
- activesupport (4.2.5)
17
- i18n (~> 0.7)
18
- json (~> 1.7, >= 1.7.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.3)
23
- ast (2.1.0)
24
- astrolabe (1.3.1)
25
- parser (~> 2.2)
26
- builder (3.2.2)
27
- colorize (0.7.7)
28
- coveralls (0.8.10)
29
- json (~> 1.8)
30
- rest-client (>= 1.6.8, < 2)
31
- simplecov (~> 0.11.0)
32
- term-ansicolor (~> 1.3)
33
- thor (~> 0.19.1)
34
- tins (~> 1.6.0)
35
- cucumber (2.1.0)
36
- builder (>= 2.1.2)
37
- cucumber-core (~> 1.3.0)
38
- diff-lcs (>= 1.1.3)
39
- gherkin3 (~> 3.1.0)
40
- multi_json (>= 1.7.5, < 2.0)
41
- multi_test (>= 0.1.2)
42
- cucumber-core (1.3.0)
43
- gherkin3 (~> 3.1.0)
44
- cucumber_lint (0.1.2)
45
- colorize (~> 0.7.7)
46
- gherkin (~> 2.12.2)
47
- multi_json (~> 1.11.2)
48
- diff-lcs (1.2.5)
49
- docile (1.1.5)
50
- domain_name (0.5.25)
51
- unf (>= 0.0.5, < 1.0.0)
52
- factory_girl (4.7.0)
53
- activesupport (>= 3.0.0)
54
- faker (1.6.1)
55
- i18n (~> 0.5)
56
- gherkin (2.12.2)
57
- multi_json (~> 1.3)
58
- gherkin3 (3.1.2)
59
- http-cookie (1.0.2)
60
- domain_name (~> 0.5)
61
- i18n (0.7.0)
62
- json (1.8.3)
63
- kappamaki (0.0.3)
64
- mime-types (2.99)
65
- minitest (5.8.4)
66
- mortadella (0.2.2)
67
- multi_json (1.11.2)
68
- multi_test (0.1.2)
69
- netrc (0.11.0)
70
- parser (2.2.3.0)
71
- ast (>= 1.1, < 3.0)
72
- powerpack (0.1.1)
73
- rainbow (2.0.0)
74
- rake (10.4.2)
75
- rest-client (1.8.0)
76
- http-cookie (>= 1.0.2, < 2.0)
77
- mime-types (>= 1.16, < 3.0)
78
- netrc (~> 0.7)
79
- rspec (3.4.0)
80
- rspec-core (~> 3.4.0)
81
- rspec-expectations (~> 3.4.0)
82
- rspec-mocks (~> 3.4.0)
83
- rspec-collection_matchers (1.1.2)
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.4.1)
86
- rspec-support (~> 3.4.0)
87
- rspec-expectations (3.4.0)
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.4.0)
90
- rspec-mocks (3.4.0)
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.4.0)
93
- rspec-support (3.4.1)
94
- rubocop (0.35.1)
95
- astrolabe (~> 1.3)
96
- parser (>= 2.2.3.0, < 3.0)
97
- powerpack (~> 0.1)
98
- rainbow (>= 1.99.1, < 3.0)
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
- tins (<= 1.6.0)
101
- ruby-progressbar (1.7.5)
102
- simplecov (0.11.1)
103
- docile (~> 1.1.0)
104
- json (~> 1.8)
105
- simplecov-html (~> 0.10.0)
106
- simplecov-html (0.10.0)
107
- sqlite3 (1.3.11)
108
- term-ansicolor (1.3.2)
109
- tins (~> 1.0)
110
- thor (0.19.1)
111
- thread_safe (0.3.5)
112
- tins (1.6.0)
113
- tzinfo (1.2.2)
114
- thread_safe (~> 0.1)
115
- unf (0.1.4)
116
- unf_ext
117
- unf_ext (0.0.7.1)
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
- cucumber_lint
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
- 1.11.2
162
+ 2.6.6
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Originate
1
+ Copyright (c) 2015 Kevin Goslar
2
2
 
3
3
  MIT License
4
4