cake 0.5.3 → 0.5.4
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 +15 -9
- data/lib/bake.jar +0 -0
- data/lib/cake.jar +0 -0
- metadata +4 -4
data/bin/cake
CHANGED
@@ -161,6 +161,7 @@ def parse_opts!
|
|
161
161
|
$opts = {}
|
162
162
|
ARGV[1..-1].each do |opt|
|
163
163
|
case opt
|
164
|
+
when /^@(\w+)$/ then add_opt!(:context, $1)
|
164
165
|
when /^-(\w+)$/ then $1.split('').each {|c| add_opt!(c, '')}
|
165
166
|
when /^--?([-\w]+)=(.+)$/ then add_opt!($1, *$2.split(','))
|
166
167
|
when /^--?([-\w]+)$/ then add_opt!($1, "")
|
@@ -238,11 +239,18 @@ rescue NotImplementedError, Errno::EINVAL
|
|
238
239
|
file
|
239
240
|
end
|
240
241
|
|
242
|
+
def mkdir_force(dir)
|
243
|
+
FileUtils.makedirs(dir)
|
244
|
+
rescue Errno::EEXIST
|
245
|
+
File.unlink(dir)
|
246
|
+
FileUtils.makedirs(dir)
|
247
|
+
end
|
248
|
+
|
241
249
|
def download(url, path, opts = {})
|
242
250
|
file = File.basename(url)
|
243
251
|
|
244
|
-
if opts[:force] or not File.exists?(path)
|
245
|
-
|
252
|
+
if opts[:force] or not File.exists?(path)
|
253
|
+
mkdir_force(File.dirname(path))
|
246
254
|
open(url, progress_bar(url)) do |remote|
|
247
255
|
open(path, "wb") do |local|
|
248
256
|
while (buf = remote.read(8192)); local.write buf; end
|
@@ -254,7 +262,7 @@ def download(url, path, opts = {})
|
|
254
262
|
dir = File.expand_path(opts[:dest])
|
255
263
|
dest = "#{dir}/#{file}"
|
256
264
|
if opts[:force] or not File.exists?(dest)
|
257
|
-
|
265
|
+
mkdir_force(dir)
|
258
266
|
FileUtils.copy(path, dest)
|
259
267
|
end
|
260
268
|
dest
|
@@ -377,14 +385,12 @@ class JVM
|
|
377
385
|
end
|
378
386
|
|
379
387
|
def java_opts
|
380
|
-
|
381
|
-
opts << %{ -Djava.home="#{ENV['JAVA_HOME']}"} if ENV['JAVA_HOME']
|
382
|
-
opts
|
388
|
+
%{-cp "#{classpath}" -Djava.library.path="#{libpath}"}
|
383
389
|
end
|
384
390
|
|
385
391
|
def vm_opts
|
386
|
-
`java -d32 -version 2>&1`
|
387
|
-
'-client -d32' if $? == 0
|
392
|
+
result = `java -d32 -version 2>&1`
|
393
|
+
'-client -d32' if $? == 0 and result !~ /Cannot run Java in 32 bit mode/
|
388
394
|
end
|
389
395
|
|
390
396
|
MIN_PORT = 2**14
|
@@ -706,7 +712,7 @@ $cakedir = File.expand_path(File.dirname(File.dirname(readlink(__FILE__))))
|
|
706
712
|
$github = "http://github.com/ninjudd/cake-standalone/raw/master"
|
707
713
|
$m2 = "#{$home}/.m2/repository"
|
708
714
|
$config = Configuration.new("#{$home}/.cake/config", ".cake/config")
|
709
|
-
$vars = {:
|
715
|
+
$vars = {:env => ENV.to_hash, :pwd => $pwd, :args => ARGV, :opts => $opts, :script => $0}.to_clj
|
710
716
|
$timeout = ($config['connect.timeout'] || 20).to_i
|
711
717
|
|
712
718
|
initialize_cake_dirs
|
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: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
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-10-
|
19
|
+
date: 2010-10-21 00:00:00 -07:00
|
20
20
|
default_executable: cake
|
21
21
|
dependencies: []
|
22
22
|
|