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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 864d657afd1eb2d45bba31a210ed4025aed3756c5224d5c2a2bfb8d9b9baa469
4
- data.tar.gz: fc74f572c8518d5cb366e92a4799f6b74b176cc516c67cd6750432380404be49
3
+ metadata.gz: 8f3cf136399f60bcca2308f17e39c1846de1e443157ac433bcdb94f6937a3333
4
+ data.tar.gz: 5983deb45accf5811e0af7f251a15f37062600c7decbf543a021b3338578a9bc
5
5
  SHA512:
6
- metadata.gz: 75750f57520b8a9e535d8d26094d53fbff9678a41b3ccff12a01f0610f79cc876ee2b031a95be37e831da33d80fa7b8072ae6ef4c377be233dc87f4d2edc4994
7
- data.tar.gz: a409eaa3516d73efaf6da8d413bd426b48cd4b2aee19621982936fab6f0d79c830b8aae07b19d064b253f69445f4c26ab97700e08d14f0022ec9a54befbcd120
6
+ metadata.gz: bb54944c1e92864af9cfcdaca67dfe3988577394907fce3c682b02ea900b50bc89d6d89eb6cdc3cdb90cfc89c199391e02dbfd50ef158ba46f0ccb2129ef8100
7
+ data.tar.gz: 9d90540b249f759377eb7cde97dc567fb61bada43f09c19ad6afaa73fff53e97acfd781ff8014515b9a0b04b8d8772663b8fc367cc9e743e9b61a26f1db839e9
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.3.0)
4
+ cucumber_factory (2.3.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.3.0)
4
+ cucumber_factory (2.3.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.3.0)
4
+ cucumber_factory (2.3.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.3.0)
4
+ cucumber_factory (2.3.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -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 .+?))?(?:(?: and| but|,)*( is .+?))?' # ... belongs to the collection "Fantasy" and is trending
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 (.+?) (above|".+?"|\'.+?\')' # Given the movie "LotR" ...
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}#{TEXT_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
- object.overridable(:priority => descriptor[:priority] ? 1 : 0) if kind != :Before
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
@@ -1,3 +1,3 @@
1
1
  module CucumberFactory
2
- VERSION = '2.3.0'
2
+ VERSION = '2.3.1'
3
3
  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.0
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-09-24 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber