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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.4.1 (2010-11-05)
2
+
3
+ * Add redeploy button
4
+
1
5
  == 0.4.0 (2010-11-05)
2
6
 
3
7
  * Fix compatibility problems with Trinidad 1.0
@@ -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.4.0'
9
+ VERSION = '0.4.1'
10
10
 
11
11
  def configure(tomcat)
12
12
  opts = prepare_options
@@ -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)
@@ -126,6 +126,10 @@ h2 {
126
126
  top: 1.5em;
127
127
  }
128
128
 
129
+ .actions form {
130
+ display: inline;
131
+ }
132
+
129
133
  .application {
130
134
  border-top: 1px solid silver;
131
135
  border-bottom: 1px solid silver;
@@ -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
- web_app_dir = params[:web_app_dir]
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
@@ -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.0'
16
+ s.version = '0.4.1'
17
17
  s.date = '2010-11-05'
18
18
  s.rubyforge_project = 'trinidad_sandbox_extension'
19
19
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 0
9
- version: 0.4.0
8
+ - 1
9
+ version: 0.4.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Calavera