cucumber-expressions 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.rsync +2 -0
  3. data/Makefile +5 -9
  4. data/cucumber-expressions.gemspec +1 -1
  5. data/examples.txt +7 -11
  6. data/lib/cucumber/cucumber_expressions/argument.rb +25 -5
  7. data/lib/cucumber/cucumber_expressions/combinatorial_generated_expression_factory.rb +40 -0
  8. data/lib/cucumber/cucumber_expressions/cucumber_expression.rb +8 -26
  9. data/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb +36 -19
  10. data/lib/cucumber/cucumber_expressions/errors.rb +40 -0
  11. data/lib/cucumber/cucumber_expressions/generated_expression.rb +23 -3
  12. data/lib/cucumber/cucumber_expressions/group.rb +66 -0
  13. data/lib/cucumber/cucumber_expressions/parameter_type.rb +38 -5
  14. data/lib/cucumber/cucumber_expressions/parameter_type_matcher.rb +4 -4
  15. data/lib/cucumber/cucumber_expressions/parameter_type_registry.rb +34 -54
  16. data/lib/cucumber/cucumber_expressions/regular_expression.rb +27 -27
  17. data/spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb +43 -0
  18. data/spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb +10 -2
  19. data/spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb +4 -11
  20. data/spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb +42 -43
  21. data/spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb +109 -94
  22. data/spec/cucumber/cucumber_expressions/expression_examples_spec.rb +3 -3
  23. data/spec/cucumber/cucumber_expressions/group_spec.rb +34 -0
  24. data/spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb +86 -0
  25. data/spec/cucumber/cucumber_expressions/regular_expression_spec.rb +17 -25
  26. metadata +14 -5
  27. data/lib/cucumber/cucumber_expressions/argument_builder.rb +0 -17
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: 3.0.0
4
+ version: 4.0.0
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-03-09 00:00:00.000000000 Z
11
+ date: 2017-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,6 +73,7 @@ extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
75
  - ".rspec"
76
+ - ".rsync"
76
77
  - ".travis.yml"
77
78
  - Gemfile
78
79
  - LICENSE
@@ -82,21 +83,26 @@ files:
82
83
  - cucumber-expressions.gemspec
83
84
  - examples.txt
84
85
  - lib/cucumber/cucumber_expressions/argument.rb
85
- - lib/cucumber/cucumber_expressions/argument_builder.rb
86
+ - lib/cucumber/cucumber_expressions/combinatorial_generated_expression_factory.rb
86
87
  - lib/cucumber/cucumber_expressions/cucumber_expression.rb
87
88
  - lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb
89
+ - lib/cucumber/cucumber_expressions/errors.rb
88
90
  - lib/cucumber/cucumber_expressions/generated_expression.rb
91
+ - lib/cucumber/cucumber_expressions/group.rb
89
92
  - lib/cucumber/cucumber_expressions/parameter_type.rb
90
93
  - lib/cucumber/cucumber_expressions/parameter_type_matcher.rb
91
94
  - lib/cucumber/cucumber_expressions/parameter_type_registry.rb
92
95
  - lib/cucumber/cucumber_expressions/regular_expression.rb
93
96
  - spec/capture_warnings.rb
94
97
  - spec/coverage.rb
98
+ - spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb
95
99
  - spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb
96
100
  - spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb
97
101
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
98
102
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
99
103
  - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
104
+ - spec/cucumber/cucumber_expressions/group_spec.rb
105
+ - spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb
100
106
  - spec/cucumber/cucumber_expressions/regular_expression_spec.rb
101
107
  homepage: https://github.com/cucumber/cucumber-expressions-ruby#readme
102
108
  licenses:
@@ -119,16 +125,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
125
  version: '0'
120
126
  requirements: []
121
127
  rubyforge_project:
122
- rubygems_version: 2.5.2
128
+ rubygems_version: 2.6.8
123
129
  signing_key:
124
130
  specification_version: 4
125
- summary: cucumber-expressions-3.0.0
131
+ summary: cucumber-expressions-4.0.0
126
132
  test_files:
127
133
  - spec/capture_warnings.rb
128
134
  - spec/coverage.rb
135
+ - spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb
129
136
  - spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb
130
137
  - spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb
131
138
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
132
139
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
133
140
  - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
141
+ - spec/cucumber/cucumber_expressions/group_spec.rb
142
+ - spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb
134
143
  - spec/cucumber/cucumber_expressions/regular_expression_spec.rb
@@ -1,17 +0,0 @@
1
- require 'cucumber/cucumber_expressions/argument'
2
-
3
- module Cucumber
4
- module CucumberExpressions
5
- class ArgumentBuilder
6
- def self.build_arguments(regexp, text, parameter_types)
7
- m = regexp.match(text)
8
- return nil if m.nil?
9
- (1...m.length).map do |index|
10
- value = m[index]
11
- parameter_type = parameter_types[index-1]
12
- Argument.new(m.offset(index)[0], value, parameter_type)
13
- end
14
- end
15
- end
16
- end
17
- end