cucumber-expressions 5.0.15 → 5.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/cucumber-expressions.gemspec +1 -1
- data/lib/cucumber/cucumber_expressions/group.rb +1 -1
- data/lib/cucumber/cucumber_expressions/parameter_type.rb +1 -10
- data/lib/cucumber/cucumber_expressions/regular_expression.rb +1 -1
- data/spec/cucumber/cucumber_expressions/regular_expression_spec.rb +8 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3ec8af84d4cb8b2d1c099e2329c59b3a02e9a6b74e2fe41709b5d337e7126f2a
|
4
|
+
data.tar.gz: 03bb66e968f2e0544958c105e4ff9def0f8579b4bf2f0fb2a26403f9bd95e790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 736d0d6e20355ac8dbc433c7d5e976dcccd422d33485ec141931bd1ca4f90c5e9d74c5e8ae9282bb2fedd9db332e02310ed554c120de743312bbc8c564328375
|
7
|
+
data.tar.gz: 7ea16575a99faaacfa248963941eafaac3913804b3ec0cba93a6c02c1f59b7f1332719afe004652bf0a368e7e9c7c3d9d2ed0ef3ecd9da9d2e4bceee2d62677a
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'cucumber-expressions'
|
4
|
-
s.version = '5.0.
|
4
|
+
s.version = '5.0.16'
|
5
5
|
s.authors = ["Aslak Hellesøy"]
|
6
6
|
s.description = 'Cucumber Expressions - a simpler alternative to Regular Expressions'
|
7
7
|
s.summary = "cucumber-expressions-#{s.version}"
|
@@ -35,16 +35,7 @@ module Cucumber
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def transform(self_obj, group_values)
|
38
|
-
|
39
|
-
non_nil_group_values = group_values.compact
|
40
|
-
raise CucumberExpressionError.new(
|
41
|
-
"Single transformer unexpectedly matched 2 values - \"#{non_nil_group_values[0]}\" and \"#{non_nil_group_values[1]}\""
|
42
|
-
) if non_nil_group_values.length >= 2
|
43
|
-
args = [non_nil_group_values[0]]
|
44
|
-
else
|
45
|
-
args = group_values
|
46
|
-
end
|
47
|
-
self_obj.instance_exec(*args, &@transformer)
|
38
|
+
self_obj.instance_exec(*group_values, &@transformer)
|
48
39
|
end
|
49
40
|
|
50
41
|
def <=>(other)
|
@@ -40,6 +40,14 @@ module Cucumber
|
|
40
40
|
expect( match(/hello/, "world") ).to be_nil
|
41
41
|
end
|
42
42
|
|
43
|
+
it "matches nested capture group without match" do
|
44
|
+
expect( match(/^a user( named "([^"]*)")?$/, 'a user') ).to eq([nil])
|
45
|
+
end
|
46
|
+
|
47
|
+
it "matches nested capture group with match" do
|
48
|
+
expect( match(/^a user( named "([^"]*)")?$/, 'a user named "Charlie"') ).to eq(['Charlie'])
|
49
|
+
end
|
50
|
+
|
43
51
|
it "ignores non capturing groups" do
|
44
52
|
expect( match(
|
45
53
|
/(\S+) ?(can|cannot) (?:delete|cancel) the (\d+)(?:st|nd|rd|th) (attachment|slide) ?(?:upload)?/,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-expressions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,10 +128,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.6
|
131
|
+
rubygems_version: 2.7.6
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
|
-
summary: cucumber-expressions-5.0.
|
134
|
+
summary: cucumber-expressions-5.0.16
|
135
135
|
test_files:
|
136
136
|
- spec/capture_warnings.rb
|
137
137
|
- spec/coverage.rb
|