trinidad_hotdeploy_extension 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.1 (2010-10-06)
2
+
3
+ * Load the extension from the command line
4
+
1
5
  == 0.3.0 (2010-10-06)
2
6
 
3
7
  * Use the reload method that means the server doesn't lose requests while starting up again. Thanks to David Yang to point me to the properly method.
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, you need to add it into the extensions section of a web application in the Trinidad's configuration file.
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
- You can find further information on how to write your own extension in the wiki: http://wiki.github.com/calavera/trinidad/extensions
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
- class HotdeployWebAppExtension < WebAppExtension
6
- VERSION = '0.3.0'
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
@@ -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.0'
16
+ s.version = '0.3.1'
17
17
  s.date = '2010-10-06'
18
18
  s.rubyforge_project = 'trinidad_hotdeploy_extension'
19
19
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Calavera