trinidad_sandbox_extension 0.4.0 → 0.4.1
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 +4 -0
- data/lib/trinidad_sandbox_extension.rb +1 -1
- data/lib/trinidad_sandbox_extension/app/model/application_context.rb +2 -1
- data/lib/trinidad_sandbox_extension/app/public/css/main.css +4 -0
- data/lib/trinidad_sandbox_extension/app/sandbox.rb +2 -12
- data/lib/trinidad_sandbox_extension/app/views/actions.html.haml +2 -0
- data/lib/trinidad_sandbox_extension/config.ru +0 -15
- data/trinidad-libs/trinidad-sandbox-extension.jar +0 -0
- data/trinidad_sandbox_extension.gemspec +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -11,7 +11,8 @@ module Trinidad
|
|
11
11
|
def self.all
|
12
12
|
apps = host ? host.find_children : []
|
13
13
|
apps.select {|app| app.name != sandbox_context.name }.
|
14
|
-
map {|app| ApplicationContext.new(app) }
|
14
|
+
map {|app| ApplicationContext.new(app) }.
|
15
|
+
sort {|app1, app2| app1.slug <=> app2.slug }
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.find(name)
|
@@ -12,7 +12,7 @@ set :views, File.expand_path('../views', __FILE__)
|
|
12
12
|
|
13
13
|
Sinatra::Application.register Sinatra::RespondTo
|
14
14
|
|
15
|
-
helpers {
|
15
|
+
helpers {
|
16
16
|
include Trinidad::Sandbox::Helpers::Auth
|
17
17
|
include Trinidad::Sandbox::Helpers::Context
|
18
18
|
}
|
@@ -83,18 +83,8 @@ end
|
|
83
83
|
|
84
84
|
post '/apps/:name/redeploy' do
|
85
85
|
context = Trinidad::Sandbox::ApplicationContext.find(params[:name])
|
86
|
-
|
87
|
-
context_not_found(params[:name]) unless context
|
88
86
|
|
89
|
-
|
90
|
-
if web_app_dir.nil?
|
91
|
-
flash[:warning] = "No web_app_dir param provided. Can not redeploy."
|
92
|
-
$servlet_context.log "No web_app_dir param provided. Can not redeploy."
|
93
|
-
respond_to do |wants|
|
94
|
-
wants.html { redirect sandbox_context.path }
|
95
|
-
wants.xml { status 404 }
|
96
|
-
end
|
97
|
-
end
|
87
|
+
context_not_found(params[:name]) unless context
|
98
88
|
|
99
89
|
context.reload
|
100
90
|
|
@@ -2,6 +2,8 @@
|
|
2
2
|
- if app.available
|
3
3
|
%form(method="post" action="#{app.self_path}/stop")
|
4
4
|
%button(type="submit") Stop
|
5
|
+
%form(method="post" action="#{app.self_path}/redeploy")
|
6
|
+
%button(type="submit") Redeploy
|
5
7
|
- else
|
6
8
|
%form(method="post" action="#{app.self_path}/start")
|
7
9
|
%button(type="submit") Start
|
@@ -12,18 +12,3 @@ set :app_file, app_path
|
|
12
12
|
disable :run
|
13
13
|
|
14
14
|
run Sinatra::Application
|
15
|
-
|
16
|
-
#gem 'trinidad_jars'
|
17
|
-
#require 'trinidad/jars'
|
18
|
-
#require 'trinidad_sandbox_extension'
|
19
|
-
#require 'trinidad_sandbox_extension/sandbox_app'
|
20
|
-
|
21
|
-
#class Sinatra::Reloader < ::Rack::Reloader
|
22
|
-
# def safe_load(file, mtime, stderr)
|
23
|
-
# Sinatra::Application.reset!
|
24
|
-
# super
|
25
|
-
# end
|
26
|
-
#end
|
27
|
-
#use Sinatra::Reloader
|
28
|
-
|
29
|
-
#run Trinidad::Sandbox::App
|
Binary file
|
@@ -13,7 +13,7 @@ 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.4.
|
16
|
+
s.version = '0.4.1'
|
17
17
|
s.date = '2010-11-05'
|
18
18
|
s.rubyforge_project = 'trinidad_sandbox_extension'
|
19
19
|
|