cuke_modeler 3.6.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/LICENSE.txt +1 -1
- data/README.md +6 -6
- data/cuke_modeler.gemspec +13 -3
- data/lib/cuke_modeler.rb +0 -1
- data/lib/cuke_modeler/adapters/gherkin_17_adapter.rb +13 -0
- data/lib/cuke_modeler/adapters/gherkin_9_adapter.rb +0 -1
- data/lib/cuke_modeler/containing.rb +1 -2
- data/lib/cuke_modeler/described.rb +0 -1
- data/lib/cuke_modeler/models/background.rb +0 -1
- data/lib/cuke_modeler/models/cell.rb +0 -1
- data/lib/cuke_modeler/models/comment.rb +0 -1
- data/lib/cuke_modeler/models/directory.rb +2 -3
- data/lib/cuke_modeler/models/doc_string.rb +0 -1
- data/lib/cuke_modeler/models/example.rb +0 -1
- data/lib/cuke_modeler/models/feature.rb +0 -1
- data/lib/cuke_modeler/models/feature_file.rb +0 -1
- data/lib/cuke_modeler/models/model.rb +0 -1
- data/lib/cuke_modeler/models/outline.rb +0 -1
- data/lib/cuke_modeler/models/row.rb +0 -1
- data/lib/cuke_modeler/models/rule.rb +0 -1
- data/lib/cuke_modeler/models/scenario.rb +0 -1
- data/lib/cuke_modeler/models/step.rb +0 -1
- data/lib/cuke_modeler/models/table.rb +0 -1
- data/lib/cuke_modeler/models/tag.rb +0 -1
- data/lib/cuke_modeler/named.rb +0 -1
- data/lib/cuke_modeler/nested.rb +0 -1
- data/lib/cuke_modeler/parsed.rb +0 -1
- data/lib/cuke_modeler/parsing.rb +2 -3
- data/lib/cuke_modeler/sourceable.rb +0 -1
- data/lib/cuke_modeler/stepped.rb +0 -1
- data/lib/cuke_modeler/taggable.rb +0 -1
- data/lib/cuke_modeler/version.rb +1 -1
- metadata +64 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf3eb894f4814405982ec3e2e664b9b6b0ede9b4c3f41ac99148680e251fdf0
|
4
|
+
data.tar.gz: 31e87cc947478d94ad6e5316315698b2af7a7280ecc062a670f9c70e399038fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc973033937d9bad34a2a47da77901850e6ce2e9de6cf875a0d51f6fe634e64f48cf42d4a4ca154e308982dff0e945bd002df98a48e725c8a5705e2f78720522
|
7
|
+
data.tar.gz: 73b177f6e22947a5301fbfae5a90fde84394e50adf5d7790f783d8fdea7f2b46c2b7025c0a483f80ce31f3707970051d8b7b3717299fd60adbbf6ab736e4cac6
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
|
9
|
+
Noting yet...
|
10
|
+
|
11
|
+
|
12
|
+
## [3.7.0] - 2021-02-18
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Support added for more versions of the `cucumber-gherkin` gem
|
16
|
+
- 17.x
|
17
|
+
|
10
18
|
|
11
19
|
## [3.6.0] - 2021-01-05
|
12
20
|
|
@@ -355,7 +363,8 @@ Nothing yet...
|
|
355
363
|
- Initial release
|
356
364
|
|
357
365
|
|
358
|
-
[Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.
|
366
|
+
[Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.7.0...HEAD
|
367
|
+
[3.7.0]: https://github.com/enkessler/cuke_modeler/compare/v3.6.0...v3.7.0
|
359
368
|
[3.6.0]: https://github.com/enkessler/cuke_modeler/compare/v3.5.0...v3.6.0
|
360
369
|
[3.5.0]: https://github.com/enkessler/cuke_modeler/compare/v3.4.0...v3.5.0
|
361
370
|
[3.4.0]: https://github.com/enkessler/cuke_modeler/compare/v3.3.0...v3.4.0
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -4,15 +4,15 @@ Basic stuff:
|
|
4
4
|
[![Downloads](https://img.shields.io/gem/dt/cuke_modeler.svg)](https://rubygems.org/gems/cuke_modeler)
|
5
5
|
|
6
6
|
User stuff:
|
7
|
-
[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://
|
7
|
+
[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://github.com/enkessler/cuke_modeler/tree/master/testing/cucumber/features)
|
8
8
|
[![Yard Docs](http://img.shields.io/badge/Documentation-API-blue.svg)](https://www.rubydoc.info/gems/cuke_modeler)
|
9
9
|
|
10
10
|
Developer stuff:
|
11
|
-
[![Build Status](https://travis-ci.org/enkessler/cuke_modeler.svg)](https://travis-ci.org/enkessler/cuke_modeler)
|
12
|
-
[![Build status](https://ci.appveyor.com/api/projects/status/is8xqvoqn3pjh9l0?svg=true)](https://ci.appveyor.com/project/enkessler/cuke-modeler)
|
13
|
-
[![Coverage Status](https://coveralls.io/repos/github/enkessler/cuke_modeler/badge.svg)](https://coveralls.io/github/enkessler/cuke_modeler)
|
11
|
+
[![Build Status](https://travis-ci.org/enkessler/cuke_modeler.svg?branch=master)](https://travis-ci.org/enkessler/cuke_modeler)
|
12
|
+
[![Build status](https://ci.appveyor.com/api/projects/status/is8xqvoqn3pjh9l0/branch/master?svg=true)](https://ci.appveyor.com/project/enkessler/cuke-modeler)
|
13
|
+
[![Coverage Status](https://coveralls.io/repos/github/enkessler/cuke_modeler/badge.svg?branch=master)](https://coveralls.io/github/enkessler/cuke_modeler?branch=master)
|
14
14
|
[![Maintainability](https://api.codeclimate.com/v1/badges/83986d8f7a918fed9707/maintainability)](https://codeclimate.com/github/enkessler/cuke_modeler/maintainability)
|
15
|
-
[![Inline docs](http://inch-ci.org/github/enkessler/cuke_modeler.svg)](https://inch-ci.org/github/enkessler/cuke_modeler)
|
15
|
+
[![Inline docs](http://inch-ci.org/github/enkessler/cuke_modeler.svg?branch=master)](https://inch-ci.org/github/enkessler/cuke_modeler)
|
16
16
|
|
17
17
|
---
|
18
18
|
|
@@ -84,7 +84,7 @@ an entire test suite!
|
|
84
84
|
|
85
85
|
For more information on the different models (which more or less have the same relation
|
86
86
|
to each other as described in the AST [here](https://github.com/cucumber/cucumber/tree/master/gherkin#ast)) and how to use them, see the
|
87
|
-
[documentation](https://
|
87
|
+
[documentation](https://github.com/enkessler/cuke_modeler/tree/master/testing/cucumber/features).
|
88
88
|
|
89
89
|
## Modeling dialects other than English
|
90
90
|
|
data/cuke_modeler.gemspec
CHANGED
@@ -13,10 +13,18 @@ Gem::Specification.new do |spec|
|
|
13
13
|
"Abstract Syntax Tree that the 'cucumber-gherkin' gem generates when parsing features, ",
|
14
14
|
'as well as providing models for feature files and directories in order to be able to ',
|
15
15
|
"have a fully traversable model tree of a test suite's structure. These models can then ",
|
16
|
-
'be analyzed or manipulated more easily than the underlying AST layer.'].join
|
16
|
+
'be analyzed or manipulated more easily than the underlying AST layer.'].join
|
17
17
|
spec.homepage = 'https://github.com/enkessler/cuke_modeler'
|
18
18
|
spec.license = 'MIT'
|
19
19
|
|
20
|
+
spec.metadata = {
|
21
|
+
'bug_tracker_uri' => 'https://github.com/enkessler/cuke_modeler/issues',
|
22
|
+
'changelog_uri' => 'https://github.com/enkessler/cuke_modeler/blob/master/CHANGELOG.md',
|
23
|
+
'documentation_uri' => 'https://www.rubydoc.info/gems/cuke_modeler',
|
24
|
+
'homepage_uri' => 'https://github.com/enkessler/cuke_modeler',
|
25
|
+
'source_code_uri' => 'https://github.com/enkessler/cuke_modeler'
|
26
|
+
}
|
27
|
+
|
20
28
|
# Specify which files should be added to the gem when it is released.
|
21
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
30
|
spec.files = Dir.chdir(File.expand_path('', __dir__)) do
|
@@ -28,13 +36,14 @@ Gem::Specification.new do |spec|
|
|
28
36
|
|
29
37
|
spec.required_ruby_version = '>= 2.3', '< 4.0'
|
30
38
|
|
31
|
-
spec.add_runtime_dependency 'cucumber-gherkin', '<
|
39
|
+
spec.add_runtime_dependency 'cucumber-gherkin', '< 18.0'
|
32
40
|
|
33
41
|
spec.add_development_dependency 'bundler', '< 3.0'
|
42
|
+
spec.add_development_dependency 'childprocess', '< 5.0'
|
34
43
|
spec.add_development_dependency 'coveralls', '< 1.0.0'
|
44
|
+
spec.add_development_dependency 'ffi', '< 2.0' # This is an invisible dependency for the `childprocess` gem on Windows
|
35
45
|
# Cucumber 4.x is the earliest version to use cucumber-gherkin
|
36
46
|
spec.add_development_dependency 'cucumber', '>= 4.0.0', '< 6.0.0'
|
37
|
-
spec.add_development_dependency 'racatt', '~> 1.0'
|
38
47
|
spec.add_development_dependency 'rainbow', '< 4.0.0'
|
39
48
|
spec.add_development_dependency 'rake', '< 14.0.0'
|
40
49
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
@@ -44,4 +53,5 @@ Gem::Specification.new do |spec|
|
|
44
53
|
# Coveralls gem does not support any newer version than this
|
45
54
|
spec.add_development_dependency 'simplecov', '<= 0.16.1'
|
46
55
|
spec.add_development_dependency 'test-unit', '< 4.0.0'
|
56
|
+
spec.add_development_dependency 'yard', '< 1.0'
|
47
57
|
end
|
data/lib/cuke_modeler.rb
CHANGED
@@ -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 17.x of the *cucumber-gherkin* gem into input that is consumable
|
8
|
+
# by this gem.
|
9
|
+
|
10
|
+
class Gherkin17Adapter < Gherkin9Adapter
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -6,7 +6,6 @@ module CukeModeler
|
|
6
6
|
# NOT A PART OF THE PUBLIC API
|
7
7
|
# An adapter that can convert the output of version 9.x of the *cucumber-gherkin* gem into input that is consumable
|
8
8
|
# by this gem.
|
9
|
-
|
10
9
|
class Gherkin9Adapter
|
11
10
|
|
12
11
|
# Adapts the given AST into the shape that this gem expects
|
@@ -5,14 +5,13 @@ module CukeModeler
|
|
5
5
|
|
6
6
|
# NOT A PART OF THE PUBLIC API
|
7
7
|
# A mix-in module containing methods used by models that contain other models.
|
8
|
-
|
9
8
|
module Containing
|
10
9
|
|
11
10
|
include Enumerable
|
12
11
|
|
13
12
|
# Executes the given code block with this model and every model that is a child of this model. Exact
|
14
13
|
# order of model tree traversal is not guaranteed beyond the first model traversed, which will be the
|
15
|
-
# model that called this method.
|
14
|
+
# model that called this method. If no block is provided, an `Enumerator` is returned instead.
|
16
15
|
def each(&block)
|
17
16
|
if block
|
18
17
|
block.call(self)
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module CukeModeler
|
2
2
|
|
3
3
|
# A class modeling a directory in a Cucumber suite.
|
4
|
-
|
5
4
|
class Directory < Model
|
6
5
|
|
7
6
|
|
@@ -52,8 +51,8 @@ module CukeModeler
|
|
52
51
|
|
53
52
|
|
54
53
|
def process_directory(directory_path)
|
55
|
-
directory_data = { 'path'
|
56
|
-
'directories'
|
54
|
+
directory_data = { 'path' => directory_path,
|
55
|
+
'directories' => [],
|
57
56
|
'feature_files' => [] }
|
58
57
|
|
59
58
|
entries = Dir.entries(directory_path)
|
data/lib/cuke_modeler/named.rb
CHANGED
data/lib/cuke_modeler/nested.rb
CHANGED
data/lib/cuke_modeler/parsed.rb
CHANGED
data/lib/cuke_modeler/parsing.rb
CHANGED
@@ -13,7 +13,7 @@ gherkin_major_version = gherkin_version.match(/^(\d+)\./)[1].to_i
|
|
13
13
|
# changes again
|
14
14
|
# rubocop:disable Lint/EmptyWhen
|
15
15
|
case gherkin_major_version
|
16
|
-
when 9, 10, 11, 12, 13, 14, 15, 16
|
16
|
+
when 9, 10, 11, 12, 13, 14, 15, 16, 17
|
17
17
|
# Currently nothing else to load beyond the entry point to the gem
|
18
18
|
else
|
19
19
|
raise("Unknown Gherkin version: '#{gherkin_version}'")
|
@@ -26,7 +26,6 @@ require "cuke_modeler/adapters/gherkin_#{gherkin_major_version}_adapter"
|
|
26
26
|
module CukeModeler
|
27
27
|
|
28
28
|
# A module providing source text parsing functionality.
|
29
|
-
|
30
29
|
module Parsing
|
31
30
|
|
32
31
|
class << self
|
@@ -71,7 +70,7 @@ module CukeModeler
|
|
71
70
|
# inside of it, so I'm leaving this here in case it changes again
|
72
71
|
# rubocop:disable Lint/DuplicateMethods
|
73
72
|
case gherkin_major_version
|
74
|
-
when 13, 14, 15, 16
|
73
|
+
when 13, 14, 15, 16, 17
|
75
74
|
# TODO: make these methods private?
|
76
75
|
# NOT A PART OF THE PUBLIC API
|
77
76
|
# The method to use for parsing Gherkin text
|
data/lib/cuke_modeler/stepped.rb
CHANGED
data/lib/cuke_modeler/version.rb
CHANGED
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.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kessler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-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: '
|
19
|
+
version: '18.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: '
|
26
|
+
version: '18.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "<"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: childprocess
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "<"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: coveralls
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,39 +67,39 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: 1.0.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: ffi
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 4.0.0
|
62
73
|
- - "<"
|
63
74
|
- !ruby/object:Gem::Version
|
64
|
-
version:
|
75
|
+
version: '2.0'
|
65
76
|
type: :development
|
66
77
|
prerelease: false
|
67
78
|
version_requirements: !ruby/object:Gem::Requirement
|
68
79
|
requirements:
|
69
|
-
- - ">="
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: 4.0.0
|
72
80
|
- - "<"
|
73
81
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
82
|
+
version: '2.0'
|
75
83
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
84
|
+
name: cucumber
|
77
85
|
requirement: !ruby/object:Gem::Requirement
|
78
86
|
requirements:
|
79
|
-
- - "
|
87
|
+
- - ">="
|
80
88
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
89
|
+
version: 4.0.0
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 6.0.0
|
82
93
|
type: :development
|
83
94
|
prerelease: false
|
84
95
|
version_requirements: !ruby/object:Gem::Requirement
|
85
96
|
requirements:
|
86
|
-
- - "
|
97
|
+
- - ">="
|
87
98
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
99
|
+
version: 4.0.0
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 6.0.0
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: rainbow
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,13 +184,27 @@ dependencies:
|
|
170
184
|
- - "<"
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: 4.0.0
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: yard
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "<"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '1.0'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "<"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '1.0'
|
201
|
+
description: This gem facilitates modeling a test suite that is written in Gherkin
|
202
|
+
(e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by providing an abstraction
|
203
|
+
layer on top of the Abstract Syntax Tree that the 'cucumber-gherkin' gem generates
|
204
|
+
when parsing features, as well as providing models for feature files and directories
|
205
|
+
in order to be able to have a fully traversable model tree of a test suite's structure.
|
206
|
+
These models can then be analyzed or manipulated more easily than the underlying
|
207
|
+
AST layer.
|
180
208
|
email:
|
181
209
|
- morrow748@gmail.com
|
182
210
|
executables: []
|
@@ -195,6 +223,7 @@ files:
|
|
195
223
|
- lib/cuke_modeler/adapters/gherkin_14_adapter.rb
|
196
224
|
- lib/cuke_modeler/adapters/gherkin_15_adapter.rb
|
197
225
|
- lib/cuke_modeler/adapters/gherkin_16_adapter.rb
|
226
|
+
- lib/cuke_modeler/adapters/gherkin_17_adapter.rb
|
198
227
|
- lib/cuke_modeler/adapters/gherkin_9_adapter.rb
|
199
228
|
- lib/cuke_modeler/containing.rb
|
200
229
|
- lib/cuke_modeler/described.rb
|
@@ -259,8 +288,13 @@ files:
|
|
259
288
|
homepage: https://github.com/enkessler/cuke_modeler
|
260
289
|
licenses:
|
261
290
|
- MIT
|
262
|
-
metadata:
|
263
|
-
|
291
|
+
metadata:
|
292
|
+
bug_tracker_uri: https://github.com/enkessler/cuke_modeler/issues
|
293
|
+
changelog_uri: https://github.com/enkessler/cuke_modeler/blob/master/CHANGELOG.md
|
294
|
+
documentation_uri: https://www.rubydoc.info/gems/cuke_modeler
|
295
|
+
homepage_uri: https://github.com/enkessler/cuke_modeler
|
296
|
+
source_code_uri: https://github.com/enkessler/cuke_modeler
|
297
|
+
post_install_message:
|
264
298
|
rdoc_options: []
|
265
299
|
require_paths:
|
266
300
|
- lib
|
@@ -278,9 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
312
|
- !ruby/object:Gem::Version
|
279
313
|
version: '0'
|
280
314
|
requirements: []
|
281
|
-
|
282
|
-
|
283
|
-
signing_key:
|
315
|
+
rubygems_version: 3.2.3
|
316
|
+
signing_key:
|
284
317
|
specification_version: 4
|
285
318
|
summary: A gem providing functionality to model Gherkin based test suites.
|
286
319
|
test_files: []
|