torquebox-capistrano-support 2.1.1 → 2.1.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/lib/torquebox/capistrano/recipes.rb +3 -2
- data/spec/recipes_spec.rb +21 -5
- metadata +2 -2
|
@@ -61,11 +61,12 @@ module Capistrano
|
|
|
61
61
|
configuration.load do
|
|
62
62
|
# --
|
|
63
63
|
|
|
64
|
-
set( :app_ruby_version, 1.8 ) unless exists?( :app_ruby_version )
|
|
65
64
|
set( :torquebox_home, '/opt/torquebox' ) unless exists?( :torquebox_home )
|
|
66
65
|
|
|
67
66
|
set( :jruby_home, lambda{ "#{torquebox_home}/jruby" } ) unless exists?( :jruby_home )
|
|
68
|
-
|
|
67
|
+
if exists?( :app_ruby_version ) && !exists?( :jruby_opts )
|
|
68
|
+
set( :jruby_opts, lambda{ "--#{app_ruby_version}" } )
|
|
69
|
+
end
|
|
69
70
|
set( :jruby_bin, lambda{ "#{jruby_home}/bin/jruby #{jruby_opts}" } ) unless exists?( :jruby_bin )
|
|
70
71
|
|
|
71
72
|
set( :jboss_home, lambda{ "#{torquebox_home}/jboss" } ) unless exists?( :jboss_home )
|
data/spec/recipes_spec.rb
CHANGED
|
@@ -25,17 +25,33 @@ describe Capistrano::TorqueBox, "loaded into a configuration" do
|
|
|
25
25
|
Capistrano::TorqueBox.load_into(@configuration)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
it "should define app_ruby_version" do
|
|
29
|
-
@configuration.exists?( :app_ruby_version ).should
|
|
28
|
+
it "should not define app_ruby_version by default" do
|
|
29
|
+
@configuration.exists?( :app_ruby_version ).should be_false
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
it "should default
|
|
32
|
+
it "should allow default 1.9 override for app_ruby_version" do
|
|
33
|
+
@configuration.set( :app_ruby_version, 1.9 )
|
|
34
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
|
35
|
+
@configuration.fetch( :app_ruby_version ).should == 1.9
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "should allow default 1.8 override for app_ruby_version" do
|
|
39
|
+
@configuration.set( :app_ruby_version, 1.8 )
|
|
40
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
|
33
41
|
@configuration.fetch( :app_ruby_version ).should == 1.8
|
|
34
42
|
end
|
|
35
43
|
|
|
36
|
-
it "should
|
|
44
|
+
it "should add app_ruby_version if set to jruby opts if unset" do
|
|
37
45
|
@configuration.set( :app_ruby_version, 1.9 )
|
|
38
|
-
@configuration
|
|
46
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
|
47
|
+
@configuration.fetch( :jruby_opts ).should == "--1.9"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it "should not modify jruby_opts if already set" do
|
|
51
|
+
@configuration.set( :app_ruby_version, 1.9 )
|
|
52
|
+
@configuration.set( :jruby_opts, "-X+C" )
|
|
53
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
|
54
|
+
@configuration.fetch( :jruby_opts ).should == "-X+C"
|
|
39
55
|
end
|
|
40
56
|
|
|
41
57
|
it "should create a deployment descriptor" do
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: torquebox-capistrano-support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 2.1.
|
|
5
|
+
version: 2.1.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- The TorqueBox Team
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2012-
|
|
13
|
+
date: 2012-09-24 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: jruby-openssl
|