public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Search Repo:
Merge branch 'BUILDR-68'


git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@655729 
13f79535-47bb-0310-9956-ffa450edef68
Assaf (author)
Mon May 12 21:21:11 -0700 2008
commit  9daf7c8446b8bd7732331c3b09847d030c373d2b
tree    762794131902055455b9738b55f13fe6e79b4f48
parent  38a65f56871635eebe4601d0f4d9794f3faebb46
...
2
3
4
 
5
6
7
...
2
3
4
5
6
7
8
0
@@ -2,6 +2,7 @@
0
 * Added: reading files from SFTP server.
0
 * Changed: Upgraded to Net::SSH 2.0 and Net::SFTP 2.0.
0
 * Fixed: BUILDR-67 HTTP GET now works with query parameters (Tommy Knowlton).
0
+* Fixed: BUILDR-68 Now accepting JAVA_HOME setting on OS X (Nathan Hamblen).
0
 
0
 1.3.0 (2008-04-25)
0
 * Added: Testing with EasyB (Nicolas Modrzyk).
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@
0
 # the License.
0
 
0
 
0
-ENV['JAVA_HOME'] = '/System/Library/Frameworks/JavaVM.framework/Home' if Config::CONFIG['host_os'] =~ /darwin/i
0
+ENV['JAVA_HOME'] ||= '/System/Library/Frameworks/JavaVM.framework/Home' if Config::CONFIG['host_os'] =~ /darwin/i
0
 require PLATFORM == 'java' ? 'buildr/java/jruby' : 'buildr/java/rjb'
0
 
0
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
0
@@ -1 +1,39 @@
0
+# Licensed to the Apache Software Foundation (ASF) under one or more
0
+# contributor license agreements. See the NOTICE file distributed with this
0
+# work for additional information regarding copyright ownership. The ASF
0
+# licenses this file to you under the Apache License, Version 2.0 (the
0
+# "License"); you may not use this file except in compliance with the License.
0
+# You may obtain a copy of the License at
0
+#
0
+# http://www.apache.org/licenses/LICENSE-2.0
0
+#
0
+# Unless required by applicable law or agreed to in writing, software
0
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
0
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
0
+# License for the specific language governing permissions and limitations under
0
+# the License.
0
+
0
+require File.join(File.dirname(__FILE__), 'spec_helpers')
0
+
0
+describe ENV, 'JAVA_HOME on OS X' do
0
+ before do
0
+ @old_home, ENV['JAVA_HOME'] = ENV['JAVA_HOME'], nil
0
+ Config::CONFIG.should_receive(:[]).with('host_os').and_return('darwin0.9')
0
+ end
0
+
0
+ it 'should point to default JVM' do
0
+ load File.expand_path('../lib/buildr/java.rb')
0
+ ENV['JAVA_HOME'].should == '/System/Library/Frameworks/JavaVM.framework/Home'
0
+ end
0
+
0
+ it 'should use value of environment variable if specified' do
0
+ ENV['JAVA_HOME'] = '/System/Library/Frameworks/JavaVM.specified'
0
+ load File.expand_path('../lib/buildr/java.rb')
0
+ ENV['JAVA_HOME'].should == '/System/Library/Frameworks/JavaVM.specified'
0
+ end
0
+
0
+ after do
0
+ ENV['JAVA_HOME'] = @old_home
0
+ end
0
+end

Comments

    No one has commented yet.