specjour 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.markdown CHANGED
@@ -1,6 +1,13 @@
1
1
  History
2
2
  =======
3
3
 
4
+ 0.6.4 / 2012-09-17
5
+ ---------------------------
6
+ * [added] RSpec formatter configurable via `Specjour::Configuration.rspec\_formatter`
7
+ * [changed] Always send KILL signal when terminating processes
8
+
9
+ [Full Changelog](https://github.com/sandro/specjour/compare/v0.6.3...v0.6.4)
10
+
4
11
  0.6.3 / 2012-09-12
5
12
  ---------------------------
6
13
  * [fixed] Observe filtered examples set in the RSpec configuration object
data/lib/specjour.rb CHANGED
@@ -29,7 +29,7 @@ module Specjour
29
29
  autoload :Cucumber, 'specjour/cucumber'
30
30
  autoload :RSpec, 'specjour/rspec'
31
31
 
32
- VERSION ||= "0.6.3"
32
+ VERSION ||= "0.6.4"
33
33
  HOOKS_PATH ||= "./.specjour/hooks.rb"
34
34
  PROGRAM_NAME ||= $PROGRAM_NAME # keep a reference of the original program name
35
35
 
@@ -2,7 +2,7 @@ module Specjour
2
2
  module Configuration
3
3
  extend self
4
4
 
5
- attr_writer :before_fork, :after_fork, :after_load, :prepare, :rsync_options
5
+ attr_writer :before_fork, :after_fork, :after_load, :prepare, :rspec_formatter, :rsync_options
6
6
 
7
7
  # This block is run by each worker before they begin running tests.
8
8
  # The default action is to migrate the database, and clear it of any old
@@ -38,6 +38,11 @@ module Specjour
38
38
  @after_load = nil
39
39
  @prepare = nil
40
40
  @rsync_options = nil
41
+ @rspec_formatter = nil
42
+ end
43
+
44
+ def rspec_formatter
45
+ @rspec_formatter ||= default_rspec_formatter
41
46
  end
42
47
 
43
48
  def rsync_options
@@ -77,6 +82,12 @@ module Specjour
77
82
  end
78
83
  end
79
84
 
85
+ def default_rspec_formatter
86
+ lambda do
87
+ ::RSpec::Core::Formatters::ProgressFormatter
88
+ end
89
+ end
90
+
80
91
  def default_rsync_options
81
92
  "-aL --delete --ignore-errors"
82
93
  end
@@ -81,7 +81,7 @@ module Specjour
81
81
  fetch_manager(manager.drb_uri)
82
82
  at_exit do
83
83
  unless Specjour.interrupted?
84
- Process.kill('TERM', manager.pid) rescue Errno::ESRCH
84
+ Process.kill('KILL', manager.pid) rescue Errno::ESRCH
85
85
  end
86
86
  end
87
87
  end
@@ -121,7 +121,7 @@ module Specjour
121
121
  if Specjour.interrupted?
122
122
  Process.kill('INT', *worker_pids) rescue Errno::ESRCH
123
123
  else
124
- Process.kill('TERM', *worker_pids) rescue Errno::ESRCH
124
+ Process.kill('KILL', *worker_pids) rescue Errno::ESRCH
125
125
  end
126
126
  end
127
127
 
@@ -85,7 +85,7 @@ module Specjour
85
85
  if Specjour.interrupted?
86
86
  Process.kill('INT', loader_pid) rescue Errno::ESRCH
87
87
  else
88
- Process.kill('TERM', loader_pid) rescue Errno::ESRCH
88
+ Process.kill('KILL', loader_pid) rescue Errno::ESRCH
89
89
  end
90
90
  @loader_pid = nil
91
91
  end
@@ -1,5 +1,5 @@
1
1
  module Specjour::RSpec
2
- class DistributedFormatter < ::RSpec::Core::Formatters::ProgressFormatter
2
+ class DistributedFormatter < Specjour::Configuration.rspec_formatter.call
3
3
 
4
4
  def metadata_for_examples
5
5
  examples.map do |example|
@@ -46,7 +46,7 @@ module Specjour
46
46
 
47
47
  def stop
48
48
  if pid
49
- Process.kill("TERM", pid)
49
+ Process.kill("KILL", pid)
50
50
  FileUtils.rm(pid_file)
51
51
  end
52
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specjour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2012-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dnssd
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  segments:
179
179
  - 0
180
- hash: 1401403201445892277
180
+ hash: -4156345957160810080
181
181
  required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements: