cucumber 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +9 -1
- data/cucumber.gemspec +1 -1
- data/features/docs/writing_support_code/parameter_types.feature +16 -0
- data/lib/cucumber/glue/dsl.rb +6 -2
- data/lib/cucumber/version +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a692d9b2bb6abe44ffda39687077d9a9875ac6
|
4
|
+
data.tar.gz: 68b322f2c42b48b161c37af0d5ceb6e80f7604a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd06621e7445264cb47e0a9a9ef77274d682de78dbf7519d620283aadd82dbee7a0aa3491b37142f9e370355a40de6b048d55742366ae3d0cad1f853433f32b6
|
7
|
+
data.tar.gz: fe939354cfd699bcdf9381bc5f4ed59d041c4cfb8ce33c438671ce49ee6754ee3a4bc728ffb3f1a95f16539d01760d66c89f8ac52ded72b537889bb4ba091098
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
----
|
12
12
|
|
13
|
-
## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v3.0.
|
13
|
+
## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v3.0.1...master) (Not released)
|
14
14
|
|
15
15
|
### Changed
|
16
16
|
|
@@ -28,10 +28,18 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
28
28
|
|
29
29
|
* N/A
|
30
30
|
|
31
|
+
## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0...3.0.1) (2017-09-29)
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
|
35
|
+
* `ParameterType` can now override `use_for_snippets` and `prefer_for_regexp_match` without throwing an error. ([@aslakhellesoy](https://github.com/aslakhellesoy))
|
36
|
+
* Gemspec has `required_ruby_version = '>= 2.1'` ([@aslakhellesoy](https://github.com/aslakhellesoy))
|
37
|
+
|
31
38
|
## [3.0.0](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0.pre.2...v3.0.0) (2017-09-27)
|
32
39
|
|
33
40
|
### Changed
|
34
41
|
|
42
|
+
* Regexp capture groups with `(\d+)` are automatically converted to `Integer`
|
35
43
|
* Rename `Step#name` to `#text` ([#1130](https://github.com/cucumber/cucumber-ruby/pull/1130) [@olleolleolle](https://github.com/olleolleolle))
|
36
44
|
* `Transform` has been removed and replaced with `ParameterType`. See [upgrading instructions](https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3). ([#1190](https://github.com/cucumber/cucumber-ruby/issues/1190) @aslakhellesoy)
|
37
45
|
* Nested capture groups are not counted as parameters. See [upgrading instructions](https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3). (@aslakhellesoy)
|
data/cucumber.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.license = 'MIT'
|
10
10
|
s.homepage = 'https://cucumber.io/'
|
11
11
|
s.platform = Gem::Platform::RUBY
|
12
|
-
s.required_ruby_version = '>= 1.
|
12
|
+
s.required_ruby_version = '>= 2.1' # Keep in sync with .travis.yml
|
13
13
|
s.add_dependency 'cucumber-core', '~> 3.0.0'
|
14
14
|
s.add_dependency 'builder', '>= 2.1.2'
|
15
15
|
s.add_dependency 'diff-lcs', '~> 1.3'
|
@@ -51,3 +51,19 @@ Feature: Parameter Types
|
|
51
51
|
"""
|
52
52
|
When I run `cucumber features/foo.feature`
|
53
53
|
Then it should pass
|
54
|
+
|
55
|
+
Scenario: Parameter type defined with ParameterType method
|
56
|
+
If your parameter type's `regexp` is very general, you can tell
|
57
|
+
Cucumber not to suggest its use in snippets:
|
58
|
+
|
59
|
+
Given a file named "features/support/parameter_types.rb" with:
|
60
|
+
"""
|
61
|
+
ParameterType(
|
62
|
+
name: 'person',
|
63
|
+
regexp: /[A-Z]\w+/,
|
64
|
+
transformer: -> (name) { Person.new(name) },
|
65
|
+
use_for_snippets: false
|
66
|
+
)
|
67
|
+
"""
|
68
|
+
When I run `cucumber features/foo.feature`
|
69
|
+
Then it should pass
|
data/lib/cucumber/glue/dsl.rb
CHANGED
@@ -88,8 +88,8 @@ module Cucumber
|
|
88
88
|
|
89
89
|
def ParameterType(options)
|
90
90
|
type = options[:type] || Object
|
91
|
-
use_for_snippets =
|
92
|
-
prefer_for_regexp_match =
|
91
|
+
use_for_snippets = if_nil(options[:use_for_snippets], true)
|
92
|
+
prefer_for_regexp_match = if_nil(options[:prefer_for_regexp_match], false)
|
93
93
|
|
94
94
|
parameter_type = CucumberExpressions::ParameterType.new(
|
95
95
|
options[:name],
|
@@ -102,6 +102,10 @@ module Cucumber
|
|
102
102
|
Dsl.define_parameter_type(parameter_type)
|
103
103
|
end
|
104
104
|
|
105
|
+
def if_nil(value, default)
|
106
|
+
value.nil? ? default : value
|
107
|
+
end
|
108
|
+
|
105
109
|
# Registers a proc that will run after Cucumber is configured. You can register as
|
106
110
|
# as you want (typically from ruby scripts under <tt>support/hooks.rb</tt>).
|
107
111
|
def AfterConfiguration(&proc)
|
data/lib/cucumber/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-09-
|
13
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cucumber-core
|
@@ -912,7 +912,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
912
912
|
requirements:
|
913
913
|
- - ">="
|
914
914
|
- !ruby/object:Gem::Version
|
915
|
-
version: 1
|
915
|
+
version: '2.1'
|
916
916
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
917
917
|
requirements:
|
918
918
|
- - ">="
|
@@ -920,10 +920,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
920
920
|
version: '0'
|
921
921
|
requirements: []
|
922
922
|
rubyforge_project:
|
923
|
-
rubygems_version: 2.
|
923
|
+
rubygems_version: 2.6.8
|
924
924
|
signing_key:
|
925
925
|
specification_version: 4
|
926
|
-
summary: cucumber-3.0.
|
926
|
+
summary: cucumber-3.0.1
|
927
927
|
test_files:
|
928
928
|
- features/docs/api/list_step_defs_as_json.feature
|
929
929
|
- features/docs/api/listen_for_events.feature
|