guard-spork 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -96,7 +96,7 @@ If your application runs on [Heroku](http://www.heroku.com/) or otherwise uses [
96
96
  Available options:
97
97
 
98
98
  ``` ruby
99
- :wait => 60 # Seconds to wait for the server to start, default: 30
99
+ :wait => 60 # Seconds to wait for the server to start, default: 30. Setting it to nil will cause it to wait indefinitely.
100
100
  :cucumber => false
101
101
  :rspec => false
102
102
  :test_unit => false
@@ -98,18 +98,26 @@ module Guard
98
98
 
99
99
  def wait_for_launch(instances, wait)
100
100
  not_running = instances.dup
101
- wait.times do
101
+ wait_or_loop(wait) do
102
102
  sleep 1
103
103
  not_running.delete_if { |instance| instance.running? }
104
104
  return true if not_running.empty?
105
105
  end
106
- false
107
106
  end
108
107
 
109
108
  def should_use?(what)
110
109
  options[what].nil? ? send("detect_#{what}") : options[what]
111
110
  end
112
111
 
112
+ def wait_or_loop(wait)
113
+ if wait
114
+ wait.times { yield }
115
+ else
116
+ loop { yield }
117
+ end
118
+ false
119
+ end
120
+
113
121
  def detect_bundler
114
122
  File.exist?("Gemfile")
115
123
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module SporkVersion
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1"
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: 0.7.0
4
+ version: 0.7.1
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-04-23 00:00:00.000000000 Z
12
+ date: 2012-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70202560383460 !ruby/object:Gem::Requirement
16
+ requirement: &70326695053200 !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: *70202560383460
24
+ version_requirements: *70326695053200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spork
27
- requirement: &70202560383000 !ruby/object:Gem::Requirement
27
+ requirement: &70326695052740 !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: *70202560383000
35
+ version_requirements: *70326695052740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70202560382540 !ruby/object:Gem::Requirement
38
+ requirement: &70326695052280 !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: *70202560382540
46
+ version_requirements: *70326695052280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70202560382080 !ruby/object:Gem::Requirement
49
+ requirement: &70326695051820 !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: *70202560382080
57
+ version_requirements: *70326695051820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-rspec
60
- requirement: &70202560381620 !ruby/object:Gem::Requirement
60
+ requirement: &70326695051360 !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: *70202560381620
68
+ version_requirements: *70326695051360
69
69
  description: Guard::Spork automatically manage Spork DRb servers.
70
70
  email:
71
71
  - thibaud@thibaud.me