torquebox-capistrano-support 2.1.2 → 2.2.0
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 +7 -1
- data/spec/recipes_spec.rb +48 -20
- metadata +104 -88
@@ -17,6 +17,7 @@
|
|
17
17
|
|
18
18
|
require 'capistrano'
|
19
19
|
|
20
|
+
# @api private
|
20
21
|
module Capistrano
|
21
22
|
class Configuration
|
22
23
|
def create_deployment_descriptor( root )
|
@@ -51,6 +52,11 @@ module Capistrano
|
|
51
52
|
dd['environment']['RAILS_ENV'] = rails_env
|
52
53
|
end
|
53
54
|
|
55
|
+
if (exists?( :stomp_host ) )
|
56
|
+
dd['stomp'] ||= {}
|
57
|
+
dd['stomp']['host'] = stomp_host
|
58
|
+
end
|
59
|
+
|
54
60
|
dd
|
55
61
|
end
|
56
62
|
end
|
@@ -67,7 +73,7 @@ module Capistrano
|
|
67
73
|
if exists?( :app_ruby_version ) && !exists?( :jruby_opts )
|
68
74
|
set( :jruby_opts, lambda{ "--#{app_ruby_version}" } )
|
69
75
|
end
|
70
|
-
set( :jruby_bin, lambda{ "#{jruby_home}/bin/jruby #{jruby_opts}" } ) unless exists?( :jruby_bin )
|
76
|
+
set( :jruby_bin, lambda{ "#{jruby_home}/bin/jruby #{jruby_opts if exists?( :jruby_opts )}" } ) unless exists?( :jruby_bin )
|
71
77
|
|
72
78
|
set( :jboss_home, lambda{ "#{torquebox_home}/jboss" } ) unless exists?( :jboss_home )
|
73
79
|
set( :jboss_control_style, :initd ) unless exists?( :jboss_control_style )
|
data/spec/recipes_spec.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# This is free software; you can redistribute it and/or modify it
|
4
4
|
# under the terms of the GNU Lesser General Public License as
|
5
5
|
# published by the Free Software Foundation; either version 2.1 of
|
6
6
|
# the License, or (at your option) any later version.
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# This software is distributed in the hope that it will be useful,
|
9
9
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
10
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
11
|
# Lesser General Public License for more details.
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# You should have received a copy of the GNU Lesser General Public
|
14
14
|
# License along with this software; if not, write to the Free
|
15
15
|
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
@@ -25,26 +25,35 @@ describe Capistrano::TorqueBox, "loaded into a configuration" do
|
|
25
25
|
Capistrano::TorqueBox.load_into(@configuration)
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
context "Ruby interpreter version" do
|
29
|
+
it "should not define app_ruby_version by default" do
|
30
|
+
@configuration.exists?( :app_ruby_version ).should be_false
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
it "should allow setting neither app_ruby_version nor jruby_opts" do
|
34
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
35
|
+
@configuration.exists?( :app_ruby_version ).should be_false
|
36
|
+
@configuration.exists?( :jruby_opts ).should be_false
|
37
|
+
expect { @configuration.fetch( :jruby_bin ) }.not_to raise_error
|
38
|
+
end
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
it "should allow default 1.9 override for app_ruby_version" do
|
41
|
+
@configuration.set( :app_ruby_version, 1.9 )
|
42
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
43
|
+
@configuration.fetch( :app_ruby_version ).should == 1.9
|
44
|
+
end
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
it "should allow default 1.8 override for app_ruby_version" do
|
47
|
+
@configuration.set( :app_ruby_version, 1.8 )
|
48
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
49
|
+
@configuration.fetch( :app_ruby_version ).should == 1.8
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should add app_ruby_version if set to jruby opts if unset" do
|
53
|
+
@configuration.set( :app_ruby_version, 1.9 )
|
54
|
+
Capistrano::TorqueBox.load_into(@configuration)
|
55
|
+
@configuration.fetch( :jruby_opts ).should == "--1.9"
|
56
|
+
end
|
48
57
|
end
|
49
58
|
|
50
59
|
it "should not modify jruby_opts if already set" do
|
@@ -63,4 +72,23 @@ describe Capistrano::TorqueBox, "loaded into a configuration" do
|
|
63
72
|
@configuration.create_deployment_descriptor('/path/to/app')['environment']['RAILS_ENV'].should == 'development'
|
64
73
|
end
|
65
74
|
|
75
|
+
context "Virtual host configuration" do
|
76
|
+
it "should set the web listening host" do
|
77
|
+
@configuration.set(:app_host, 'taquito.com')
|
78
|
+
@configuration.create_deployment_descriptor('/path/to/app')['web']['host'].should eq('taquito.com')
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should not care if there is no app host" do
|
82
|
+
@configuration.set(:app_context, "/")
|
83
|
+
@configuration.create_deployment_descriptor('/path/to/app/')['web'].should_not have_key('host')
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
context "Stomp configuration" do
|
88
|
+
it "should set the stomp hostname" do
|
89
|
+
@configuration.set(:stomp_host, "awesome.com")
|
90
|
+
@configuration.create_deployment_descriptor('/path/to/app')['stomp']['host'].should eq("awesome.com")
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
66
94
|
end
|
metadata
CHANGED
@@ -1,103 +1,119 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: torquebox-capistrano-support
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 2.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 2.2.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
9
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- The TorqueBox Team
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
12
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: jruby-openssl
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.7.4
|
21
|
+
none: false
|
22
|
+
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.7.4
|
27
|
+
none: false
|
28
|
+
prerelease: false
|
29
|
+
type: :development
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: capistrano
|
32
|
+
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.9.0
|
37
|
+
none: false
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.9.0
|
43
|
+
none: false
|
44
|
+
prerelease: false
|
45
|
+
type: :development
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: capistrano-spec
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - '='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.1.0
|
53
|
+
none: false
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - '='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 0.1.0
|
59
|
+
none: false
|
60
|
+
prerelease: false
|
61
|
+
type: :development
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.7.0
|
69
|
+
none: false
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.7.0
|
75
|
+
none: false
|
76
|
+
prerelease: false
|
77
|
+
type: :development
|
78
|
+
description: ''
|
79
|
+
email:
|
80
|
+
- torquebox-dev@torquebox.org
|
62
81
|
executables: []
|
63
|
-
|
64
82
|
extensions: []
|
65
|
-
|
66
83
|
extra_rdoc_files: []
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
- spec/recipes_spec.rb
|
84
|
+
files:
|
85
|
+
- licenses/lgpl-2.1.txt
|
86
|
+
- lib/org.torquebox.capistrano-support.rb
|
87
|
+
- lib/torquebox-capistrano-support.rb
|
88
|
+
- lib/torquebox/capistrano/recipes.rb
|
89
|
+
- spec/recipes_spec.rb
|
90
|
+
- spec/spec_helper.rb
|
75
91
|
homepage: http://torquebox.org/
|
76
|
-
licenses:
|
77
|
-
|
78
|
-
post_install_message:
|
92
|
+
licenses:
|
93
|
+
- lgpl
|
94
|
+
post_install_message:
|
79
95
|
rdoc_options: []
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: !binary |-
|
103
|
+
MA==
|
84
104
|
none: false
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: !binary |-
|
110
|
+
MA==
|
90
111
|
none: false
|
91
|
-
requirements:
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: "0"
|
95
112
|
requirements: []
|
96
|
-
|
97
|
-
rubyforge_project:
|
113
|
+
rubyforge_project:
|
98
114
|
rubygems_version: 1.8.24
|
99
|
-
signing_key:
|
115
|
+
signing_key:
|
100
116
|
specification_version: 3
|
101
117
|
summary: TorqueBox Capistrano Support
|
102
|
-
test_files:
|
103
|
-
|
118
|
+
test_files:
|
119
|
+
- spec/recipes_spec.rb
|