torqbox 0.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +6 -0
- data/LICENSE +165 -0
- data/README.md +110 -0
- data/bin/torqbox +24 -0
- data/lib/rack/handler/torqbox.rb +30 -0
- data/lib/torqbox/cli.rb +67 -0
- data/lib/torqbox/server.rb +62 -0
- data/lib/torqbox/version.rb +20 -0
- data/lib/torqbox.rb +20 -0
- data/lib/wunderboss-all.jar +0 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5faf09617133477156fe3413dc221b39bb0641bd
|
4
|
+
data.tar.gz: 0fb9ef89948593d849f4c0fc151cd641898e49f6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0256aac1c3a4846c21b44f449f96c6b35e937d318a4c7e7ba84a9863512714f84d1fae498fb853f0fa09fa0456e21a0e598c73ac2eea8b2dc359f48b2a9eb78e
|
7
|
+
data.tar.gz: 9aead0c72a6d22375afec508104119637e0c3992803bafdf9755a43ad6735672ed3027fde64f3f88e76ec5d67df98dd4b1dab61c53dbe218c96c69e745c683b5
|
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/README.md
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
# TorqBox
|
2
|
+
|
3
|
+
This is a prototype for the next-generation TorqueBox. We're assigning
|
4
|
+
the codename 'TorqBox' to this effort because we need some way to
|
5
|
+
differentiate it from TorqueBox itself until this prototype matures
|
6
|
+
enough to replace TorqueBox.
|
7
|
+
|
8
|
+
Why 'TorqBox'? Mainly because we wanted a new Ruby gem name to release
|
9
|
+
under that's not 'torquebox' and it's close enough to TorqueBox that
|
10
|
+
the connection is obvious. Plus, search engines should still redirect
|
11
|
+
users to the right place for help. Once TorqBox graduates out of a
|
12
|
+
prototype, we'll remove the codename and release it under the regular
|
13
|
+
'torquebox' gem.
|
14
|
+
|
15
|
+
|
16
|
+
## Running TorqBox
|
17
|
+
|
18
|
+
### Requirements
|
19
|
+
|
20
|
+
TorqBox requires JRuby 1.7.x running in Ruby 1.9 or 2.0 mode. The code
|
21
|
+
has only been tested on JRuby 1.7.6 and higher but should work on
|
22
|
+
earlier versions.
|
23
|
+
|
24
|
+
### Running directly
|
25
|
+
|
26
|
+
From inside your Rack application's root directory:
|
27
|
+
|
28
|
+
gem install torqbox
|
29
|
+
torqbox
|
30
|
+
|
31
|
+
### Rails
|
32
|
+
|
33
|
+
Ensure `torqbox` is in your `Gemfile`, then:
|
34
|
+
|
35
|
+
rails s torqbox
|
36
|
+
|
37
|
+
### Rack
|
38
|
+
|
39
|
+
rackup -s torqbox
|
40
|
+
|
41
|
+
|
42
|
+
## Motivation
|
43
|
+
|
44
|
+
We want a smaller, more modular TorqueBox that is easier to get
|
45
|
+
started with, embeddable, and lets users bring in additional
|
46
|
+
functionality as-needed. More details of our motivation and community
|
47
|
+
feedback are expressed in [an email thread][tb_future_thread] from the
|
48
|
+
torquebox-user mailing list.
|
49
|
+
|
50
|
+
## Technology
|
51
|
+
|
52
|
+
TorqBox runs on JRuby and sits on top of a new lightweight, pluggable,
|
53
|
+
polyglot server codenamed [WunderBoss][wunderboss] (at least for
|
54
|
+
now). All the new features of TorqBox will be implemented in
|
55
|
+
WunderBoss then exposed via a Ruby API in the TorqBox project. This
|
56
|
+
lets other projects, in other languages, reuse the same functionality
|
57
|
+
by creating small language-specific API wrappers.
|
58
|
+
|
59
|
+
The web portion of WunderBoss uses [JBoss Undertow][undertow], which
|
60
|
+
is also the same web server used in [WildFly][wildfly] (the successor
|
61
|
+
to JBoss Application Server).
|
62
|
+
|
63
|
+
We aim to reuse the same underlying components as WildFly where it
|
64
|
+
makes sense, and bring our own where it doesn't. Eventually, we hope
|
65
|
+
that TorqBox can run on top of WildFly in addition to running without
|
66
|
+
it, to give users an option between a full-blown Java application
|
67
|
+
server and a very lightweight, minimal server. The lightweight,
|
68
|
+
minimal server is what we'll focus on at first, since TorqueBox
|
69
|
+
already provides the full application server experience.
|
70
|
+
|
71
|
+
|
72
|
+
## Current Status
|
73
|
+
|
74
|
+
Right now `torqbox` just provides a basic, high-performance Rack
|
75
|
+
implementation. It should outperform anything else out there, but if
|
76
|
+
you find any cases where this is not true please [let us
|
77
|
+
know][community]. It is substantially faster than TorqueBox 3, which
|
78
|
+
is already one of the fastest servers. We'll work on publishing
|
79
|
+
benchmarks as time permits, and we encourage community users to do
|
80
|
+
their own performance tests.
|
81
|
+
|
82
|
+
## Roadmap
|
83
|
+
|
84
|
+
We're developing TorqBox while also maintaining TorqueBox, and we
|
85
|
+
expect it to take some time before the TorqBox prototype becomes
|
86
|
+
mature enough to be called a new major version of TorqueBox.
|
87
|
+
|
88
|
+
Our first goal is for TorqBox to become the best JRuby web server
|
89
|
+
option. To us this means high performance, support for newer web
|
90
|
+
technologies (WebSockets, Server Sent Events, SPDY, etc), lightweight,
|
91
|
+
and simple to use. It may mean something else to you, and if it does
|
92
|
+
please [let us know][community]. The basic Rack spec is implemented
|
93
|
+
right now, with the rack.hijack API coming soon.
|
94
|
+
|
95
|
+
What features from TorqueBox (or elsewhere) we tackle after web is up
|
96
|
+
to you. It could be messaging, caching, scheduled jobs, daemons, or
|
97
|
+
something completely different. Please [let us know][community] what
|
98
|
+
you'd like to see.
|
99
|
+
|
100
|
+
Long-term we do expect TorqBox to run on top of WildFly for users that
|
101
|
+
still want the full Java application server (or are trying to sneak
|
102
|
+
Ruby into a Java shop). But this will just be an option, not the
|
103
|
+
default.
|
104
|
+
|
105
|
+
|
106
|
+
[tb_future_thread]: http://markmail.org/thread/4ffelg3qklycwhfo
|
107
|
+
[community]: http://torquebox.org/community/
|
108
|
+
[wunderboss]: https://github.com/projectodd/wunderboss
|
109
|
+
[undertow]: http://undertow.io/
|
110
|
+
[wildfly]: http://wildfly.org/
|
data/bin/torqbox
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright 2008-2013 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'torqbox'
|
19
|
+
|
20
|
+
cli = TorqBox::CLI.new(ARGV)
|
21
|
+
cli.start
|
22
|
+
Signal.trap("INT") do
|
23
|
+
cli.stop
|
24
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'torqbox'
|
2
|
+
require 'rack/handler'
|
3
|
+
|
4
|
+
module Rack
|
5
|
+
module Handler
|
6
|
+
module TorqBox
|
7
|
+
|
8
|
+
def self.run(app, options={})
|
9
|
+
server = ::TorqBox::Server.new({ :host => options[:Host],
|
10
|
+
:port => options[:Port] })
|
11
|
+
yield server if block_given?
|
12
|
+
|
13
|
+
server.start(:rack_app => app)
|
14
|
+
Signal.trap("INT") do
|
15
|
+
server.stop
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.valid_options
|
20
|
+
defaults = TorqBox::Server::DEFAULT_OPTIONS
|
21
|
+
{
|
22
|
+
"Host=HOST" => "Hostname to listen on (default: #{defaults[:host]})",
|
23
|
+
"Port=PORT" => "Port to listen on (default: #{defaults[:port]})"
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
register :torqbox, TorqBox
|
29
|
+
end
|
30
|
+
end
|
data/lib/torqbox/cli.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Copyright 2008-2013 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'optparse'
|
19
|
+
|
20
|
+
module TorqBox
|
21
|
+
class CLI
|
22
|
+
attr_reader :server
|
23
|
+
|
24
|
+
def initialize(argv)
|
25
|
+
@boot_options = {}
|
26
|
+
@app_options = {}
|
27
|
+
OptionParser.new do |opts|
|
28
|
+
opts.banner = 'Usage: torqbox [options] [rackup file]'
|
29
|
+
|
30
|
+
opts.on '-b', '--bind-address IP', 'IP or host to bind to' do |arg|
|
31
|
+
@boot_options[:host] = arg
|
32
|
+
end
|
33
|
+
opts.on '--dir DIR', 'Change directory before starting' do |arg|
|
34
|
+
@app_options[:root] = arg
|
35
|
+
end
|
36
|
+
opts.on '-p', '--port PORT', 'HTTP port to listen on' do |arg|
|
37
|
+
@boot_options[:port] = arg
|
38
|
+
end
|
39
|
+
opts.on '-q', '--quiet', 'Only write errors to the output' do
|
40
|
+
@boot_options[:log_level] = 'ERROR'
|
41
|
+
end
|
42
|
+
opts.on_tail('-h', '--help', 'Show this message') do
|
43
|
+
puts opts
|
44
|
+
exit 1
|
45
|
+
end
|
46
|
+
opts.on_tail('--version', 'Show version') do
|
47
|
+
puts "TorqBox #{TorqBox::VERSION}"
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
end.parse!(argv)
|
51
|
+
|
52
|
+
unless argv.empty?
|
53
|
+
@app_options[:rackup] = argv.shift
|
54
|
+
end
|
55
|
+
|
56
|
+
@server = ::TorqBox::Server.new(@boot_options)
|
57
|
+
end
|
58
|
+
|
59
|
+
def start
|
60
|
+
@server.start(@app_options)
|
61
|
+
end
|
62
|
+
|
63
|
+
def stop
|
64
|
+
@server.stop
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Copyright 2008-2013 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'wunderboss-all.jar'
|
19
|
+
|
20
|
+
module TorqBox
|
21
|
+
class Server
|
22
|
+
|
23
|
+
SERVER_DEFAULT_OPTIONS = {
|
24
|
+
:host => 'localhost',
|
25
|
+
:port => 8080,
|
26
|
+
:log_level => 'INFO'
|
27
|
+
}
|
28
|
+
APP_DEFAULT_OPTIONS = {
|
29
|
+
:context => '/',
|
30
|
+
:root => '.',
|
31
|
+
:rackup => 'config.ru',
|
32
|
+
:rack_app => nil
|
33
|
+
}
|
34
|
+
|
35
|
+
def initialize(options)
|
36
|
+
options = SERVER_DEFAULT_OPTIONS.merge(options)
|
37
|
+
@container = Java::OrgProjectoddWunderboss::WunderBoss.new
|
38
|
+
@container.log_level = options[:log_level]
|
39
|
+
@container.register_language('ruby', Java::OrgProjectoddWunderbossRuby::RubyLanguage.new)
|
40
|
+
@container.register_component('web', Java::OrgProjectoddWunderbossWeb::WebComponent.new)
|
41
|
+
@container.register_component('servlet', Java::OrgProjectoddWunderbossWeb::ServletComponent.new)
|
42
|
+
@container.register_component('rack', Java::OrgProjectoddWunderbossRubyRack::RackComponent.new)
|
43
|
+
@container.configure('web', 'host' => options[:host], 'port' => options[:port].to_s)
|
44
|
+
@logger = @container.get_logger('TorqBox::Server')
|
45
|
+
end
|
46
|
+
|
47
|
+
def start(options)
|
48
|
+
options = APP_DEFAULT_OPTIONS.merge(options)
|
49
|
+
@logger.info("TorqBox #{::TorqBox::VERSION} starting...")
|
50
|
+
app = @container.new_application('ruby')
|
51
|
+
app.start('rack', 'context' => options[:context],
|
52
|
+
'root' => options[:root],
|
53
|
+
'rackup' => options[:rackup],
|
54
|
+
'rack_app' => options[:rack_app])
|
55
|
+
end
|
56
|
+
|
57
|
+
def stop
|
58
|
+
@logger.info("Stopping TorqBox...")
|
59
|
+
@container.stop
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2008-2013 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
module TorqBox
|
19
|
+
VERSION = '0.1.0'
|
20
|
+
end
|
data/lib/torqbox.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2008-2013 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'torqbox/cli'
|
19
|
+
require 'torqbox/server'
|
20
|
+
require 'torqbox/version'
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: torqbox
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- The TorqueBox Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rack
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.4.0
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 1.4.0
|
28
|
+
- - <
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '2.0'
|
31
|
+
prerelease: false
|
32
|
+
type: :runtime
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
prerelease: false
|
46
|
+
type: :development
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.14'
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '2.14'
|
59
|
+
prerelease: false
|
60
|
+
type: :development
|
61
|
+
description:
|
62
|
+
email: torquebox-dev@torquebox.org
|
63
|
+
executables:
|
64
|
+
- torqbox
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- CHANGELOG.md
|
69
|
+
- README.md
|
70
|
+
- LICENSE
|
71
|
+
- bin/torqbox
|
72
|
+
- lib/wunderboss-all.jar
|
73
|
+
- lib/torqbox.rb
|
74
|
+
- lib/rack/handler/torqbox.rb
|
75
|
+
- lib/torqbox/cli.rb
|
76
|
+
- lib/torqbox/server.rb
|
77
|
+
- lib/torqbox/version.rb
|
78
|
+
homepage: http://torquebox.org
|
79
|
+
licenses:
|
80
|
+
- LGPL3
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 1.9.3
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.1.9
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: Prototype of the next-generation TorqueBox
|
102
|
+
test_files: []
|