cake 0.6.2 → 0.6.3

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.
Files changed (4) hide show
  1. data/bin/cake +23 -7
  2. data/lib/bake.jar +0 -0
  3. data/lib/cake.jar +0 -0
  4. metadata +4 -4
data/bin/cake CHANGED
@@ -237,7 +237,10 @@ def project_dir(dir)
237
237
  end
238
238
 
239
239
  def readlink(file)
240
- File.readlink(file)
240
+ link = File.readlink(file)
241
+ return file if link == file
242
+ link = "#{File.dirname(file)}/#{link}" unless link.index('/') == 0
243
+ readlink(link)
241
244
  rescue NotImplementedError, Errno::EINVAL
242
245
  file
243
246
  end
@@ -646,21 +649,34 @@ if File.exists?("#{$cakedir}/src/cake/core.clj") and File.exists?(project)
646
649
  cakepath = ["#{$cakedir}/src", "#{lib}/*", "#{lib}/dev/*"]
647
650
  bakepath = "#{$cakedir}/bake"
648
651
  else
649
- cakejar = "#{lib}/cake.jar"
650
- bakejar = "#{lib}/bake.jar"
651
- if File.exists?(cakejar) and File.exists?(bakejar)
652
+ if File.exists?("#{lib}exec/cake.jar")
653
+ # Inside a brew install.
654
+ log(:cake, "running from brew") if verbose?
655
+
656
+ if $command == :upgrade
657
+ log(:upgrade, "checking for updates to cake brew")
658
+ system('brew install --force https://github.com/mxcl/homebrew/raw/master/Library/Formula/cake.rb')
659
+ end
660
+
661
+ $version = File.basename($cakedir)
662
+ $clojure = get_clojure
663
+
664
+ cakepath = ["#{lib}exec/cake.jar", $clojure]
665
+ bakepath = extract("#{lib}exec/cake.jar", "bake.jar")
666
+ elsif File.exists?("#{lib}/cake.jar") and File.exists?("#{lib}/bake.jar")
652
667
  # Inside a gem install.
653
668
  log(:cake, "running from gem") if verbose?
669
+
654
670
  if $command == :upgrade
655
671
  log(:upgrade, "checking for updates to cake gem")
656
672
  system('gem update cake --no-ri --no-rdoc')
657
673
  end
658
674
 
659
- $version = File.basename(File.dirname(lib)).split('-')[1]
675
+ $version = File.basename($cakedir).split('-')[1]
660
676
  $clojure = "#{lib}/clojure.jar"
661
677
 
662
- cakepath = [cakejar, $clojure]
663
- bakepath = bakejar
678
+ cakepath = ["#{lib}/cake.jar", $clojure]
679
+ bakepath = "#{lib}/bake.jar"
664
680
  else
665
681
  # Standalone script.
666
682
  log(:cake, "running from standalone script") if verbose?
Binary file
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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 3
10
+ version: 0.6.3
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: 2011-03-07 00:00:00 -08:00
19
+ date: 2011-04-23 00:00:00 -07:00
20
20
  default_executable: cake
21
21
  dependencies: []
22
22