cake 0.4.7 → 0.4.8
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/cake +18 -12
- data/lib/bake.jar +0 -0
- data/lib/cake.jar +0 -0
- metadata +4 -4
data/bin/cake
CHANGED
@@ -308,10 +308,10 @@ class JVM
|
|
308
308
|
attr_reader :type, :classpath, :libpath, :port, :pid, :pidfile, :load_time
|
309
309
|
|
310
310
|
def initialize(classpath, libpath)
|
311
|
-
@type
|
312
|
-
@classpath
|
313
|
-
@libpath
|
314
|
-
@pidfile
|
311
|
+
@type = self.class.name.downcase
|
312
|
+
@classpath = make_path(classpath)
|
313
|
+
@libpath = make_path(libpath)
|
314
|
+
@pidfile = "#{$confdir}/#{type}.pid"
|
315
315
|
@load_time = File.exists?(pidfile) ? File.mtime(pidfile) : Time.now
|
316
316
|
refresh
|
317
317
|
end
|
@@ -545,7 +545,7 @@ private
|
|
545
545
|
File.exists?(file) and File.mtime(file) > load_time
|
546
546
|
end
|
547
547
|
|
548
|
-
def with_socket(retries =
|
548
|
+
def with_socket(retries = $timeout)
|
549
549
|
return unless port
|
550
550
|
socket = TCPSocket.new("localhost", port)
|
551
551
|
result = yield(socket)
|
@@ -553,9 +553,11 @@ private
|
|
553
553
|
rescue Errno::ECONNREFUSED, Errno::EBADF => e
|
554
554
|
sleep 1
|
555
555
|
if retries
|
556
|
-
|
557
|
-
|
558
|
-
|
556
|
+
if (retries -= 1) == 0
|
557
|
+
log :cake, "connection to #{type} jvm is taking a long time...",
|
558
|
+
"you can use ^C to abort and use 'cake kill' or 'cake kill -9' to force the jvm to restart"
|
559
|
+
end
|
560
|
+
retry
|
559
561
|
end
|
560
562
|
ensure
|
561
563
|
socket.close if socket
|
@@ -695,15 +697,15 @@ project_clj = "#{$home}/.cake/project.clj"
|
|
695
697
|
File.open(project_clj, 'w') do |file|
|
696
698
|
file.write <<END
|
697
699
|
(defproject global "0.0.0"
|
698
|
-
:description "Don't rename this project,
|
700
|
+
:description "Don't rename this project, but you can change the version if you want."
|
699
701
|
:dependencies [[clojure "1.2.0"]
|
700
702
|
[clojure-contrib "1.2.0"]])
|
701
703
|
;;--------------------
|
702
704
|
;; This is the global cake project. What does that mean?
|
703
705
|
;; 1. This project is used whenever you run cake outside a project directory.
|
704
706
|
;; 2. Any dependencies specified here will be available in the global repl.
|
705
|
-
;; 3. Any dev-dependencies specified here will be available in all projects,
|
706
|
-
;; must run 'cake deps --global' manually when you change this file.
|
707
|
+
;; 3. Any dev-dependencies specified here will be available in all projects, but
|
708
|
+
;; you must run 'cake deps --global' manually when you change this file.
|
707
709
|
;; 4. Configuration options in ~/.cake/config are used in all projects.
|
708
710
|
;;--------------------
|
709
711
|
END
|
@@ -717,6 +719,7 @@ $cakedir = File.dirname(File.dirname(readlink(__FILE__)))
|
|
717
719
|
$repo = "http://clojars.org/repo/cake/cake"
|
718
720
|
$confdir = ".cake"
|
719
721
|
$config = Configuration.new("#{$home}/.cake/config", ".cake/config")
|
722
|
+
$timeout = ($config['connect.timeout'] || 20).to_i
|
720
723
|
$vars = {:env => ENV.to_hash, :pwd => $pwd, :args => ARGV, :opts => $opts, :script => $0}.to_clj
|
721
724
|
|
722
725
|
Dir.chdir($bakedir)
|
@@ -736,8 +739,11 @@ if File.exists?("#{$cakedir}/.gitignore") and File.exists?("#{$cakedir}/project.
|
|
736
739
|
system('git pull')
|
737
740
|
end
|
738
741
|
|
739
|
-
|
742
|
+
project = "#{$cakedir}/project.clj"
|
743
|
+
$version = IO.read(project).split("\n").first.match(/defproject cake \"(.*)\"/)[1]
|
740
744
|
log(:deps, "project.clj version is #{$version}") if debug?
|
745
|
+
|
746
|
+
FileUtils.remove_dir("lib", true) if newer?(project, lib)
|
741
747
|
if Dir["#{lib}/*.jar"].empty? or Dir["#{lib}/dev/*.jar"].empty?
|
742
748
|
# In a new git checkout, need to fetch dependencies.
|
743
749
|
begin
|
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: cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 8
|
10
|
+
version: 0.4.8
|
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-08-
|
19
|
+
date: 2010-08-25 00:00:00 -07:00
|
20
20
|
default_executable: cake
|
21
21
|
dependencies: []
|
22
22
|
|