guard-spork 1.5.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50b8b1f8d8fff2ffcc2f2082b1bb894d2906aa2e
4
- data.tar.gz: aa1f49228d79f5ced4c2558ffd13c8de5659e8e7
3
+ metadata.gz: 9607aff089d2218ec5bd8ef732e5755c4316413e
4
+ data.tar.gz: 17d917b9879e2ab9cb55289be91d60bf93982d17
5
5
  SHA512:
6
- metadata.gz: 435e9fe453cf31e863448bd7fbc06161f363a3147159295bcccc24c5bbebc62375fdbd6f2744203ac2171f42358e0fa21cf68944bb58956c684870e2517155fa
7
- data.tar.gz: fad032ddf1f8aa33f5f46ad2cdf5f4f9504efa7d5025b41e5a0b810cb0efdd5dccce70c980282eedfd7a7b27db7df8206e2edab1c889ce6a6626cdd3f25be22e
6
+ metadata.gz: e93ea8d5ce42791574976fb75dcd7c37e06f61d57b654a02c07e350d9aeb060296ff971285f75e079a48e1b2e5dd20f25f51de599385cb3acb1377dfff37e8d3
7
+ data.tar.gz: 96ca4637dc1bd4c74b4e2525088d91336ae426eb4ca7778ab0004944f677a2375450fb865b38b8985c948d0d98812e48f57ac4627414aba7b7870d2bbd443a71
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Guard::Spork allows to automatically & intelligently start/reload your RSpec/Cucumber/Test::Unit [Spork](https://github.com/sporkrb/spork) server(s).
4
4
 
5
5
  * Compatible with Spork 0.8.4 & 0.9.0.rcX.
6
- * Tested against Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, REE, and JRuby.
6
+ * Tested against Ruby 1.9.3, 2.0.0, 2.1.2, and JRuby.
7
7
 
8
8
  ## Install
9
9
 
@@ -1,16 +1,16 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
  require 'childprocess'
4
4
 
5
5
  module Guard
6
- class Spork < Guard
6
+ class Spork < Plugin
7
7
 
8
8
  autoload :Runner, 'guard/spork/runner'
9
9
  autoload :SporkInstance, 'guard/spork/spork_instance'
10
10
  autoload :SporkWindowsInstance, 'guard/spork/spork_windows_instance'
11
11
  attr_accessor :runner
12
12
 
13
- def initialize(watchers=[], options={})
13
+ def initialize(options={})
14
14
  super
15
15
  @runner = Runner.new(options)
16
16
  end
@@ -21,23 +21,27 @@ module Guard
21
21
  end
22
22
 
23
23
  def reload
24
- runner.kill_sporks
25
- runner.launch_sporks("reload")
24
+ relaunch_sporks
26
25
  end
27
26
 
28
- def run_on_changes(paths_or_symbol)
29
- if paths_or_symbol.is_a?(Symbol)
30
- runner.kill_sporks(paths_or_symbol)
31
- runner.launch_sporks("reload", paths_or_symbol)
32
- else
33
- runner.kill_sporks
34
- runner.launch_sporks("reload")
35
- end
27
+ def run_on_additions(paths)
28
+ relaunch_sporks
29
+ end
30
+
31
+ def run_on_modifications(paths)
32
+ relaunch_sporks
36
33
  end
37
34
 
38
35
  def stop
39
36
  runner.kill_sporks
40
37
  end
41
38
 
39
+ private
40
+
41
+ def relaunch_sporks
42
+ runner.kill_sporks
43
+ runner.launch_sporks("reload")
44
+ end
45
+
42
46
  end
43
47
  end
@@ -57,14 +57,14 @@ module Guard
57
57
 
58
58
  def command
59
59
  parts = []
60
- if use_bundler?
61
- parts << "bundle"
62
- parts << "exec"
63
- end
64
- if use_foreman?
65
- parts << "foreman"
66
- parts << "run"
67
- end
60
+ if use_bundler?
61
+ parts << "bundle"
62
+ parts << "exec"
63
+ end
64
+ if use_foreman?
65
+ parts << "foreman"
66
+ parts << "run"
67
+ end
68
68
  parts << "spork"
69
69
 
70
70
  if type == :test_unit
@@ -76,7 +76,7 @@ module Guard
76
76
  end
77
77
 
78
78
  parts << "-p"
79
- parts << port.to_s
79
+ parts << port.to_s
80
80
  parts << "-q" if options[:quiet]
81
81
 
82
82
  if use_foreman?
@@ -20,7 +20,7 @@ module Guard
20
20
  spork_processes.map { |process| process[:pid] }
21
21
  end
22
22
 
23
- private
23
+ private
24
24
 
25
25
  def drb_ready?
26
26
  DRb.start_service
@@ -50,8 +50,8 @@ module Guard
50
50
  require "win32ole"
51
51
  WIN32OLE.connect("winmgmts://.").InstancesOf("win32_process").
52
52
  each.
53
- select do |p|
54
- p.commandline =~ /spork|ring_server|magazine_slave_provider/ &&
53
+ select do |p|
54
+ p.commandline =~ /spork|ring_server|magazine_slave_provider/ &&
55
55
  File.basename(p.executablepath, File.extname(p.executablepath)) =~ /^(cmd|ruby)$/i
56
56
  end.
57
57
  map { |p| {:pid => p.processid, :ppid => p.parentprocessid} }
@@ -1,4 +1,4 @@
1
- guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
1
+ guard :spork, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
2
2
  watch('config/application.rb')
3
3
  watch('config/environment.rb')
4
4
  watch('config/environments/test.rb')
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module SporkVersion
3
- VERSION = "1.5.2"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-spork
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: 2.8.2
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
- version: '1.1'
26
+ version: 2.8.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spork
29
29
  requirement: !ruby/object:Gem::Requirement