cuke_slicer 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 63fcae8bc8d4f628f33887c70a7984314f738300
4
+ data.tar.gz: 7d216806f79b2eebbe730a68ae8a9c43bf46a99b
5
+ SHA512:
6
+ metadata.gz: 9bd87c050c7279636cf8731b7548567b8a51c6e4a09f636a3f011f11410d8eb6ee4b349509cf4607d8343f29a1a7cd73d97f598e5ae3862ffa606cfa9f631b83
7
+ data.tar.gz: 9729d25fbc411539bb8b8d42a516bc52dc5f963d101b30c27cffb3b64f30cee9eb90ee6a67c1c7ebd8fd02dde6e1bc685beff273889b2579726e2534f5833653
@@ -4,4 +4,8 @@ rvm:
4
4
  - 2.0.0
5
5
  - 2.1.2
6
6
 
7
+ gemfile:
8
+ - gemfiles/cuke_modeler0.gemfile
9
+ - gemfiles/cuke_modeler1.gemfile
10
+
7
11
  script: bundle exec rake cuke_slicer:ci_build
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in cuke_slicer.gemspec
4
4
  gemspec
5
-
6
- gem 'coveralls', require: false, :group => :development
@@ -1,3 +1,11 @@
1
+ === Version 2.0.2 / 2016-11-19
2
+
3
+ * The gem now declares version limits for all of its dependencies.
4
+
5
+ === Version 2.0.1 / 2016-11-08
6
+
7
+ * Works with both 0.x and 1.x versions of the 'cuke_modeler' gem.
8
+
1
9
  === Version 2.0.0 / 2015-07-08
2
10
 
3
11
  * When slicing a directory, the test cases returned can now be provided as model objects in addition to the
data/Rakefile CHANGED
@@ -1,16 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
- require 'cucumber/rake/task'
3
- require 'rspec/core/rake_task'
4
2
  require 'coveralls/rake/task'
5
-
6
-
7
- def set_cucumber_options(options)
8
- ENV['CUCUMBER_OPTS'] = options
9
- end
10
-
11
- def combine_options(set_1, set_2)
12
- set_2 ? "#{set_1} #{set_2}" : set_1
13
- end
3
+ require 'racatt'
14
4
 
15
5
 
16
6
  namespace 'cuke_slicer' do
@@ -23,27 +13,12 @@ namespace 'cuke_slicer' do
23
13
  FileUtils.remove_dir(code_coverage_directory, true) if File.exists?(code_coverage_directory)
24
14
  end
25
15
 
26
- namespace 'cucumber' do
27
- desc 'Run all Cucumber tests for the gem'
28
- task :tests, [:command_options] do |t, args|
29
- set_cucumber_options(combine_options('-t ~@wip -t ~@off', args[:command_options]))
30
- end
31
- Cucumber::Rake::Task.new(:tests)
32
- end
33
-
34
- namespace 'rspec' do
35
- desc 'Run all RSpec tests for the gem'
36
- RSpec::Core::RakeTask.new(:specs, :command_options) do |t, args|
37
- t.rspec_opts = combine_options('--tag ~wip', args[:command_options])
38
- end
39
- end
16
+ Racatt.create_tasks
40
17
 
41
- desc 'Run all tests for the gem'
42
- task :test_everything, [:command_options] => :clear_coverage do |t, args|
43
- Rake::Task['cuke_slicer:rspec:specs'].invoke(args[:command_options])
44
- Rake::Task['cuke_slicer:cucumber:tests'].invoke(args[:command_options])
45
- end
18
+ # Redefining the task from 'racatt' in order to clear the code coverage results
19
+ task :test_everything, [:command_options] => :clear_coverage
46
20
 
21
+ # The task that CI will use
47
22
  Coveralls::RakeTask.new
48
23
  task :ci_build => [:clear_coverage, :test_everything, 'coveralls:push']
49
24
 
@@ -18,11 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "cuke_modeler"
21
+ spec.add_runtime_dependency "cuke_modeler", "< 2.0"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
- spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rake" , '~> 11.0'
25
25
  spec.add_development_dependency "rspec", '~> 3.0'
26
- spec.add_development_dependency "cucumber"
27
- spec.add_development_dependency "simplecov"
26
+ spec.add_development_dependency "cucumber", '~> 2.0'
27
+ spec.add_development_dependency "simplecov", '~> 0.0'
28
+ spec.add_development_dependency "racatt", '~> 1.0'
29
+ spec.add_development_dependency 'coveralls', '< 1.0.0'
30
+
28
31
  end
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => "../"
4
+
5
+ gem 'cuke_modeler', '~> 0.0'
6
+
7
+
8
+ if RUBY_VERSION =~ /^1\./
9
+ gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
10
+ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
11
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
12
+ end
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => "../"
4
+
5
+ gem 'cuke_modeler', '~> 1.0'
6
+
7
+
8
+ if RUBY_VERSION =~ /^1\./
9
+ gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
10
+ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
11
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
12
+ end
@@ -24,11 +24,13 @@ module CukeSlicer
24
24
  end
25
25
 
26
26
  def extract_runnable_elements(things)
27
+ method_for_row_models = Gem.loaded_specs['cuke_modeler'].version.version[/^0/] ? :row_elements : :rows
28
+
27
29
  Array.new.tap do |elements|
28
30
  things.each do |thing|
29
31
  if thing.is_a?(CukeModeler::Example)
30
32
  # Slicing in order to remove the parameter row element
31
- elements.concat(thing.row_elements.slice(1, thing.row_elements.count - 1))
33
+ elements.concat(thing.send(method_for_row_models).slice(1, thing.rows.count))
32
34
  else
33
35
  elements << thing
34
36
  end
@@ -26,10 +26,13 @@ module CukeSlicer
26
26
  end
27
27
 
28
28
  def filter_match(element, filter)
29
+ tag_values = element.all_tags
30
+ tag_values = tag_values.collect { |tag| tag.name } if Gem.loaded_specs['cuke_modeler'].version.version[/^1/]
31
+
29
32
  if filter.is_a?(Regexp)
30
- element.all_tags.any? { |tag| tag =~ filter }
33
+ tag_values.any? { |tag| tag =~ filter }
31
34
  else
32
- element.all_tags.include?(filter)
35
+ tag_values.include?(filter)
33
36
  end
34
37
  end
35
38
 
@@ -31,8 +31,13 @@ module CukeSlicer
31
31
 
32
32
  begin
33
33
  target = File.directory?(target) ? CukeModeler::Directory.new(target) : CukeModeler::FeatureFile.new(target)
34
- rescue Gherkin::Lexer::LexingError
35
- raise(ArgumentError, "A syntax or lexing problem was encountered while trying to parse #{target}")
34
+ rescue => e
35
+ if e.message =~ /lexing|parsing/i
36
+ raise(ArgumentError, "A syntax or lexing problem was encountered while trying to parse #{target}")
37
+ else
38
+ raise e
39
+ end
40
+
36
41
  end
37
42
 
38
43
  if target.is_a?(CukeModeler::Directory)
@@ -1,4 +1,4 @@
1
1
  module CukeSlicer
2
2
  # The current version for the gem.
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.2"
4
4
  end
metadata CHANGED
@@ -1,112 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuke_slicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
5
- prerelease:
4
+ version: 2.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eric Kessler
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-07-07 00:00:00.000000000 Z
11
+ date: 2016-11-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: cuke_modeler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - "<"
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '2.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - "<"
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
26
+ version: '2.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '1.6'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '1.6'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0'
47
+ version: '11.0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: '11.0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '3.0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '3.0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: cucumber
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
- version: '0'
75
+ version: '2.0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
- version: '0'
82
+ version: '2.0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: simplecov
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: '0'
89
+ version: '0.0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
- version: '0'
96
+ version: '0.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: racatt
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: coveralls
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "<"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.0.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "<"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.0.0
110
125
  description: A gem for extracting test cases from a Cucumber test suite.
111
126
  email:
112
127
  - morrow748@gmail.com
@@ -114,9 +129,9 @@ executables: []
114
129
  extensions: []
115
130
  extra_rdoc_files: []
116
131
  files:
117
- - .gitignore
118
- - .simplecov
119
- - .travis.yml
132
+ - ".gitignore"
133
+ - ".simplecov"
134
+ - ".travis.yml"
120
135
  - Gemfile
121
136
  - History.rdoc
122
137
  - LICENSE.txt
@@ -131,6 +146,8 @@ files:
131
146
  - features/test_case_extraction.feature
132
147
  - features/test_case_filtering.feature
133
148
  - features/validation.feature
149
+ - gemfiles/cuke_modeler0.gemfile
150
+ - gemfiles/cuke_modeler1.gemfile
134
151
  - lib/cuke_slicer.rb
135
152
  - lib/cuke_slicer/collections/nested_tag_collection.rb
136
153
  - lib/cuke_slicer/collections/path_collection.rb
@@ -151,27 +168,26 @@ files:
151
168
  homepage: https://github.com/grange-insurance/cuke_slicer
152
169
  licenses:
153
170
  - MIT
171
+ metadata: {}
154
172
  post_install_message:
155
173
  rdoc_options: []
156
174
  require_paths:
157
175
  - lib
158
176
  required_ruby_version: !ruby/object:Gem::Requirement
159
- none: false
160
177
  requirements:
161
- - - ! '>='
178
+ - - ">="
162
179
  - !ruby/object:Gem::Version
163
180
  version: '0'
164
181
  required_rubygems_version: !ruby/object:Gem::Requirement
165
- none: false
166
182
  requirements:
167
- - - ! '>='
183
+ - - ">="
168
184
  - !ruby/object:Gem::Version
169
185
  version: '0'
170
186
  requirements: []
171
187
  rubyforge_project:
172
- rubygems_version: 1.8.28
188
+ rubygems_version: 2.6.7
173
189
  signing_key:
174
- specification_version: 3
190
+ specification_version: 4
175
191
  summary: A gem for extracting test cases from a Cucumber test suite.
176
192
  test_files:
177
193
  - features/step_definitions/action_steps.rb
@@ -186,4 +202,3 @@ test_files:
186
202
  - spec/slicer_integration_spec.rb
187
203
  - spec/slicer_unit_spec.rb
188
204
  - spec/spec_helper.rb
189
- has_rdoc: