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.
@@ -1,3 +1,7 @@
1
+ == 0.4.0 (2010-11-04)
2
+
3
+ * Warbler support
4
+
1
5
  == 0.3.1 (2010-10-06)
2
6
 
3
7
  * Load the extension from the command line
data/README CHANGED
@@ -9,7 +9,7 @@ Extension to allow Trinidad to redeploy an application each time a file, for ins
9
9
 
10
10
  # INSTALL
11
11
 
12
- $ jruby -S gem install trinidad_hotdeploy_extensions
12
+ $ jruby -S gem install trinidad_hotdeploy_extension
13
13
 
14
14
  # CONFIGURE
15
15
 
@@ -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.3.1'
6
+ VERSION = '0.4.0'
7
7
  end
8
8
 
9
9
  class HotdeployWebAppExtension < WebAppExtension
10
10
  def configure(tomcat, app_context)
11
- @options[:monitor] ||= File.join(app_context.doc_base, 'tmp/restart.txt')
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, monitor, delay)
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
@@ -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.3.1'
17
- s.date = '2010-10-06'
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.9.1')
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
- - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
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-10-06 00:00:00 +02:00
17
+ date: 2010-11-04 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: trinidad
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 9
31
- - 1
32
- version: 0.9.1
33
- type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- version: "0"
46
- type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: mocha
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
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
- - !ruby/object:Gem::Version
96
- segments:
97
- - 0
98
- version: "0"
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
- - !ruby/object:Gem::Version
104
- segments:
105
- - 0
106
- version: "0"
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.7
105
+ rubygems_version: 1.3.6
111
106
  signing_key:
112
107
  specification_version: 2
113
108
  summary: Hot deployer for Trinidad