cuke_modeler 3.7.0 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abf3eb894f4814405982ec3e2e664b9b6b0ede9b4c3f41ac99148680e251fdf0
4
- data.tar.gz: 31e87cc947478d94ad6e5316315698b2af7a7280ecc062a670f9c70e399038fe
3
+ metadata.gz: 9d5e453bca4aedc66b163c8be53f3715c84a91a40626e804861bbc1939f350f3
4
+ data.tar.gz: f6e22f7e59a532867edd592793ac647dcf56c348eff539e79e0aecac66b65a5e
5
5
  SHA512:
6
- metadata.gz: cc973033937d9bad34a2a47da77901850e6ce2e9de6cf875a0d51f6fe634e64f48cf42d4a4ca154e308982dff0e945bd002df98a48e725c8a5705e2f78720522
7
- data.tar.gz: 73b177f6e22947a5301fbfae5a90fde84394e50adf5d7790f783d8fdea7f2b46c2b7025c0a483f80ce31f3707970051d8b7b3717299fd60adbbf6ab736e4cac6
6
+ metadata.gz: 32bfde87a1b5a0b672242abebd463ed7abd0664a258f8c036bed8506eb3e9b2ba109aa1bb5ed4d9d3a08388b350dc79605d1851545421510e4dd927a789eb7d7
7
+ data.tar.gz: 524f9c651f334fc3fb30d8288d3b5a2b9e6cc81460b6cc0f081d0a7ab314a343785344ff351060394685ad1d9fe463ef52a86633cf6763f4b1ea7f6ee2db382b
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
 
9
9
  Noting yet...
10
10
 
11
+ ## [3.8.0] - 2021-04-18
12
+
13
+ ### Added
14
+ - Support added for more versions of the `cucumber-gherkin` gem
15
+ - 18.x
16
+
11
17
 
12
18
  ## [3.7.0] - 2021-02-18
13
19
 
@@ -363,7 +369,8 @@ Noting yet...
363
369
  - Initial release
364
370
 
365
371
 
366
- [Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.7.0...HEAD
372
+ [Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.8.0...HEAD
373
+ [3.8.0]: https://github.com/enkessler/cuke_modeler/compare/v3.7.0...v3.8.0
367
374
  [3.7.0]: https://github.com/enkessler/cuke_modeler/compare/v3.6.0...v3.7.0
368
375
  [3.6.0]: https://github.com/enkessler/cuke_modeler/compare/v3.5.0...v3.6.0
369
376
  [3.5.0]: https://github.com/enkessler/cuke_modeler/compare/v3.4.0...v3.5.0
data/README.md CHANGED
@@ -21,7 +21,7 @@ Developer stuff:
21
21
  There comes a time in every programmer's adventures with Cucumber when they
22
22
  want to do Really Cool Stuff with their tests. This usually necessitates
23
23
  scanning all of their feature files and playing with the output. While the
24
- **[cucumber-gherkin](https://github.com/cucumber/cucumber/tree/master/gherkin)** gem does a fine job of parsing feature files, reading or even manipulating
24
+ **[cucumber-gherkin](https://github.com/cucumber/cucumber/tree/master/gherkin)** gem ([previously](https://github.com/enkessler/cuke_modeler/blob/master/CHANGELOG.md#300---2020-06-08) just the `gherkin` gem) does a fine job of parsing feature files, reading or even manipulating
25
25
  the resulting Abstract Syntax Tree is not always fun. **cuke_modeler** comes to
26
26
  the rescue by providing a modeling layer that is easier to work with.
27
27
 
data/cuke_modeler.gemspec CHANGED
@@ -36,14 +36,14 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.required_ruby_version = '>= 2.3', '< 4.0'
38
38
 
39
- spec.add_runtime_dependency 'cucumber-gherkin', '< 18.0'
39
+ spec.add_runtime_dependency 'cucumber-gherkin', '< 19.0'
40
40
 
41
41
  spec.add_development_dependency 'bundler', '< 3.0'
42
42
  spec.add_development_dependency 'childprocess', '< 5.0'
43
43
  spec.add_development_dependency 'coveralls', '< 1.0.0'
44
44
  spec.add_development_dependency 'ffi', '< 2.0' # This is an invisible dependency for the `childprocess` gem on Windows
45
45
  # Cucumber 4.x is the earliest version to use cucumber-gherkin
46
- spec.add_development_dependency 'cucumber', '>= 4.0.0', '< 6.0.0'
46
+ spec.add_development_dependency 'cucumber', '>= 4.0.0', '< 7.0.0'
47
47
  spec.add_development_dependency 'rainbow', '< 4.0.0'
48
48
  spec.add_development_dependency 'rake', '< 14.0.0'
49
49
  spec.add_development_dependency 'rspec', '~> 3.0'
@@ -0,0 +1,13 @@
1
+ require_relative 'gherkin_9_adapter'
2
+
3
+
4
+ module CukeModeler
5
+
6
+ # NOT A PART OF THE PUBLIC API
7
+ # An adapter that can convert the output of version 18.x of the *cucumber-gherkin* gem into input that is consumable
8
+ # by this gem.
9
+
10
+ class Gherkin18Adapter < Gherkin9Adapter
11
+
12
+ end
13
+ end
@@ -3,22 +3,13 @@
3
3
  require 'gherkin'
4
4
 
5
5
 
6
- # The *cucumber-gherkin* gem loads differently and has different grammar rules across major versions. Parsing
7
- # will be done with an 'adapter' appropriate to the version of the *cucumber-gherkin* gem that has been activated.
8
-
6
+ # The *cucumber-gherkin* has different grammar rules across major versions. Parsing will be done with
7
+ # an 'adapter' appropriate to the version of the *cucumber-gherkin* gem that has been activated.
9
8
  gherkin_version = Gem.loaded_specs['cucumber-gherkin'].version.version
10
9
  gherkin_major_version = gherkin_version.match(/^(\d+)\./)[1].to_i
10
+ supported_gherkin_versions = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
11
11
 
12
- # Previous versions of the gem did not use the conventional entry point, so I'm leaving this here in case it
13
- # changes again
14
- # rubocop:disable Lint/EmptyWhen
15
- case gherkin_major_version
16
- when 9, 10, 11, 12, 13, 14, 15, 16, 17
17
- # Currently nothing else to load beyond the entry point to the gem
18
- else
19
- raise("Unknown Gherkin version: '#{gherkin_version}'")
20
- end
21
- # rubocop:enable Lint/EmptyWhen
12
+ raise("Unknown Gherkin version: '#{gherkin_version}'") unless supported_gherkin_versions.include?(gherkin_major_version)
22
13
 
23
14
  require "cuke_modeler/adapters/gherkin_#{gherkin_major_version}_adapter"
24
15
 
@@ -70,7 +61,7 @@ module CukeModeler
70
61
  # inside of it, so I'm leaving this here in case it changes again
71
62
  # rubocop:disable Lint/DuplicateMethods
72
63
  case gherkin_major_version
73
- when 13, 14, 15, 16, 17
64
+ when 13, 14, 15, 16, 17, 18
74
65
  # TODO: make these methods private?
75
66
  # NOT A PART OF THE PUBLIC API
76
67
  # The method to use for parsing Gherkin text
@@ -1,4 +1,4 @@
1
1
  module CukeModeler
2
2
  # The gem version
3
- VERSION = '3.7.0'.freeze
3
+ VERSION = '3.8.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuke_modeler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kessler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-gherkin
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '18.0'
19
+ version: '19.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "<"
25
25
  - !ruby/object:Gem::Version
26
- version: '18.0'
26
+ version: '19.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: 4.0.0
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: 6.0.0
92
+ version: 7.0.0
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: 4.0.0
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: 6.0.0
102
+ version: 7.0.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rainbow
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -224,6 +224,7 @@ files:
224
224
  - lib/cuke_modeler/adapters/gherkin_15_adapter.rb
225
225
  - lib/cuke_modeler/adapters/gherkin_16_adapter.rb
226
226
  - lib/cuke_modeler/adapters/gherkin_17_adapter.rb
227
+ - lib/cuke_modeler/adapters/gherkin_18_adapter.rb
227
228
  - lib/cuke_modeler/adapters/gherkin_9_adapter.rb
228
229
  - lib/cuke_modeler/containing.rb
229
230
  - lib/cuke_modeler/described.rb