jettywrapper 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ 1.3.2
2
+ Throw error on start if port already in use
3
+
1
4
  1.3.1
2
5
  It should use APP_ROOT constant throughout, not APP_ROOT environment variable.
3
6
 
@@ -274,9 +274,9 @@ class Jettywrapper
274
274
  logger.warn "Removing stale PID file at #{pid_path}"
275
275
  File.delete(pid_path)
276
276
  end
277
- if Jettywrapper.is_port_in_use?(self.port)
278
- raise("Port #{self.port} is already in use.")
279
- end
277
+ end
278
+ if Jettywrapper.is_port_in_use?(self.port)
279
+ raise("Port #{self.port} is already in use.")
280
280
  end
281
281
  Dir.chdir(@jetty_home) do
282
282
  process.start
@@ -1 +1 @@
1
- GEMVERSION = "1.3.1"
1
+ GEMVERSION = "1.3.2"
@@ -2,6 +2,7 @@ require 'spec_helper'
2
2
  require 'rubygems'
3
3
  require 'uri'
4
4
  require 'net/http'
5
+ require 'socket'
5
6
 
6
7
  module Hydra
7
8
  describe Jettywrapper do
@@ -79,6 +80,24 @@ module Hydra
79
80
  ts.stop
80
81
  end
81
82
 
83
+ it "raises an error if you try to start a jetty when the port is already in use" do
84
+ jetty_params = {
85
+ :jetty_home => File.expand_path("#{File.dirname(__FILE__)}/../../jetty"),
86
+ :jetty_port => TEST_JETTY_PORTS.first,
87
+ :startup_wait => 30
88
+ }
89
+ socket = TCPServer.new(TEST_JETTY_PORTS.first)
90
+ begin
91
+ ts = Jettywrapper.configure(jetty_params)
92
+ ts.stop
93
+ ts.pid_file?.should eql(false)
94
+ lambda{ ts.start }.should raise_exception
95
+ ts.stop
96
+ ensure
97
+ socket.close
98
+ end
99
+ end
100
+
82
101
  end
83
102
  end
84
103
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jettywrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Beer
@@ -17,13 +17,12 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-07-10 00:00:00 -05:00
21
- default_executable:
20
+ date: 2012-07-25 00:00:00 Z
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
24
- name: logger
23
+ type: :runtime
25
24
  prerelease: false
26
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ requirement: &id001 !ruby/object:Gem::Requirement
27
26
  none: false
28
27
  requirements:
29
28
  - - ">="
@@ -32,12 +31,12 @@ dependencies:
32
31
  segments:
33
32
  - 0
34
33
  version: "0"
35
- type: :runtime
36
- requirement: *id001
34
+ version_requirements: *id001
35
+ name: logger
37
36
  - !ruby/object:Gem::Dependency
38
- name: mediashelf-loggable
37
+ type: :runtime
39
38
  prerelease: false
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
42
  - - ">="
@@ -46,12 +45,12 @@ dependencies:
46
45
  segments:
47
46
  - 0
48
47
  version: "0"
49
- type: :runtime
50
- requirement: *id002
48
+ version_requirements: *id002
49
+ name: mediashelf-loggable
51
50
  - !ruby/object:Gem::Dependency
52
- name: childprocess
51
+ type: :runtime
53
52
  prerelease: false
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
+ requirement: &id003 !ruby/object:Gem::Requirement
55
54
  none: false
56
55
  requirements:
57
56
  - - ">="
@@ -60,12 +59,12 @@ dependencies:
60
59
  segments:
61
60
  - 0
62
61
  version: "0"
63
- type: :runtime
64
- requirement: *id003
62
+ version_requirements: *id003
63
+ name: childprocess
65
64
  - !ruby/object:Gem::Dependency
66
- name: i18n
65
+ type: :runtime
67
66
  prerelease: false
68
- version_requirements: &id004 !ruby/object:Gem::Requirement
67
+ requirement: &id004 !ruby/object:Gem::Requirement
69
68
  none: false
70
69
  requirements:
71
70
  - - ">="
@@ -74,12 +73,12 @@ dependencies:
74
73
  segments:
75
74
  - 0
76
75
  version: "0"
77
- type: :runtime
78
- requirement: *id004
76
+ version_requirements: *id004
77
+ name: i18n
79
78
  - !ruby/object:Gem::Dependency
80
- name: activesupport
79
+ type: :runtime
81
80
  prerelease: false
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
81
+ requirement: &id005 !ruby/object:Gem::Requirement
83
82
  none: false
84
83
  requirements:
85
84
  - - ">="
@@ -90,12 +89,12 @@ dependencies:
90
89
  - 0
91
90
  - 0
92
91
  version: 3.0.0
93
- type: :runtime
94
- requirement: *id005
92
+ version_requirements: *id005
93
+ name: activesupport
95
94
  - !ruby/object:Gem::Dependency
96
- name: rspec
95
+ type: :development
97
96
  prerelease: false
98
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
+ requirement: &id006 !ruby/object:Gem::Requirement
99
98
  none: false
100
99
  requirements:
101
100
  - - <
@@ -105,12 +104,12 @@ dependencies:
105
104
  - 2
106
105
  - 0
107
106
  version: "2.0"
108
- type: :development
109
- requirement: *id006
107
+ version_requirements: *id006
108
+ name: rspec
110
109
  - !ruby/object:Gem::Dependency
111
- name: mocha
110
+ type: :development
112
111
  prerelease: false
113
- version_requirements: &id007 !ruby/object:Gem::Requirement
112
+ requirement: &id007 !ruby/object:Gem::Requirement
114
113
  none: false
115
114
  requirements:
116
115
  - - ">="
@@ -119,12 +118,12 @@ dependencies:
119
118
  segments:
120
119
  - 0
121
120
  version: "0"
122
- type: :development
123
- requirement: *id007
121
+ version_requirements: *id007
122
+ name: mocha
124
123
  - !ruby/object:Gem::Dependency
125
- name: rake
124
+ type: :development
126
125
  prerelease: false
127
- version_requirements: &id008 !ruby/object:Gem::Requirement
126
+ requirement: &id008 !ruby/object:Gem::Requirement
128
127
  none: false
129
128
  requirements:
130
129
  - - ">="
@@ -133,12 +132,12 @@ dependencies:
133
132
  segments:
134
133
  - 0
135
134
  version: "0"
136
- type: :development
137
- requirement: *id008
135
+ version_requirements: *id008
136
+ name: rake
138
137
  - !ruby/object:Gem::Dependency
139
- name: yard
138
+ type: :development
140
139
  prerelease: false
141
- version_requirements: &id009 !ruby/object:Gem::Requirement
140
+ requirement: &id009 !ruby/object:Gem::Requirement
142
141
  none: false
143
142
  requirements:
144
143
  - - "="
@@ -149,12 +148,12 @@ dependencies:
149
148
  - 6
150
149
  - 5
151
150
  version: 0.6.5
152
- type: :development
153
- requirement: *id009
151
+ version_requirements: *id009
152
+ name: yard
154
153
  - !ruby/object:Gem::Dependency
155
- name: RedCloth
154
+ type: :development
156
155
  prerelease: false
157
- version_requirements: &id010 !ruby/object:Gem::Requirement
156
+ requirement: &id010 !ruby/object:Gem::Requirement
158
157
  none: false
159
158
  requirements:
160
159
  - - ">="
@@ -163,8 +162,8 @@ dependencies:
163
162
  segments:
164
163
  - 0
165
164
  version: "0"
166
- type: :development
167
- requirement: *id010
165
+ version_requirements: *id010
166
+ name: RedCloth
168
167
  description: Spin up a jetty instance (e.g., the one at https://github.com/projecthydra/hydra-jetty) and wrap test in it. This lets us run tests against a real copy of solr and fedora.
169
168
  email:
170
169
  - hydra-tech@googlegroups.com
@@ -192,7 +191,6 @@ files:
192
191
  - spec/lib/jettywrapper_spec.rb
193
192
  - spec/spec_helper.rb
194
193
  - tasks/jettywrapper.rake
195
- has_rdoc: true
196
194
  homepage: https://github.com/projecthydra/jettywrapper
197
195
  licenses: []
198
196
 
@@ -224,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
222
  requirements: []
225
223
 
226
224
  rubyforge_project:
227
- rubygems_version: 1.6.2
225
+ rubygems_version: 1.8.15
228
226
  signing_key:
229
227
  specification_version: 3
230
228
  summary: Convenience tasks for working with jetty from within a ruby project.