ungulate 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ungulate/job.rb +1 -0
- data/spec/ungulate/job_spec.rb +18 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/ungulate/job.rb
CHANGED
data/spec/ungulate/job_spec.rb
CHANGED
@@ -235,18 +235,35 @@ module Ungulate
|
|
235
235
|
describe :send_notification do
|
236
236
|
after { subject.send_notification }
|
237
237
|
|
238
|
+
let(:http) { mock('Net::HTTP', :put => nil, :use_ssl= => nil) }
|
239
|
+
|
238
240
|
context "notification URL provided" do
|
239
241
|
before do
|
240
242
|
subject.stub(:notification_url).and_return('http://some.host/processing_images/some/path')
|
241
243
|
end
|
242
244
|
|
243
245
|
it "should PUT to the URL" do
|
244
|
-
http = mock('Net::HTTP')
|
245
246
|
Net::HTTP.stub(:start).with('some.host').and_yield(http)
|
246
247
|
http.should_receive(:put).with('/processing_images/some/path', nil)
|
247
248
|
end
|
248
249
|
end
|
249
250
|
|
251
|
+
context "https notification URL provided" do
|
252
|
+
before do
|
253
|
+
subject.stub(:notification_url).and_return('https://some.host/processing_images/some/path')
|
254
|
+
end
|
255
|
+
|
256
|
+
it "should PUT to the URL" do
|
257
|
+
Net::HTTP.stub(:start).with('some.host').and_yield(http)
|
258
|
+
http.should_receive(:put).with('/processing_images/some/path', nil)
|
259
|
+
end
|
260
|
+
|
261
|
+
it "should use SSL" do
|
262
|
+
Net::HTTP.stub(:start).with('some.host').and_yield(http)
|
263
|
+
http.should_receive(:use_ssl=).with(true)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
250
267
|
context "notification URL not provided" do
|
251
268
|
before do
|
252
269
|
subject.stub(:notification_url).and_return(nil)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ungulate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Bruce
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-20 00:00:00 +01:00
|
19
19
|
default_executable: ungulate_server.rb
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|