cucumber_factory 2.3.0 → 2.3.1
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 +6 -0
- data/Gemfile.cucumber-1.3.lock +1 -1
- data/Gemfile.cucumber-2.4.lock +1 -1
- data/Gemfile.cucumber-3.0.lock +1 -1
- data/Gemfile.cucumber-3.1.lock +1 -1
- data/lib/cucumber_factory/factory.rb +6 -5
- data/lib/cucumber_factory/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3cf136399f60bcca2308f17e39c1846de1e443157ac433bcdb94f6937a3333
|
4
|
+
data.tar.gz: 5983deb45accf5811e0af7f251a15f37062600c7decbf543a021b3338578a9bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb54944c1e92864af9cfcdaca67dfe3988577394907fce3c682b02ea900b50bc89d6d89eb6cdc3cdb90cfc89c199391e02dbfd50ef158ba46f0ccb2129ef8100
|
7
|
+
data.tar.gz: 9d90540b249f759377eb7cde97dc567fb61bada43f09c19ad6afaa73fff53e97acfd781ff8014515b9a0b04b8d8772663b8fc367cc9e743e9b61a26f1db839e9
|
data/CHANGELOG.md
CHANGED
@@ -15,6 +15,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
15
15
|
|
16
16
|
-
|
17
17
|
|
18
|
+
## 2.3.1 - 2020-10-01
|
19
|
+
|
20
|
+
### Compatible changes
|
21
|
+
|
22
|
+
- Lowered the priority of all steps in this gem to avoid issues with overlapping steps.
|
23
|
+
|
18
24
|
## 2.3.0 - 2020-09-24
|
19
25
|
|
20
26
|
### Compatible changes
|
data/Gemfile.cucumber-1.3.lock
CHANGED
data/Gemfile.cucumber-2.4.lock
CHANGED
data/Gemfile.cucumber-3.0.lock
CHANGED
data/Gemfile.cucumber-3.1.lock
CHANGED
@@ -4,12 +4,12 @@ module CucumberFactory
|
|
4
4
|
|
5
5
|
ATTRIBUTES_PATTERN = '( with the .+?)?( (?:which|who|that) is .+?)?' # ... with the year 1979 which is science fiction
|
6
6
|
TEXT_ATTRIBUTES_PATTERN = ' (?:with|and) these attributes:'
|
7
|
-
UPDATE_ATTR_PATTERN = '(?: (?:has|belongs to)( the .+?)
|
7
|
+
UPDATE_ATTR_PATTERN = '(?: (?:has|belongs to)( the .+?)|(?: and| but|,)*( is .+?))' # ... belongs to the collection "Fantasy" and is trending
|
8
8
|
TEXT_UPDATE_ATTR_PATTERN = '(?: and|,)* has these attributes:'
|
9
9
|
|
10
10
|
RECORD_PATTERN = 'there is an? (.+?)( \(.+?\))?' # Given there is a movie (comedy)
|
11
11
|
NAMED_RECORD_PATTERN = '(?:"([^\"]*)"|\'([^\']*)\') is an? (.+?)( \(.+?\))?' # Given "LotR" is a movie
|
12
|
-
RECORD_UPDATE_PATTERN = 'the (
|
12
|
+
RECORD_UPDATE_PATTERN = 'the ([^"\',]+?) (above|".+?"|\'.+?\')' # Given the movie "LotR" ...
|
13
13
|
|
14
14
|
NAMED_RECORDS_VARIABLE = :'@named_cucumber_factory_records'
|
15
15
|
|
@@ -45,7 +45,7 @@ module CucumberFactory
|
|
45
45
|
|
46
46
|
UPDATE_STEP_DESCRIPTOR = {
|
47
47
|
:kind => :And,
|
48
|
-
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}
|
48
|
+
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}+$/,
|
49
49
|
:block => lambda { |a1, a2, a3, a4| CucumberFactory::Factory.send(:parse_update, self, a1, a2, a3, a4) }
|
50
50
|
}
|
51
51
|
|
@@ -65,7 +65,7 @@ module CucumberFactory
|
|
65
65
|
|
66
66
|
UPDATE_STEP_DESCRIPTOR_WITH_TEXT_ATTRIBUTES = {
|
67
67
|
:kind => :And,
|
68
|
-
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}
|
68
|
+
:pattern => /^#{RECORD_UPDATE_PATTERN}#{UPDATE_ATTR_PATTERN}*#{TEXT_UPDATE_ATTR_PATTERN}$/,
|
69
69
|
:block => lambda { |a1, a2, a3, a4, a5| CucumberFactory::Factory.send(:parse_update, self, a1, a2, a3, a4, a5) },
|
70
70
|
:priority => true
|
71
71
|
}
|
@@ -88,7 +88,8 @@ module CucumberFactory
|
|
88
88
|
main.instance_eval {
|
89
89
|
kind = descriptor[:kind]
|
90
90
|
object = send(kind, *[descriptor[:pattern]].compact, &descriptor[:block])
|
91
|
-
|
91
|
+
# cucumber_factory steps get a low priority due to their generic syntax
|
92
|
+
object.overridable(:priority => descriptor[:priority] ? -1 : -2) if kind != :Before
|
92
93
|
object
|
93
94
|
}
|
94
95
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|