cucumber-expressions 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e67bd863422fd1397a0e2fb99a9269c9c0938173
|
4
|
+
data.tar.gz: 6798e6ce638df6ef8cce74010c6f8d210c947127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aefbfc1c763e4fa55eca30be560c6446b5ad13c255fc0e5da3acefdc993fa70339d7b318be8b2011b1b39268d806c71c77a0406add436726e6125468aa0c1ced
|
7
|
+
data.tar.gz: 26b9ee07ef6924a332a759835a65ca749c833ab232d78278f1a3ef5a4f9fa8fb462514663e324db7f0be14c889aa2f0c633b3e92f70049c2826134c7ff6697c3
|
data/.travis.yml
CHANGED
data/Makefile
CHANGED
@@ -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.4'
|
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}"
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.required_ruby_version = ">= 1.9.3"
|
13
13
|
|
14
14
|
s.add_development_dependency 'bundler'
|
15
|
-
s.add_development_dependency 'rake', '~>
|
15
|
+
s.add_development_dependency 'rake', '~> 12.3'
|
16
16
|
s.add_development_dependency 'rspec', '~> 3.5'
|
17
17
|
|
18
18
|
# For coverage reports
|
@@ -7,7 +7,7 @@ module Cucumber
|
|
7
7
|
class CucumberExpression
|
8
8
|
PARAMETER_REGEXP = /{([^}]+)}/
|
9
9
|
OPTIONAL_REGEXP = /\(([^)]+)\)/
|
10
|
-
|
10
|
+
ALTERNATIVE_NON_WHITESPACE_TEXT_REGEXP = /([^\s^\/]+)((\/[^\s^\/]+)+)/
|
11
11
|
|
12
12
|
attr_reader :source
|
13
13
|
|
@@ -23,7 +23,7 @@ module Cucumber
|
|
23
23
|
# Create non-capturing, optional capture groups from parenthesis
|
24
24
|
expression = expression.gsub(OPTIONAL_REGEXP, '(?:\1)?')
|
25
25
|
|
26
|
-
expression = expression.gsub(
|
26
|
+
expression = expression.gsub(ALTERNATIVE_NON_WHITESPACE_TEXT_REGEXP) do |_|
|
27
27
|
"(?:#{$1}#{$2.tr('/', '|')})"
|
28
28
|
end
|
29
29
|
|
@@ -24,6 +24,13 @@ module Cucumber
|
|
24
24
|
)
|
25
25
|
end
|
26
26
|
|
27
|
+
it "translates alternation with non-alpha" do
|
28
|
+
assert_regexp(
|
29
|
+
"I said Alpha1/Beta1",
|
30
|
+
/^I said (?:Alpha1|Beta1)$/
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
27
34
|
it "translates parameters" do
|
28
35
|
assert_regexp(
|
29
36
|
"I have {float} cukes at {int} o'clock",
|
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.4
|
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: 2017-11-
|
11
|
+
date: 2017-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ rubyforge_project:
|
|
130
130
|
rubygems_version: 2.6.8
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
|
-
summary: cucumber-expressions-5.0.
|
133
|
+
summary: cucumber-expressions-5.0.4
|
134
134
|
test_files:
|
135
135
|
- spec/capture_warnings.rb
|
136
136
|
- spec/coverage.rb
|