guard-spork 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/guard/spork/runner.rb +10 -7
- data/lib/guard/spork/spork_instance.rb +4 -0
- data/lib/guard/spork/version.rb +1 -1
- metadata +13 -13
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Guard::Spork [![Build Status](https://secure.travis-ci.org/guard/guard-spork.png)](http://travis-ci.org/guard/guard-spork)
|
2
2
|
|
3
|
-
Guard::Spork allows to automatically & intelligently start/reload your RSpec/Cucumber/Test::Unit [Spork](https://github.com/
|
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
6
|
* Tested against Ruby 1.8.7, 1.9.2, REE and the latest versions Rubinius.
|
data/lib/guard/spork/runner.rb
CHANGED
@@ -11,9 +11,12 @@ module Guard
|
|
11
11
|
options[:test_unit_port] ||= 8988
|
12
12
|
options[:cucumber_port] ||= 8990
|
13
13
|
options[:rspec_port] ||= 8989
|
14
|
+
options[:minitest_port] ||= 8988
|
14
15
|
options[:rspec_env] ||= {}
|
15
16
|
options[:test_unit_env] ||= {}
|
16
17
|
options[:cucumber_env] ||= {}
|
18
|
+
options[:minitest_env] ||= {}
|
19
|
+
options[:minitest] ||= false
|
17
20
|
options[:aggressive_kill] = true unless options[:aggressive_kill] == false
|
18
21
|
@options = options
|
19
22
|
initialize_spork_instances
|
@@ -45,7 +48,7 @@ module Guard
|
|
45
48
|
|
46
49
|
def initialize_spork_instances
|
47
50
|
@spork_instances = []
|
48
|
-
[:rspec, :cucumber, :test_unit].each do |type|
|
51
|
+
[:rspec, :cucumber, :test_unit, :minitest].each do |type|
|
49
52
|
port, env = options[:"#{type}_port"], options[:"#{type}_env"]
|
50
53
|
spork_instances << SporkInstance.new(type, port, env, :bundler => should_use?(:bundler)) if should_use?(type)
|
51
54
|
end
|
@@ -103,11 +106,7 @@ module Guard
|
|
103
106
|
end
|
104
107
|
|
105
108
|
def should_use?(what)
|
106
|
-
|
107
|
-
send("detect_#{what}")
|
108
|
-
else
|
109
|
-
options[what]
|
110
|
-
end
|
109
|
+
options[what] || send("detect_#{what}")
|
111
110
|
end
|
112
111
|
|
113
112
|
def detect_bundler
|
@@ -119,9 +118,13 @@ module Guard
|
|
119
118
|
end
|
120
119
|
|
121
120
|
def detect_rspec
|
122
|
-
File.exist?("spec")
|
121
|
+
File.exist?("spec") && (options[:minitest].nil? || !options[:minitest])
|
123
122
|
end
|
124
123
|
|
124
|
+
def detect_minitest
|
125
|
+
false
|
126
|
+
end
|
127
|
+
|
125
128
|
def detect_cucumber
|
126
129
|
File.exist?("features")
|
127
130
|
end
|
@@ -18,6 +18,8 @@ module Guard
|
|
18
18
|
"Cucumber"
|
19
19
|
when :test_unit
|
20
20
|
"Test::Unit"
|
21
|
+
when :minitest
|
22
|
+
"MiniTest"
|
21
23
|
else
|
22
24
|
type.to_s
|
23
25
|
end
|
@@ -55,6 +57,8 @@ module Guard
|
|
55
57
|
parts << "testunit"
|
56
58
|
elsif type == :cucumber
|
57
59
|
parts << "cu"
|
60
|
+
elsif type == :minitest
|
61
|
+
parts << "minitest"
|
58
62
|
end
|
59
63
|
|
60
64
|
parts << "-p #{port}"
|
data/lib/guard/spork/version.rb
CHANGED
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: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &70261058341280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.10.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70261058341280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: spork
|
27
|
-
requirement: &
|
27
|
+
requirement: &70261058340820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.8.4
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70261058340820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70261058340360 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70261058340360
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70261058339900 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '2.6'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70261058339900
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70261058339440 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0.4'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70261058339440
|
69
69
|
description: Guard::Spork automatically manage Spork DRb servers.
|
70
70
|
email:
|
71
71
|
- thibaud@thibaud.me
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: 1.3.6
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project: guard-spork
|
103
|
-
rubygems_version: 1.8.
|
103
|
+
rubygems_version: 1.8.16
|
104
104
|
signing_key:
|
105
105
|
specification_version: 3
|
106
106
|
summary: Guard gem for Spork
|