trinidad_sandbox_extension 0.3.0 → 0.4.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/History.txt +6 -0
- data/lib/trinidad_sandbox_extension/app/model/application_context.rb +2 -1
- data/lib/trinidad_sandbox_extension/app/views/app.xml.haml +1 -1
- data/lib/trinidad_sandbox_extension.rb +4 -3
- data/spec/trinidad_sandbox_extension_spec.rb +7 -2
- data/trinidad-libs/trinidad-sandbox-extension.jar +0 -0
- data/trinidad_sandbox_extension.gemspec +3 -2
- metadata +141 -136
data/History.txt
CHANGED
@@ -36,7 +36,8 @@ module Trinidad
|
|
36
36
|
def actions
|
37
37
|
[
|
38
38
|
{:rel => 'start', :href => "#{self_path}/start"},
|
39
|
-
{:rel => 'stop', :href => "#{self_path}/stop"}
|
39
|
+
{:rel => 'stop', :href => "#{self_path}/stop"},
|
40
|
+
{:rel => 'redeploy', :href => "#{self_path}/redeploy"}
|
40
41
|
]
|
41
42
|
end
|
42
43
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
%name= app.name
|
3
3
|
%available= app.available
|
4
4
|
- app.actions.each do |action|
|
5
|
-
%link(rel = "#{action[:rel]}" href = "#{action[:href]}")
|
5
|
+
%link(rel = "#{action[:rel]}" href = "#{action[:href]}.xml")
|
6
6
|
- if app.parameters
|
7
7
|
%context-parameters
|
8
8
|
- app.parameters.each do |param_name|
|
@@ -6,7 +6,7 @@ require File.expand_path('../../trinidad-libs/trinidad-sandbox-extension', __FIL
|
|
6
6
|
module Trinidad
|
7
7
|
module Extensions
|
8
8
|
class SandboxServerExtension < ServerExtension
|
9
|
-
VERSION = '0.
|
9
|
+
VERSION = '0.4.0'
|
10
10
|
|
11
11
|
def configure(tomcat)
|
12
12
|
opts = prepare_options
|
@@ -16,7 +16,7 @@ module Trinidad
|
|
16
16
|
web_app = Trinidad::RackupWebApp.new({}, opts,
|
17
17
|
'org.jruby.trinidad.SandboxRackServlet', 'SandboxServlet')
|
18
18
|
|
19
|
-
app_context.add_lifecycle_listener(
|
19
|
+
app_context.add_lifecycle_listener(Trinidad::Lifecycle::Default.new(web_app))
|
20
20
|
web_app
|
21
21
|
end
|
22
22
|
|
@@ -27,7 +27,8 @@ module Trinidad
|
|
27
27
|
:jruby_max_runtimes => 2,
|
28
28
|
:libs_dir => 'libs',
|
29
29
|
:classes_dir => 'classes',
|
30
|
-
:public => 'app/public'
|
30
|
+
:public => 'app/public',
|
31
|
+
:environment => 'production'
|
31
32
|
}
|
32
33
|
|
33
34
|
opts.deep_merge!(@options)
|
@@ -34,7 +34,12 @@ describe Trinidad::Extensions::SandboxServerExtension do
|
|
34
34
|
|
35
35
|
it 'adds the sandbox servlet to the application context' do
|
36
36
|
app = subject.configure(@tomcat)
|
37
|
-
|
37
|
+
context = @tomcat.host.findChildren().first
|
38
|
+
listener = context.find_lifecycle_listeners.select do |l|
|
39
|
+
l.instance_of?(Trinidad::Lifecycle::Default)
|
40
|
+
end.first
|
41
|
+
listener.configure_defaults(context)
|
42
|
+
context.findChild('SandboxServlet').should_not be_nil
|
38
43
|
end
|
39
44
|
|
40
45
|
it 'adds provided credentials to the servlet context' do
|
@@ -47,6 +52,6 @@ describe Trinidad::Extensions::SandboxServerExtension do
|
|
47
52
|
app_ctx = ext.create_application_context(@tomcat, opts)
|
48
53
|
|
49
54
|
app_ctx.servlet_context.getAttribute('sandbox_username').should == 'foo'
|
50
|
-
app_ctx.servlet_context.getAttribute('sandbox_password').should == 'bar'
|
55
|
+
app_ctx.servlet_context.getAttribute('sandbox_password').should == 'bar'
|
51
56
|
end
|
52
57
|
end
|
Binary file
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'trinidad_sandbox_extension'
|
16
|
-
s.version = '0.
|
17
|
-
s.date = '2010-
|
16
|
+
s.version = '0.4.0'
|
17
|
+
s.date = '2010-11-05'
|
18
18
|
s.rubyforge_project = 'trinidad_sandbox_extension'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -40,6 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
|
41
41
|
## List your runtime dependencies here. Runtime dependencies are those
|
42
42
|
## that are needed for an end user to actually USE your code.
|
43
|
+
s.add_dependency('trinidad', '>=1.0.1')
|
43
44
|
['sinatra', 'sinatra-authorization', 'sinatra-respond_to', 'sinatra-flash', 'haml'].each do |dep|
|
44
45
|
s.add_dependency(dep)
|
45
46
|
end
|
metadata
CHANGED
@@ -3,111 +3,118 @@ name: trinidad_sandbox_extension
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
|
-
- David Calavera
|
12
|
+
- David Calavera
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-11-05 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
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
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: trinidad
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 0
|
30
|
+
- 1
|
31
|
+
version: 1.0.1
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: sinatra
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: sinatra-authorization
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
version: "0"
|
56
|
+
type: :runtime
|
57
|
+
version_requirements: *id003
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: sinatra-respond_to
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id004
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: sinatra-flash
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id005
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: haml
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
type: :runtime
|
93
|
+
version_requirements: *id006
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
|
+
type: :development
|
105
|
+
version_requirements: *id007
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: mocha
|
108
|
+
prerelease: false
|
109
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
116
|
+
type: :development
|
117
|
+
version_requirements: *id008
|
111
118
|
description: Sandox console for Trinidad. It allows to manage the applications deployed on Trinidad.
|
112
119
|
email: calavera@apache.org
|
113
120
|
executables: []
|
@@ -115,61 +122,59 @@ executables: []
|
|
115
122
|
extensions: []
|
116
123
|
|
117
124
|
extra_rdoc_files:
|
118
|
-
- README
|
119
|
-
- LICENSE
|
125
|
+
- README
|
126
|
+
- LICENSE
|
120
127
|
files:
|
121
|
-
- History.txt
|
122
|
-
- LICENSE
|
123
|
-
- README
|
124
|
-
- Rakefile
|
125
|
-
- lib/trinidad_sandbox_extension.rb
|
126
|
-
- lib/trinidad_sandbox_extension/app/helpers/sandbox.rb
|
127
|
-
- lib/trinidad_sandbox_extension/app/model/application_context.rb
|
128
|
-
- lib/trinidad_sandbox_extension/app/public/css/main.css
|
129
|
-
- lib/trinidad_sandbox_extension/app/sandbox.rb
|
130
|
-
- lib/trinidad_sandbox_extension/app/views/actions.html.haml
|
131
|
-
- lib/trinidad_sandbox_extension/app/views/app.html.haml
|
132
|
-
- lib/trinidad_sandbox_extension/app/views/app.xml.haml
|
133
|
-
- lib/trinidad_sandbox_extension/app/views/index.html.haml
|
134
|
-
- lib/trinidad_sandbox_extension/app/views/index.xml.haml
|
135
|
-
- lib/trinidad_sandbox_extension/app/views/layout.html.haml
|
136
|
-
- lib/trinidad_sandbox_extension/config.ru
|
137
|
-
- spec/spec.opts
|
138
|
-
- spec/spec_helper.rb
|
139
|
-
- spec/trinidad_sandbox_extension_spec.rb
|
140
|
-
- trinidad_sandbox_extension.gemspec
|
141
|
-
- trinidad-libs/trinidad-sandbox-extension.jar
|
128
|
+
- History.txt
|
129
|
+
- LICENSE
|
130
|
+
- README
|
131
|
+
- Rakefile
|
132
|
+
- lib/trinidad_sandbox_extension.rb
|
133
|
+
- lib/trinidad_sandbox_extension/app/helpers/sandbox.rb
|
134
|
+
- lib/trinidad_sandbox_extension/app/model/application_context.rb
|
135
|
+
- lib/trinidad_sandbox_extension/app/public/css/main.css
|
136
|
+
- lib/trinidad_sandbox_extension/app/sandbox.rb
|
137
|
+
- lib/trinidad_sandbox_extension/app/views/actions.html.haml
|
138
|
+
- lib/trinidad_sandbox_extension/app/views/app.html.haml
|
139
|
+
- lib/trinidad_sandbox_extension/app/views/app.xml.haml
|
140
|
+
- lib/trinidad_sandbox_extension/app/views/index.html.haml
|
141
|
+
- lib/trinidad_sandbox_extension/app/views/index.xml.haml
|
142
|
+
- lib/trinidad_sandbox_extension/app/views/layout.html.haml
|
143
|
+
- lib/trinidad_sandbox_extension/config.ru
|
144
|
+
- spec/spec.opts
|
145
|
+
- spec/spec_helper.rb
|
146
|
+
- spec/trinidad_sandbox_extension_spec.rb
|
147
|
+
- trinidad_sandbox_extension.gemspec
|
148
|
+
- trinidad-libs/trinidad-sandbox-extension.jar
|
142
149
|
has_rdoc: true
|
143
150
|
homepage: http://github.com/calavera/trinidad_sandbox_extension
|
144
151
|
licenses: []
|
145
152
|
|
146
153
|
post_install_message:
|
147
154
|
rdoc_options:
|
148
|
-
- --charset=UTF-8
|
155
|
+
- --charset=UTF-8
|
149
156
|
require_paths:
|
150
|
-
- lib
|
157
|
+
- lib
|
151
158
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
159
|
requirements:
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
segments:
|
163
|
+
- 0
|
164
|
+
version: "0"
|
159
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
-
none: false
|
161
166
|
requirements:
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
version: "0"
|
167
172
|
requirements: []
|
168
173
|
|
169
174
|
rubyforge_project: trinidad_sandbox_extension
|
170
|
-
rubygems_version: 1.3.
|
175
|
+
rubygems_version: 1.3.6
|
171
176
|
signing_key:
|
172
177
|
specification_version: 2
|
173
178
|
summary: Sandbox console for Trinidad
|
174
179
|
test_files:
|
175
|
-
- spec/trinidad_sandbox_extension_spec.rb
|
180
|
+
- spec/trinidad_sandbox_extension_spec.rb
|