trinidad_hotdeploy_extension 0.3.0 → 0.3.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
data/README
CHANGED
@@ -13,7 +13,7 @@ Extension to allow Trinidad to redeploy an application each time a file, for ins
|
|
13
13
|
|
14
14
|
# CONFIGURE
|
15
15
|
|
16
|
-
To configure it,
|
16
|
+
To configure it, we need to add it into the extensions section of a web application in the Trinidad's configuration file.
|
17
17
|
|
18
18
|
http://wiki.github.com/calavera/trinidad/advanced-configuration
|
19
19
|
|
@@ -27,8 +27,12 @@ It also allows to configure the name of the file to monitorize and the period of
|
|
27
27
|
monitor: tmp/restart.txt # this parameter is optional, the default value is tmp/restart.txt
|
28
28
|
delay: 30000 # in milliseconds, this parameter is optional, the default value is 1 second
|
29
29
|
|
30
|
+
This extension can also be loaded from the command line with its default parameters:
|
30
31
|
|
31
|
-
|
32
|
+
$ jruby -S trinidad --load hotdeploy
|
33
|
+
|
34
|
+
|
35
|
+
Further information on how to write your own extension can be found in the wiki: http://wiki.github.com/calavera/trinidad/extensions
|
32
36
|
|
33
37
|
# Copyright
|
34
38
|
|
@@ -2,9 +2,11 @@ module Trinidad
|
|
2
2
|
module Extensions
|
3
3
|
require File.expand_path('../../trinidad-libs/trinidad-hotdeploy-extension.jar', __FILE__)
|
4
4
|
|
5
|
-
|
6
|
-
VERSION = '0.3.
|
5
|
+
module Hotdeploy
|
6
|
+
VERSION = '0.3.1'
|
7
|
+
end
|
7
8
|
|
9
|
+
class HotdeployWebAppExtension < WebAppExtension
|
8
10
|
def configure(tomcat, app_context)
|
9
11
|
@options[:monitor] ||= File.join(app_context.doc_base, 'tmp/restart.txt')
|
10
12
|
monitor = File.expand_path(@options[:monitor])
|
@@ -15,5 +17,12 @@ module Trinidad
|
|
15
17
|
listener
|
16
18
|
end
|
17
19
|
end
|
20
|
+
|
21
|
+
class HotdeployOptionsExtension < OptionsExtension
|
22
|
+
def configure(parser, default_options)
|
23
|
+
default_options[:extensions] ||= {}
|
24
|
+
default_options[:extensions][:hotdeploy] = []
|
25
|
+
end
|
26
|
+
end
|
18
27
|
end
|
19
28
|
end
|
@@ -44,3 +44,14 @@ describe Trinidad::Extensions::HotdeployWebAppExtension do
|
|
44
44
|
listener.delay.should == 30000
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
describe Trinidad::Extensions::HotdeployOptionsExtension do
|
49
|
+
it "allows to specify a command line option to load the hotdeploy" do
|
50
|
+
parser = OptionParser.new
|
51
|
+
options = {}
|
52
|
+
|
53
|
+
subject.configure(parser, options)
|
54
|
+
|
55
|
+
options[:extensions].keys.should include(:hotdeploy)
|
56
|
+
end
|
57
|
+
end
|
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_hotdeploy_extension'
|
16
|
-
s.version = '0.3.
|
16
|
+
s.version = '0.3.1'
|
17
17
|
s.date = '2010-10-06'
|
18
18
|
s.rubyforge_project = 'trinidad_hotdeploy_extension'
|
19
19
|
|