geordi 1.7.1 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OWEzNDNmNTdhZGMwODNkMmQxZTcxYzY1MTE4NzFmNTk4NTk1NWFkMA==
5
- data.tar.gz: !binary |-
6
- NmQ1YjAyNjcxODlhMTk2ZGY2NmY1NGMzOTg4ZDY4MjA4MWI2MTM4OQ==
2
+ SHA256:
3
+ metadata.gz: c07036b9657ebe6dfccf09dbc5c74e9b449b1eed88fc04ca5e880284dcbdc1e7
4
+ data.tar.gz: 1bf48b1318b06182ccfe8bc0e294c7344195ed654e28c983f6c44bdea0bde7cf
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGQzNDE2Y2UxY2YwMGM0NzY2YjE1NWU1YmNmOTQxMjBkNjYxODZlNTg1MDk4
10
- YTNjNGVhODA5YjU0Y2M2ZjNlNjYyODQ3NjRhYzIwYTY0Yzk5ODQwM2JmMjE1
11
- YzdmYTg1MGE1OGIxNDljNTBlOWU4OWUzNTVhYWQzZDE1ZDY4MjQ=
12
- data.tar.gz: !binary |-
13
- Zjk0ZDY5Mjg4MDRjNzcwNmVkNDcyZTAwZGUxMGI4YWViMDE3MDAyYzFkYmQ2
14
- M2FjMmVjMmM1YzQ5MjcxMGYwZDc4NmM3Y2U5NGJmMDkxMDAwZDg0YmQ0MWI1
15
- NWMzYzBjNGMxYTM1MjdlZmE4ZmJhNDA0M2RiZTA5ZTcxMjgyNzc=
6
+ metadata.gz: ae4590a4eb870deec8055b6e4cea3e433b85dc202b94be155fa78d2b8ce8f05b9126c73c2151b04ccf1d09fd5cedf2e80b2f49b80b3efabba61fe551cf5e92e2
7
+ data.tar.gz: 2829290660f89550294c2f83423bfa5608533f6f952b951def2ccf39fec167a5146dfe9d84b94eb40f6707085d7a1ba27cc81b0014892d86092e1c9eb05f8602
@@ -79,21 +79,27 @@ module Geordi
79
79
  def parallel_execution_command
80
80
  note 'Using parallel_tests'
81
81
  self.argv = argv - command_line_features
82
- gem 'parallel_tests', parallel_tests_version
83
- require 'parallel_tests'
84
82
 
85
- type_arg = Gem::Version.new(::ParallelTests::VERSION) > Gem::Version.new('0.7.0') ? 'cucumber' : 'features'
83
+ type_arg = Gem::Version.new(parallel_tests_version) > Gem::Version.new('0.7.0') ? 'cucumber' : 'features'
86
84
  features = features_to_run
87
85
  features = find_all_features_recursively('features') if features.empty?
88
86
 
89
87
  [
90
88
  use_firefox_for_selenium,
91
89
  'b parallel_test -t ' + type_arg,
92
- "-o '#{ command_line_options.join(' ') } --tags ~@solo'",
90
+ %(-o '#{ command_line_options.join(' ') } --tags "#{not_tag('@solo')}"'),
93
91
  "-- #{ features.join(' ') }"
94
92
  ].compact.join(' ')
95
93
  end
96
94
 
95
+ def not_tag(name)
96
+ if cucumber_version < '3'
97
+ "~#{name}"
98
+ else
99
+ "not #{name}"
100
+ end
101
+ end
102
+
97
103
  def use_firefox_for_selenium
98
104
  path = Geordi::FirefoxForSelenium.path_from_config
99
105
  if path
@@ -198,16 +204,27 @@ module Geordi
198
204
  not parallel_tests_version.nil?
199
205
  end
200
206
 
201
- # get the current parallel test version used in Gemfile.lock (nil if not available)
202
207
  def parallel_tests_version
203
- @parallel_tests_version ||= begin
204
- parallel_tests = `bundle list`.split("\n").detect{ |x| x =~ /parallel_tests/ }
205
- if parallel_tests
206
- parallel_tests.scan( /\(([\d\.]+).*\)/ ).flatten.first
207
- end
208
+ @parallel_tests_version ||= gem_version('parallel_tests')
209
+ end
210
+
211
+ def cucumber_version
212
+ @cucumber_version ||= gem_version('cucumber')
213
+ end
214
+
215
+ # Get the version string for the given gem by parsing Gemfile.lock.
216
+ # Returns nil if the gem is not used.
217
+ def gem_version(gem)
218
+ gem_line = bundle_list.split("\n").detect{ |x| x.include?(gem) }
219
+ if gem_line
220
+ gem_line.scan( /\(([\d\.]+).*\)/ ).flatten.first
208
221
  end
209
222
  end
210
223
 
224
+ def bundle_list
225
+ @bundle_list ||= `bundle list`
226
+ end
227
+
211
228
  def use_parallel_tests?(options)
212
229
  options.fetch(:parallel, true) &&
213
230
  features_to_run.size != 1 &&
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '1.7.1'
2
+ VERSION = '1.8.0'
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.18.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.18.0
27
27
  description: Collection of command line tools we use in our daily work with Ruby,
@@ -50,8 +50,7 @@ executables:
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
- - .gitignore
54
- - .ruby-version
53
+ - ".gitignore"
55
54
  - Gemfile
56
55
  - Gemfile.lock
57
56
  - LICENSE
@@ -129,25 +128,23 @@ homepage: http://makandra.com
129
128
  licenses:
130
129
  - MIT
131
130
  metadata: {}
132
- post_install_message: ! '* Binary `geordi` installed
133
-
134
- '
131
+ post_install_message: "* Binary `geordi` installed\n"
135
132
  rdoc_options: []
136
133
  require_paths:
137
134
  - lib
138
135
  required_ruby_version: !ruby/object:Gem::Requirement
139
136
  requirements:
140
- - - ! '>='
137
+ - - ">="
141
138
  - !ruby/object:Gem::Version
142
139
  version: '0'
143
140
  required_rubygems_version: !ruby/object:Gem::Requirement
144
141
  requirements:
145
- - - ! '>='
142
+ - - ">="
146
143
  - !ruby/object:Gem::Version
147
144
  version: '0'
148
145
  requirements: []
149
146
  rubyforge_project: geordi
150
- rubygems_version: 2.6.13
147
+ rubygems_version: 2.7.6
151
148
  signing_key:
152
149
  specification_version: 4
153
150
  summary: Collection of command line tools we use in our daily work with Ruby, Rails
@@ -1 +0,0 @@
1
- 1.9.3