trinidad_hotdeploy_extension 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
data/History.txt
CHANGED
data/README
CHANGED
@@ -3,19 +3,26 @@ module Trinidad
|
|
3
3
|
require File.expand_path('../../trinidad-libs/trinidad-hotdeploy-extension.jar', __FILE__)
|
4
4
|
|
5
5
|
module Hotdeploy
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.4.0'
|
7
7
|
end
|
8
8
|
|
9
9
|
class HotdeployWebAppExtension < WebAppExtension
|
10
10
|
def configure(tomcat, app_context)
|
11
|
-
|
12
|
-
monitor = File.expand_path(@options[:monitor])
|
11
|
+
monitor_file = File.expand_path(monitor(app_context))
|
13
12
|
delay = @options[:delay] || 1000
|
14
13
|
|
15
|
-
listener = org.jruby.trinidad.HotDeployLifecycleListener.new(app_context,
|
14
|
+
listener = org.jruby.trinidad.HotDeployLifecycleListener.new(app_context, monitor_file, delay)
|
16
15
|
app_context.addLifecycleListener(listener)
|
17
16
|
listener
|
18
17
|
end
|
18
|
+
|
19
|
+
def monitor(app_context)
|
20
|
+
@options[:monitor] ||= begin
|
21
|
+
doc_base = app_context.doc_base
|
22
|
+
doc_base = File.join(doc_base, 'tmp/restart.txt') if !(doc_base =~ /\.war$/)
|
23
|
+
doc_base
|
24
|
+
end
|
25
|
+
end
|
19
26
|
end
|
20
27
|
|
21
28
|
class HotdeployOptionsExtension < OptionsExtension
|
@@ -43,6 +43,12 @@ describe Trinidad::Extensions::HotdeployWebAppExtension do
|
|
43
43
|
listener = ext.configure(@tomcat, @context)
|
44
44
|
listener.delay.should == 30000
|
45
45
|
end
|
46
|
+
|
47
|
+
it "uses the doc_base path if the context it's a war file" do
|
48
|
+
@context.doc_base = 'foo.war'
|
49
|
+
listener = subject.configure(@tomcat, @context)
|
50
|
+
listener.monitor.should =~ /foo\.war$/
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
describe Trinidad::Extensions::HotdeployOptionsExtension do
|
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_hotdeploy_extension'
|
16
|
-
s.version = '0.
|
17
|
-
s.date = '2010-
|
16
|
+
s.version = '0.4.0'
|
17
|
+
s.date = '2010-11-04'
|
18
18
|
s.rubyforge_project = 'trinidad_hotdeploy_extension'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -40,7 +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', '>=0.
|
43
|
+
s.add_dependency('trinidad', '>=1.0.0')
|
44
44
|
|
45
45
|
## List your development dependencies here. Development dependencies are
|
46
46
|
## those that are only needed during development
|
metadata
CHANGED
@@ -3,61 +3,58 @@ name: trinidad_hotdeploy_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-04 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
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
version: "0"
|
59
|
-
type: :development
|
60
|
-
version_requirements: *id003
|
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
|
+
- 0
|
31
|
+
version: 1.0.0
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rspec
|
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: :development
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mocha
|
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: :development
|
57
|
+
version_requirements: *id003
|
61
58
|
description: Perform hot deploys on Trinidad ala Passenger
|
62
59
|
email: calavera@apache.org
|
63
60
|
executables: []
|
@@ -65,49 +62,47 @@ executables: []
|
|
65
62
|
extensions: []
|
66
63
|
|
67
64
|
extra_rdoc_files:
|
68
|
-
- README
|
69
|
-
- LICENSE
|
65
|
+
- README
|
66
|
+
- LICENSE
|
70
67
|
files:
|
71
|
-
- History.txt
|
72
|
-
- LICENSE
|
73
|
-
- README
|
74
|
-
- Rakefile
|
75
|
-
- lib/trinidad_hotdeploy_extension.rb
|
76
|
-
- rakelib/build.rake
|
77
|
-
- spec/spec.opts
|
78
|
-
- spec/spec_helper.rb
|
79
|
-
- spec/trinidad_hotdeploy_extension_spec.rb
|
80
|
-
- trinidad_hotdeploy_extension.gemspec
|
81
|
-
- trinidad-libs/trinidad-hotdeploy-extension.jar
|
68
|
+
- History.txt
|
69
|
+
- LICENSE
|
70
|
+
- README
|
71
|
+
- Rakefile
|
72
|
+
- lib/trinidad_hotdeploy_extension.rb
|
73
|
+
- rakelib/build.rake
|
74
|
+
- spec/spec.opts
|
75
|
+
- spec/spec_helper.rb
|
76
|
+
- spec/trinidad_hotdeploy_extension_spec.rb
|
77
|
+
- trinidad_hotdeploy_extension.gemspec
|
78
|
+
- trinidad-libs/trinidad-hotdeploy-extension.jar
|
82
79
|
has_rdoc: true
|
83
80
|
homepage: http://github.com/calavera/trinidad_hotdeploy_extension
|
84
81
|
licenses: []
|
85
82
|
|
86
83
|
post_install_message:
|
87
84
|
rdoc_options:
|
88
|
-
- --charset=UTF-8
|
85
|
+
- --charset=UTF-8
|
89
86
|
require_paths:
|
90
|
-
- lib
|
87
|
+
- lib
|
91
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
89
|
requirements:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
version: "0"
|
99
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
96
|
requirements:
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
107
102
|
requirements: []
|
108
103
|
|
109
104
|
rubyforge_project: trinidad_hotdeploy_extension
|
110
|
-
rubygems_version: 1.3.
|
105
|
+
rubygems_version: 1.3.6
|
111
106
|
signing_key:
|
112
107
|
specification_version: 2
|
113
108
|
summary: Hot deployer for Trinidad
|