propono 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/propono/services/queue_listener.rb +4 -0
- data/lib/propono/version.rb +1 -1
- data/test/services/queue_listener_test.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8193ab42cb462b70c436b83459abb2df0203f6be
|
4
|
+
data.tar.gz: 225ec5fc62711fee56fe6520ba4bd745fb8a5aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75c925d5b89a45630c70e9eb35e558db179eb77caf8a6c243dd9ce827da1e390e825a8205f5df9563e5ab5ab1b510f2d31fea1a0683188cdfdc64e85d102e51e
|
7
|
+
data.tar.gz: 7ccad01b84956d6a6a3dc22475fc26b0a839f7de0a1a866c655d06da75d300116d2f48c658f3821dc4d804441058c07e79ab3fbe5467abe90738951fc20aeaa6
|
data/CHANGELOG.md
CHANGED
@@ -31,6 +31,10 @@ module Propono
|
|
31
31
|
else
|
32
32
|
messages.each { |msg| process_sqs_message(msg) }
|
33
33
|
end
|
34
|
+
rescue Excon::Errors::Forbidden
|
35
|
+
Propono.config.logger.error "Forbidden error caught and re raised. #{queue_url}"
|
36
|
+
Propono.config.logger.error $!
|
37
|
+
raise $!
|
34
38
|
rescue
|
35
39
|
Propono.config.logger.error "Unexpected error reading from queue #{queue_url}"
|
36
40
|
Propono.config.logger.error $!
|
data/lib/propono/version.rb
CHANGED
@@ -76,6 +76,16 @@ module Propono
|
|
76
76
|
@listener.send(:read_messages)
|
77
77
|
end
|
78
78
|
|
79
|
+
def test_forbidden_error_is_logged_and_re_raised
|
80
|
+
@listener.stubs(queue_url: "http://example.com")
|
81
|
+
@sqs.stubs(:receive_message).raises(Excon::Errors::Forbidden.new(nil, nil, nil))
|
82
|
+
Propono.config.logger.expects(:error).with("Forbidden error caught and re raised. http://example.com")
|
83
|
+
Propono.config.logger.expects(:error).with() {|x| x.is_a?(Excon::Errors::Forbidden)}
|
84
|
+
assert_raises Excon::Errors::Forbidden do
|
85
|
+
@listener.send(:read_messages)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
79
89
|
def test_exception_from_sqs_returns_false
|
80
90
|
@sqs.stubs(:receive_message).raises(StandardError)
|
81
91
|
refute @listener.send(:read_messages)
|
@@ -128,7 +138,7 @@ module Propono
|
|
128
138
|
|
129
139
|
@receipt_handle1 = "test-receipt-handle1"
|
130
140
|
@receipt_handle2 = "test-receipt-handle2"
|
131
|
-
@message1 = {'cat' => "Foobar 123"}
|
141
|
+
@message1 = {'cat' => "Foobar 123"}
|
132
142
|
@message2 = "qwertyuiop"
|
133
143
|
@sqs_message1 = { "ReceiptHandle" => @receipt_handle1, "Body" => {"Message" => @message1}.to_json}
|
134
144
|
@sqs_message2 = { "ReceiptHandle" => @receipt_handle2, "Body" => {"Message" => @message2}.to_json}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: propono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MalcyL
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|