bake.clj 0.3.1 → 0.3.2
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.
- data/bin/bake +7 -7
- data/lib/bake.jar +0 -0
- data/lib/cake.jar +0 -0
- metadata +4 -4
data/bin/bake
CHANGED
@@ -148,7 +148,7 @@ def log(command, *message)
|
|
148
148
|
end
|
149
149
|
end
|
150
150
|
|
151
|
-
class
|
151
|
+
class Configuration < Hash
|
152
152
|
def initialize(path)
|
153
153
|
File.open(path, 'r') do |file|
|
154
154
|
file.each do |line|
|
@@ -171,7 +171,7 @@ class Config < Hash
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def config
|
174
|
-
@config ||=
|
174
|
+
@config ||= Configuration.new(".bake/config")
|
175
175
|
end
|
176
176
|
|
177
177
|
class JVM
|
@@ -184,9 +184,6 @@ class JVM
|
|
184
184
|
@pidfile = "#{$confdir}/#{type}.pid"
|
185
185
|
@load_time = File.exists?(pidfile) ? File.mtime(pidfile) : Time.now
|
186
186
|
refresh
|
187
|
-
rescue Errno::ENOENT, Errno::ESRCH, Errno::ECONNREFUSED => e
|
188
|
-
log(:start, "defunct #{type} jvm") if debug? and e.kind_of?(Errno::ECONNREFUSED)
|
189
|
-
reset! # no pidfile or invalid pid or connection refused
|
190
187
|
end
|
191
188
|
|
192
189
|
def running?
|
@@ -206,7 +203,10 @@ class JVM
|
|
206
203
|
def refresh
|
207
204
|
@pid, @port = IO.read(pidfile).map {|l| l.to_i}
|
208
205
|
Process.kill(0, @pid) # make sure pid is valid
|
209
|
-
TCPSocket.new("localhost", @port) if @port # make sure jvm is running on port
|
206
|
+
TCPSocket.new("localhost", @port).close if @port # make sure jvm is running on port
|
207
|
+
rescue Errno::ENOENT, Errno::ESRCH, Errno::ECONNREFUSED => e
|
208
|
+
log(:start, "defunct #{type} jvm") if debug? and e.kind_of?(Errno::ECONNREFUSED)
|
209
|
+
reset! # no pidfile or invalid pid or connection refused
|
210
210
|
end
|
211
211
|
|
212
212
|
def reload
|
@@ -586,7 +586,7 @@ else
|
|
586
586
|
bake.cakeport = cake.port
|
587
587
|
if $command == :test and $opts[:auto]
|
588
588
|
interval = $opts[:auto].last.to_i
|
589
|
-
interval = config['test.auto.interval'].to_i if config['test.auto.interval'] || 1 if interval == 0
|
589
|
+
interval = (config['test.auto.interval'].to_i if config['test.auto.interval']) || (1 if interval == 0)
|
590
590
|
run_tests = true
|
591
591
|
while true
|
592
592
|
bake.send_command($command, ARGV) if run_tests
|
data/lib/bake.jar
CHANGED
Binary file
|
data/lib/cake.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake.clj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Balthrop
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-24 00:00:00 -07:00
|
20
20
|
default_executable: bake
|
21
21
|
dependencies: []
|
22
22
|
|