torquebox 1.1.1 → 2.0.0.beta1
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/torquebox +138 -0
- data/lib/torquebox.rb +1 -1
- data/licenses/lgpl-2.1.txt +7 -9
- metadata +102 -23
data/bin/torquebox
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
4
|
+
#
|
5
|
+
# This is free software; you can redistribute it and/or modify it
|
6
|
+
# under the terms of the GNU Lesser General Public License as
|
7
|
+
# published by the Free Software Foundation; either version 2.1 of
|
8
|
+
# the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This software is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this software; if not, write to the Free
|
17
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
18
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
19
|
+
|
20
|
+
require 'thor'
|
21
|
+
require 'torquebox-rake-support'
|
22
|
+
require 'torquebox/server'
|
23
|
+
|
24
|
+
class TorqueBoxCommand < Thor
|
25
|
+
|
26
|
+
TASK_ORDER = %w(deploy undeploy start cli env help)
|
27
|
+
|
28
|
+
map "run" => "start"
|
29
|
+
desc "run", "Run TorqueBox"
|
30
|
+
method_option :clustered, :type => :boolean, :desc => "Run TorqueBox in clustered mode"
|
31
|
+
method_option 'max-threads', :type => :numeric, :desc => "Maximum number of HTTP threads"
|
32
|
+
method_option 'bind-address', :aliases => '-b', :type => :string, :desc => "IP address to bind to"
|
33
|
+
def start
|
34
|
+
setup_environment
|
35
|
+
TorqueBox::DeployUtils.run_server(:clustered => options.clustered,
|
36
|
+
:max_threads => options['max-threads'],
|
37
|
+
:bind_address => options['bind-address'])
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "deploy ROOT", "Deploy an application to TorqueBox"
|
41
|
+
long_desc <<-EOS
|
42
|
+
Deploy an application to TorqueBox. The ROOT argument should point to either
|
43
|
+
a directory containing the application you want to deploy, a -knob.yml file,
|
44
|
+
a .knob archive, or any Java deployable artifact (.war, .ear, etc).
|
45
|
+
EOS
|
46
|
+
method_option :context_path, :type => :string, :desc => "Context Path (ex: /, /my_app)"
|
47
|
+
method_option :env, :type => :string, :desc => "Application Environment (ex: development, test, production)"
|
48
|
+
def deploy(root = ".")
|
49
|
+
setup_environment
|
50
|
+
root = File.expand_path(root)
|
51
|
+
opts = {:root => root}.merge(options)
|
52
|
+
descriptor = TorqueBox::DeployUtils.basic_deployment_descriptor(opts)
|
53
|
+
deployment_name = TorqueBox::DeployUtils.deployment_name(root)
|
54
|
+
deployed_name, deploy_dir = TorqueBox::DeployUtils.deploy_yaml(descriptor, deployment_name)
|
55
|
+
puts "Deployed: #{deployed_name}"
|
56
|
+
puts " into: #{deploy_dir}"
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "undeploy ROOT", "Undeploy an application from TorqueBox"
|
60
|
+
def undeploy(root = ".")
|
61
|
+
setup_environment
|
62
|
+
root = File.expand_path(root)
|
63
|
+
deployment_name = TorqueBox::DeployUtils.deployment_name(root)
|
64
|
+
deploy_name, deploy_dir = TorqueBox::DeployUtils.undeploy(deployment_name)
|
65
|
+
|
66
|
+
if deploy_name
|
67
|
+
puts "Undeployed: #{deploy_name}"
|
68
|
+
puts " from: #{deploy_dir}"
|
69
|
+
else
|
70
|
+
puts "Nothing to undeploy"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "cli", "Run the JBoss AS7 CLI"
|
75
|
+
def cli
|
76
|
+
setup_environment
|
77
|
+
options = "--connect"
|
78
|
+
if Config::CONFIG['host_os'] =~ /mswin/
|
79
|
+
path = File.join(TorqueBox::Server.jboss_home, "bin\\jboss-admin")
|
80
|
+
exec(path, options)
|
81
|
+
else
|
82
|
+
path = "/bin/sh #{File.join(TorqueBox::Server.jboss_home, 'bin/jboss-admin.sh')}"
|
83
|
+
exec "#{path} #{options}"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
desc "env [VARIABLE]", "Display TorqueBox environment variables"
|
88
|
+
def env(variable=nil)
|
89
|
+
setup_environment
|
90
|
+
env_keys = %w(TORQUEBOX_HOME JBOSS_HOME JRUBY_HOME)
|
91
|
+
if variable.nil?
|
92
|
+
env_keys.each { |key| shell.say "#{key}=#{ENV[key]}" }
|
93
|
+
else
|
94
|
+
key = env_keys.find { |key| variable.downcase == key.downcase }
|
95
|
+
shell.say(ENV[key]) unless key.nil?
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
no_tasks {
|
100
|
+
def setup_environment
|
101
|
+
ENV['TORQUEBOX_HOME'] ||= TorqueBox::Server.torquebox_home
|
102
|
+
ENV['JBOSS_HOME'] ||= TorqueBox::Server.jboss_home
|
103
|
+
ENV['JRUBY_HOME'] ||= TorqueBox::Server.jruby_home
|
104
|
+
ENV['JBOSS_OPTS'] ||= "-Djruby.home=#{TorqueBox::Server.jruby_home}"
|
105
|
+
%w(TORQUEBOX_HOME JBOSS_HOME JRUBY_HOME).each { |key| puts "[ERROR] #{key} is not set. Install torquebox-server gem or manually set #{key}" unless ENV[key] }
|
106
|
+
end
|
107
|
+
|
108
|
+
class << self
|
109
|
+
# Override all_tasks and help methods in Thor to print options
|
110
|
+
# out in the order we prefer
|
111
|
+
alias_method :all_tasks_from_super, :all_tasks
|
112
|
+
|
113
|
+
def all_tasks
|
114
|
+
super_tasks = all_tasks_from_super
|
115
|
+
tasks = Thor::CoreExt::OrderedHash.new
|
116
|
+
TASK_ORDER.each do |task|
|
117
|
+
tasks[task] = super_tasks[task] unless super_tasks[task].nil?
|
118
|
+
end
|
119
|
+
tasks.merge(super_tasks)
|
120
|
+
end
|
121
|
+
|
122
|
+
def help(shell, subcommand = false)
|
123
|
+
list = printable_tasks(true, subcommand)
|
124
|
+
Thor::Util.thor_classes_in(self).each do |klass|
|
125
|
+
list += klass.printable_tasks(false)
|
126
|
+
end
|
127
|
+
|
128
|
+
shell.say "Tasks:"
|
129
|
+
shell.print_table(list, :ident => 2, :truncate => true)
|
130
|
+
shell.say
|
131
|
+
class_options_help(shell)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
}
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
TorqueBoxCommand.start
|
data/lib/torquebox.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
16
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
17
|
|
18
|
-
require 'torquebox-
|
18
|
+
require 'torquebox-core'
|
19
19
|
require 'torquebox-naming'
|
20
20
|
require 'torquebox-messaging'
|
21
21
|
require 'torquebox-web'
|
data/licenses/lgpl-2.1.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 2.1, February 1999
|
3
3
|
|
4
4
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
5
5
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
@@ -10,7 +10,7 @@
|
|
10
10
|
as the successor of the GNU Library Public License, version 2, hence
|
11
11
|
the version number 2.1.]
|
12
12
|
|
13
|
-
|
13
|
+
Preamble
|
14
14
|
|
15
15
|
The licenses for most software are designed to take away your
|
16
16
|
freedom to share and change it. By contrast, the GNU General Public
|
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
|
|
112
112
|
former contains code derived from the library, whereas the latter must
|
113
113
|
be combined with the library in order to run.
|
114
114
|
|
115
|
-
|
115
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
116
116
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
117
117
|
|
118
118
|
0. This License Agreement applies to any software library or other
|
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
|
|
146
146
|
on the Library (independent of the use of the Library in a tool for
|
147
147
|
writing it). Whether that is true depends on what the Library does
|
148
148
|
and what the program that uses the Library does.
|
149
|
-
|
149
|
+
|
150
150
|
1. You may copy and distribute verbatim copies of the Library's
|
151
151
|
complete source code as you receive it, in any medium, provided that
|
152
152
|
you conspicuously and appropriately publish on each copy an
|
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
|
|
432
432
|
of all derivatives of our free software and of promoting the sharing
|
433
433
|
and reuse of software generally.
|
434
434
|
|
435
|
-
|
435
|
+
NO WARRANTY
|
436
436
|
|
437
437
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
438
438
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
455
455
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
456
456
|
DAMAGES.
|
457
457
|
|
458
|
-
|
458
|
+
END OF TERMS AND CONDITIONS
|
459
459
|
|
460
460
|
How to Apply These Terms to Your New Libraries
|
461
461
|
|
@@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
|
500
500
|
Ty Coon, President of Vice
|
501
501
|
|
502
502
|
That's all there is to it!
|
503
|
-
|
504
|
-
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torquebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version:
|
4
|
+
prerelease: 6
|
5
|
+
version: 2.0.0.beta1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- The TorqueBox Team
|
@@ -10,89 +10,168 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-12-02 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: torquebox-
|
16
|
+
name: torquebox-core
|
18
17
|
prerelease: false
|
19
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
20
19
|
none: false
|
21
20
|
requirements:
|
22
21
|
- - "="
|
23
22
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
23
|
+
version: 2.0.0.beta1
|
25
24
|
type: :runtime
|
26
25
|
version_requirements: *id001
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: torquebox-
|
27
|
+
name: torquebox-transactions
|
29
28
|
prerelease: false
|
30
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
31
30
|
none: false
|
32
31
|
requirements:
|
33
32
|
- - "="
|
34
33
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
34
|
+
version: 2.0.0.beta1
|
36
35
|
type: :runtime
|
37
36
|
version_requirements: *id002
|
38
37
|
- !ruby/object:Gem::Dependency
|
39
|
-
name: torquebox-
|
38
|
+
name: torquebox-configure
|
40
39
|
prerelease: false
|
41
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
43
|
- - "="
|
45
44
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
45
|
+
version: 2.0.0.beta1
|
47
46
|
type: :runtime
|
48
47
|
version_requirements: *id003
|
49
48
|
- !ruby/object:Gem::Dependency
|
50
|
-
name: torquebox-
|
49
|
+
name: torquebox-messaging
|
51
50
|
prerelease: false
|
52
51
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
52
|
none: false
|
54
53
|
requirements:
|
55
54
|
- - "="
|
56
55
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
56
|
+
version: 2.0.0.beta1
|
58
57
|
type: :runtime
|
59
58
|
version_requirements: *id004
|
60
59
|
- !ruby/object:Gem::Dependency
|
61
|
-
name: torquebox-
|
60
|
+
name: torquebox-naming
|
62
61
|
prerelease: false
|
63
62
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
63
|
none: false
|
65
64
|
requirements:
|
66
65
|
- - "="
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
67
|
+
version: 2.0.0.beta1
|
69
68
|
type: :runtime
|
70
69
|
version_requirements: *id005
|
71
70
|
- !ruby/object:Gem::Dependency
|
72
|
-
name: torquebox-
|
71
|
+
name: torquebox-rake-support
|
73
72
|
prerelease: false
|
74
73
|
requirement: &id006 !ruby/object:Gem::Requirement
|
75
74
|
none: false
|
76
75
|
requirements:
|
77
76
|
- - "="
|
78
77
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
78
|
+
version: 2.0.0.beta1
|
80
79
|
type: :runtime
|
81
80
|
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: torquebox-security
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - "="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.0.0.beta1
|
90
|
+
type: :runtime
|
91
|
+
version_requirements: *id007
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: torquebox-vfs
|
94
|
+
prerelease: false
|
95
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - "="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 2.0.0.beta1
|
101
|
+
type: :runtime
|
102
|
+
version_requirements: *id008
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: torquebox-web
|
105
|
+
prerelease: false
|
106
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - "="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 2.0.0.beta1
|
112
|
+
type: :runtime
|
113
|
+
version_requirements: *id009
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: torquebox-cache
|
116
|
+
prerelease: false
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - "="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 2.0.0.beta1
|
123
|
+
type: :runtime
|
124
|
+
version_requirements: *id010
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: torquebox-stomp
|
127
|
+
prerelease: false
|
128
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - "="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 2.0.0.beta1
|
134
|
+
type: :runtime
|
135
|
+
version_requirements: *id011
|
136
|
+
- !ruby/object:Gem::Dependency
|
137
|
+
name: thor
|
138
|
+
prerelease: false
|
139
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.9.0
|
145
|
+
- - <
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 1.0.0
|
148
|
+
type: :runtime
|
149
|
+
version_requirements: *id012
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: rspec
|
152
|
+
prerelease: false
|
153
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - "="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 2.7.0
|
159
|
+
type: :development
|
160
|
+
version_requirements: *id013
|
82
161
|
description: ""
|
83
162
|
email:
|
84
163
|
- torquebox-dev@torquebox.org
|
85
|
-
executables:
|
86
|
-
|
164
|
+
executables:
|
165
|
+
- torquebox
|
87
166
|
extensions: []
|
88
167
|
|
89
168
|
extra_rdoc_files: []
|
90
169
|
|
91
170
|
files:
|
92
171
|
- licenses/lgpl-2.1.txt
|
172
|
+
- bin/torquebox
|
93
173
|
- lib/torquebox.rb
|
94
|
-
|
95
|
-
homepage: http://www.torquebox.org/client-parent/torquebox/
|
174
|
+
homepage: http://www.torquebox.org/torquebox-gems-parent/torquebox/
|
96
175
|
licenses:
|
97
176
|
- lgpl
|
98
177
|
post_install_message:
|
@@ -109,13 +188,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
189
|
none: false
|
111
190
|
requirements:
|
112
|
-
- - "
|
191
|
+
- - ">"
|
113
192
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
193
|
+
version: 1.3.1
|
115
194
|
requirements: []
|
116
195
|
|
117
196
|
rubyforge_project:
|
118
|
-
rubygems_version: 1.
|
197
|
+
rubygems_version: 1.8.9
|
119
198
|
signing_key:
|
120
199
|
specification_version: 3
|
121
200
|
summary: TorqueBox Gem
|