rspec-multiprocess_runner 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 498edc9ca9588428cd943ceb51915dcbd7c6d2f3
4
- data.tar.gz: 6c060397edc7d91a6e83f3e320fdb5a7881fd03a
3
+ metadata.gz: f8fb56cb7c08de0d53e8894ba0a8354dde4af6a5
4
+ data.tar.gz: 3012c5d9e218b278b2a11385de30cd38e50a970a
5
5
  SHA512:
6
- metadata.gz: a655fb0df84cafcc0776c31d90737a9f54888a21c0e5da56f61ce753c9138a82285211663c0f823171429f5c27e604ffbd3deb30079845a81bb7fa7321e8ee23
7
- data.tar.gz: 357a358ac4dde4eb262096f75387ff52f4626f16a3a48c324cd4f1250e544d28929d780e1b9d3f0f634c418f24967c22264d10c13bd5a940894f1ce2aa90faba
6
+ metadata.gz: 9cb30e3cd5b4dae9599e62e5fbc5c9d9cbf58987df4468fb30357faee82b7bc7bcfa1b72a810de11b9db2c501f92b6a2a9ccf54dfffcf018f23ca08f706a0e25
7
+ data.tar.gz: 4d952d31b662bf8ef7e93ece5de3bfd171164298ffaca4b176d1f3b7ea954f4e2b205c962c2373de8560217c6e61c7b3a9878da7423ea5a348f13b44cab27911
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.1.0
2
+
3
+ * Redo exit codes for arguments, signal hanlding, and exceptions
4
+ * Update rake task to handle use given order flag
5
+
1
6
  # 1.0.0
2
7
 
3
8
  * Stop supporting Ruby < v2.0
data/exe/multirspec CHANGED
@@ -4,7 +4,7 @@ require 'rspec/multiprocess_runner/command_line_options'
4
4
  require 'rspec/multiprocess_runner/coordinator'
5
5
 
6
6
  options = RSpec::MultiprocessRunner::CommandLineOptions.new.parse(ARGV.dup)
7
- exit(2) unless options
7
+ exit(64) unless options
8
8
 
9
9
  coordinator = RSpec::MultiprocessRunner::Coordinator.new(
10
10
  options.worker_count,
@@ -22,12 +22,19 @@ coordinator = RSpec::MultiprocessRunner::Coordinator.new(
22
22
  trap("INT") do
23
23
  $stderr.puts "INT happened"
24
24
  coordinator.shutdown(print_summary: true)
25
- Kernel.exit(4)
25
+ Kernel.exit(65)
26
26
  end
27
27
 
28
28
  trap("TERM") do
29
29
  coordinator.shutdown
30
- Kernel.exit(3)
30
+ Kernel.exit(66)
31
31
  end
32
32
 
33
- exit coordinator.run
33
+ begin
34
+ exit coordinator.run
35
+ rescue => e
36
+ warn e.class
37
+ warn e.message
38
+ warn e.backtrace
39
+ exit(67)
40
+ end
@@ -59,6 +59,9 @@ module RSpec::MultiprocessRunner
59
59
  # failed.
60
60
  attr_accessor :log_failing_files
61
61
 
62
+ # Use order of files as given on the command line
63
+ attr_accessor :use_given_order
64
+
62
65
  # Command line options to pass to the RSpec workers. Defaults to `nil`.
63
66
  attr_accessor :rspec_opts
64
67
 
@@ -120,6 +123,9 @@ module RSpec::MultiprocessRunner
120
123
  if log_failing_files
121
124
  cmd_parts << '--log-failing-files' << log_failing_files
122
125
  end
126
+ if use_given_order
127
+ cmd_parts << '--use-given-order'
128
+ end
123
129
  if files_or_directories
124
130
  cmd_parts.concat(files_or_directories)
125
131
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module MultiprocessRunner
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -152,8 +152,10 @@ module RSpec::MultiprocessRunner
152
152
  begin
153
153
  Timeout.timeout(timeout) do
154
154
  $stderr.puts "#{message} with TERM" if message
155
- Process.kill(:TERM, pid)
156
- Process.wait(pid)
155
+ if pid
156
+ Process.kill(:TERM, pid)
157
+ Process.wait(pid)
158
+ end
157
159
  end
158
160
  rescue Timeout::Error
159
161
  $stderr.puts "#{message} with KILL" if message
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-multiprocess_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rhett Sutphin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-06 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec