cuke_modeler 3.5.0 → 3.6.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 +4 -4
- data/CHANGELOG.md +18 -2
- data/cuke_modeler.gemspec +1 -1
- data/lib/cuke_modeler/containing.rb +16 -0
- data/lib/cuke_modeler/models/model.rb +0 -1
- data/lib/cuke_modeler/models/row.rb +5 -0
- data/lib/cuke_modeler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 599071d6967852941776e6bcfe690c2fcdb9f294c99d497dd5f18b69305ca0ab
|
4
|
+
data.tar.gz: 7d51fc3ad42c67520a5c374d84ee178a1d6f1aae40d1208888d9c58bfdcef8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c9c233ece2d62ca17ae1a370918651c4b97ff96cff408059de93cd9bffd7ce9eed78b728fd56ea5c84d4e7234dc3977af9904e932924f2ec23ff9c94a3a09f9
|
7
|
+
data.tar.gz: fa19be7a982e76b4ce9fae430f633b5933a90ec44e6414da94c7d2ea2d668a526f26c4d7b8393354496ec241a73d3bf947bc5380da22266ca2a55073bfcb5430
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
8
8
|
|
9
9
|
Nothing yet...
|
10
10
|
|
11
|
+
## [3.6.0] - 2021-01-05
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- Ruby 3.x is now supported
|
15
|
+
- All models are now `Enumerable`. However, some methods such as `Enumerable#max` and `Enumerable#sort` do not work
|
16
|
+
because models do not meaningfully compare to each other.
|
17
|
+
|
18
|
+
### Deprecated
|
19
|
+
- `Model#each_descendant` and `Model#each_model` will be removed on the next major release. `Model#each` and methods in
|
20
|
+
the `Enumerable` module now provide this kind of functionality.
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
- `Row#children` now returns the row's `Cell` models instead of returning an empty array
|
24
|
+
|
25
|
+
|
11
26
|
## [3.5.0] - 2020-12-19
|
12
27
|
|
13
28
|
### Added
|
@@ -329,7 +344,7 @@ Nothing yet...
|
|
329
344
|
|
330
345
|
### Fixed
|
331
346
|
|
332
|
-
- Fixed a bug that was causing object comparison using
|
347
|
+
- Fixed a bug that was causing object comparison using `#==` to not
|
333
348
|
work when comparing some models to other types of objects.
|
334
349
|
|
335
350
|
|
@@ -340,7 +355,8 @@ Nothing yet...
|
|
340
355
|
- Initial release
|
341
356
|
|
342
357
|
|
343
|
-
[Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.
|
358
|
+
[Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v3.6.0...HEAD
|
359
|
+
[3.6.0]: https://github.com/enkessler/cuke_modeler/compare/v3.5.0...v3.6.0
|
344
360
|
[3.5.0]: https://github.com/enkessler/cuke_modeler/compare/v3.4.0...v3.5.0
|
345
361
|
[3.4.0]: https://github.com/enkessler/cuke_modeler/compare/v3.3.0...v3.4.0
|
346
362
|
[3.3.0]: https://github.com/enkessler/cuke_modeler/compare/v3.2.0...v3.3.0
|
data/cuke_modeler.gemspec
CHANGED
@@ -8,7 +8,22 @@ module CukeModeler
|
|
8
8
|
|
9
9
|
module Containing
|
10
10
|
|
11
|
+
include Enumerable
|
12
|
+
|
13
|
+
# Executes the given code block with this model and every model that is a child of this model. Exact
|
14
|
+
# order of model tree traversal is not guaranteed beyond the first model traversed, which will be the
|
15
|
+
# model that called this method.
|
16
|
+
def each(&block)
|
17
|
+
if block
|
18
|
+
block.call(self)
|
19
|
+
children.each { |child| child.each(&block) }
|
20
|
+
else
|
21
|
+
to_enum(:each)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
11
25
|
# Executes the given code block with every model that is a child of this model.
|
26
|
+
# DEPRECATED: use `Enumerable` module methods instead
|
12
27
|
def each_descendant(&block)
|
13
28
|
children.each do |child_model|
|
14
29
|
block.call(child_model)
|
@@ -17,6 +32,7 @@ module CukeModeler
|
|
17
32
|
end
|
18
33
|
|
19
34
|
# Executes the given code block with this model and every model that is a child of this model.
|
35
|
+
# DEPRECATED: use `Enumerable` module methods instead
|
20
36
|
def each_model(&block)
|
21
37
|
block.call(self)
|
22
38
|
|
@@ -25,6 +25,11 @@ module CukeModeler
|
|
25
25
|
populate_row(self, parsed_row_data)
|
26
26
|
end
|
27
27
|
|
28
|
+
# Returns the model objects that belong to this model.
|
29
|
+
def children
|
30
|
+
@cells
|
31
|
+
end
|
32
|
+
|
28
33
|
# Returns a string representation of this model. For a row model,
|
29
34
|
# this will be Gherkin text that is equivalent to the row being modeled.
|
30
35
|
def to_s
|
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.6.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:
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-gherkin
|
@@ -271,7 +271,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
271
271
|
version: '2.3'
|
272
272
|
- - "<"
|
273
273
|
- !ruby/object:Gem::Version
|
274
|
-
version: '
|
274
|
+
version: '4.0'
|
275
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
276
|
requirements:
|
277
277
|
- - ">="
|