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: 2f6d1d92f85498715647c16f17c01f4781820134
4
- data.tar.gz: 62e68065f30a37035524028e31291d37d761830b
3
+ metadata.gz: e67bd863422fd1397a0e2fb99a9269c9c0938173
4
+ data.tar.gz: 6798e6ce638df6ef8cce74010c6f8d210c947127
5
5
  SHA512:
6
- metadata.gz: 596176ff170ac4f68362dc8a44264dc9c1e3f2334b65c3aefdfb293497b440ade4e5ab4aba46c14ad0ac69081bb9d3f923055a45622d4974a5a66bf9c5185496
7
- data.tar.gz: cbae0a9a49e9538b9768e2f985599898681b12d4a98b3922eb1b311dc1020c6defd92cb45f53b107e35686db64167f7ba026ca0738e95c84457257f74638cee5
6
+ metadata.gz: aefbfc1c763e4fa55eca30be560c6446b5ad13c255fc0e5da3acefdc993fa70339d7b318be8b2011b1b39268d806c71c77a0406add436726e6125468aa0c1ced
7
+ data.tar.gz: 26b9ee07ef6924a332a759835a65ca749c833ab232d78278f1a3ef5a4f9fa8fb462514663e324db7f0be14c889aa2f0c633b3e92f70049c2826134c7ff6697c3
data/.travis.yml CHANGED
@@ -10,11 +10,3 @@ rvm:
10
10
  - 2.3.5
11
11
  - 2.2.8
12
12
  - jruby-9.1.13.0
13
-
14
- notifications:
15
- webhooks:
16
- urls:
17
- - https://webhooks.gitter.im/e/5373e574ed4e88026838
18
- on_success: change
19
- on_failure: always
20
- on_start: never
data/Makefile CHANGED
@@ -1,7 +1,7 @@
1
1
  default:
2
2
  bundle install
3
- bundle exec rake
4
- bundle exec rake install
3
+ rake
4
+ rake install
5
5
  .PHONY: default
6
6
 
7
7
  clean:
@@ -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.3'
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', '~> 10.5'
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
- ALTERNATIVE_WORD_REGEXP = /([[:alpha:]]+)((\/[[:alpha:]]+)+)/
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(ALTERNATIVE_WORD_REGEXP) do |_|
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.3
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-06 00:00:00.000000000 Z
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: '10.5'
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: '10.5'
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.3
133
+ summary: cucumber-expressions-5.0.4
134
134
  test_files:
135
135
  - spec/capture_warnings.rb
136
136
  - spec/coverage.rb