torquebox 3.0.0.beta1 → 3.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/torquebox +12 -1
- metadata +22 -22
data/bin/torquebox
CHANGED
@@ -26,9 +26,11 @@ require 'torquebox/rails'
|
|
26
26
|
|
27
27
|
class TorqueBoxCommand < Thor
|
28
28
|
|
29
|
+
class_option 'help', :type => :boolean, :desc => 'Display help'
|
30
|
+
|
29
31
|
map "run" => "start"
|
30
32
|
desc "run", "Run TorqueBox (binds to localhost, use -b to override)"
|
31
|
-
method_option
|
33
|
+
method_option 'clustered', :type => :boolean, :desc => "Run TorqueBox in clustered mode"
|
32
34
|
method_option 'data-directory', :type => :string, :desc => 'Override the directory TorqueBox uses to store it runtime data'
|
33
35
|
method_option 'extra', :aliases => '-e', :type => :string, :desc => 'Extra options to pass through to JBoss AS, you will need to escape dashes with \ (e.g. \--help)'
|
34
36
|
method_option 'max-threads', :type => :numeric, :desc => "Maximum number of HTTP threads"
|
@@ -38,6 +40,7 @@ class TorqueBoxCommand < Thor
|
|
38
40
|
method_option 'port-offset', :type => :numeric, :desc => 'Offset all port numbers listened on by TorqueBox by this number'
|
39
41
|
method_option 'jvm-options', :aliases => '-J', :type => :string, :desc => 'Pass options on to the JVM'
|
40
42
|
def start
|
43
|
+
help(__method__) and return if options.help
|
41
44
|
TorqueBox::Server.setup_environment
|
42
45
|
TorqueBox::DeployUtils.run_server(:clustered => options.clustered,
|
43
46
|
:max_threads => options['max-threads'],
|
@@ -52,6 +55,7 @@ class TorqueBoxCommand < Thor
|
|
52
55
|
|
53
56
|
desc "rails ROOT", "Create a Rails application at ROOT using the TorqueBox Rails template, or apply the TorqueBox template to an existing application at ROOT."
|
54
57
|
def rails(root = ".", *args)
|
58
|
+
help(__method__) and return if options.help
|
55
59
|
ARGV.shift
|
56
60
|
# Ensure the root defaults to the current directory if the user
|
57
61
|
# doesn't specify one but passes in additional args
|
@@ -79,6 +83,7 @@ class TorqueBoxCommand < Thor
|
|
79
83
|
`torquebox deploy myapp.knob`.
|
80
84
|
EOS
|
81
85
|
def archive(root = Dir.pwd)
|
86
|
+
help(__method__) and return if options.help
|
82
87
|
root = Dir.pwd if (root == '.')
|
83
88
|
TorqueBox::Server.setup_environment
|
84
89
|
archive_name = TorqueBox::DeployUtils.archive_name( root )
|
@@ -105,6 +110,7 @@ class TorqueBoxCommand < Thor
|
|
105
110
|
method_option :env, :type => :string, :desc => "Application Environment (ex: development, test, production)"
|
106
111
|
method_option :name, :type => :string, :desc => "The desired name of the deployment artifact (ex: foo)"
|
107
112
|
def deploy(root = ".")
|
113
|
+
help(__method__) and return if options.help
|
108
114
|
TorqueBox::Server.setup_environment
|
109
115
|
root = File.expand_path(root)
|
110
116
|
opts = {:root => root}.merge(options)
|
@@ -122,6 +128,7 @@ class TorqueBoxCommand < Thor
|
|
122
128
|
desc "undeploy ROOT", "Undeploy an application from TorqueBox"
|
123
129
|
method_option :name, :type => :string, :desc => "The name of the artifact to undeploy (ex: foo)"
|
124
130
|
def undeploy(root = ".")
|
131
|
+
help(__method__) and return if options.help
|
125
132
|
TorqueBox::Server.setup_environment
|
126
133
|
root = File.expand_path(root)
|
127
134
|
opts = {:root => root}.merge(options)
|
@@ -140,6 +147,7 @@ class TorqueBoxCommand < Thor
|
|
140
147
|
|
141
148
|
desc "list", "List applications deployed to TorqueBox and their deployment status"
|
142
149
|
def list(root = ".")
|
150
|
+
help(__method__) and return if options.help
|
143
151
|
TorqueBox::Server.setup_environment
|
144
152
|
apps = TorqueBox::DeployUtils.deployment_status
|
145
153
|
puts "Nothing deployed." if apps.empty?
|
@@ -152,6 +160,7 @@ class TorqueBoxCommand < Thor
|
|
152
160
|
|
153
161
|
desc "cli", "Run the JBoss AS7 CLI"
|
154
162
|
def cli
|
163
|
+
help(__method__) and return if options.help
|
155
164
|
TorqueBox::Server.setup_environment
|
156
165
|
options = "--connect"
|
157
166
|
if RbConfig::CONFIG['host_os'] =~ /mswin/
|
@@ -165,6 +174,7 @@ class TorqueBoxCommand < Thor
|
|
165
174
|
|
166
175
|
desc "env [VARIABLE]", "Display TorqueBox environment variables"
|
167
176
|
def env(variable=nil)
|
177
|
+
help(__method__) and return if options.help
|
168
178
|
TorqueBox::Server.setup_environment
|
169
179
|
env_keys = %w(TORQUEBOX_HOME JBOSS_HOME JRUBY_HOME)
|
170
180
|
if variable.nil?
|
@@ -179,6 +189,7 @@ class TorqueBoxCommand < Thor
|
|
179
189
|
desc "exec [KNOB_FILE] [COMMAND]", "Execute a command within the context of a TorqueBox application"
|
180
190
|
method_option :no_bundle, :aliases => '-nb', :type => :boolean, :desc => "Run without `bundle exec`"
|
181
191
|
def tb_exec(knob_file, command)
|
192
|
+
help(__method__) and return if options.help
|
182
193
|
TorqueBox::Server.setup_environment
|
183
194
|
jruby_path = File.join(ENV['JRUBY_HOME'], "bin")
|
184
195
|
knob_path = File.expand_path(knob_file)
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: torquebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 3.0.0.
|
5
|
+
version: 3.0.0.beta2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- The TorqueBox Team
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07
|
12
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: torquebox-core
|
@@ -17,13 +17,13 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 3.0.0.
|
20
|
+
version: 3.0.0.beta2
|
21
21
|
none: false
|
22
22
|
requirement: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.0.
|
26
|
+
version: 3.0.0.beta2
|
27
27
|
none: false
|
28
28
|
prerelease: false
|
29
29
|
type: :runtime
|
@@ -33,13 +33,13 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 3.0.0.
|
36
|
+
version: 3.0.0.beta2
|
37
37
|
none: false
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 3.0.0.
|
42
|
+
version: 3.0.0.beta2
|
43
43
|
none: false
|
44
44
|
prerelease: false
|
45
45
|
type: :runtime
|
@@ -49,13 +49,13 @@ dependencies:
|
|
49
49
|
requirements:
|
50
50
|
- - '='
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.0.0.
|
52
|
+
version: 3.0.0.beta2
|
53
53
|
none: false
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - '='
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 3.0.0.
|
58
|
+
version: 3.0.0.beta2
|
59
59
|
none: false
|
60
60
|
prerelease: false
|
61
61
|
type: :runtime
|
@@ -65,13 +65,13 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.0.0.
|
68
|
+
version: 3.0.0.beta2
|
69
69
|
none: false
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - '='
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 3.0.0.
|
74
|
+
version: 3.0.0.beta2
|
75
75
|
none: false
|
76
76
|
prerelease: false
|
77
77
|
type: :runtime
|
@@ -81,13 +81,13 @@ dependencies:
|
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 3.0.0.
|
84
|
+
version: 3.0.0.beta2
|
85
85
|
none: false
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - '='
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 3.0.0.
|
90
|
+
version: 3.0.0.beta2
|
91
91
|
none: false
|
92
92
|
prerelease: false
|
93
93
|
type: :runtime
|
@@ -97,13 +97,13 @@ dependencies:
|
|
97
97
|
requirements:
|
98
98
|
- - '='
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: 3.0.0.
|
100
|
+
version: 3.0.0.beta2
|
101
101
|
none: false
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
104
|
- - '='
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: 3.0.0.
|
106
|
+
version: 3.0.0.beta2
|
107
107
|
none: false
|
108
108
|
prerelease: false
|
109
109
|
type: :runtime
|
@@ -113,13 +113,13 @@ dependencies:
|
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 3.0.0.
|
116
|
+
version: 3.0.0.beta2
|
117
117
|
none: false
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 3.0.0.
|
122
|
+
version: 3.0.0.beta2
|
123
123
|
none: false
|
124
124
|
prerelease: false
|
125
125
|
type: :runtime
|
@@ -129,13 +129,13 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - '='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 3.0.0.
|
132
|
+
version: 3.0.0.beta2
|
133
133
|
none: false
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.0.0.
|
138
|
+
version: 3.0.0.beta2
|
139
139
|
none: false
|
140
140
|
prerelease: false
|
141
141
|
type: :runtime
|
@@ -145,13 +145,13 @@ dependencies:
|
|
145
145
|
requirements:
|
146
146
|
- - '='
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: 3.0.0.
|
148
|
+
version: 3.0.0.beta2
|
149
149
|
none: false
|
150
150
|
requirement: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - '='
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 3.0.0.
|
154
|
+
version: 3.0.0.beta2
|
155
155
|
none: false
|
156
156
|
prerelease: false
|
157
157
|
type: :runtime
|
@@ -161,13 +161,13 @@ dependencies:
|
|
161
161
|
requirements:
|
162
162
|
- - '='
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 3.0.0.
|
164
|
+
version: 3.0.0.beta2
|
165
165
|
none: false
|
166
166
|
requirement: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - '='
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: 3.0.0.
|
170
|
+
version: 3.0.0.beta2
|
171
171
|
none: false
|
172
172
|
prerelease: false
|
173
173
|
type: :runtime
|