propono 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1a85c42b5fc2bc691203ab82f348535476bdf35
4
- data.tar.gz: af8fc9263c84a713779bee0e019258220102549f
3
+ metadata.gz: fd3ced592b10a7174ff8ad5d289be236e5ae911b
4
+ data.tar.gz: 684569cf1483fd61aa542bfd92156446ebdd10d6
5
5
  SHA512:
6
- metadata.gz: b80edaee162402a479bff3a14cf05b56fd3e37bd5838faf7fbc040194028aa7451e12bf6b9bf551ca25fa1903a104a68083c5514b6afd6e9e137e955bcedeeb4
7
- data.tar.gz: 994bdbb18b1cde05e45415d90ef435545a5e5647c1d8d466eee912e2b62a318677c1a0af658b1a718caee78fbcb6ffa1b46ac64707922cbc3c37f017d4ab811c
6
+ metadata.gz: 1b1070b99440428a2fcefe9ce90e2e7ead21058df3170ae76364e5e88f38b4102471bef86597d1996036f22d4916e0b2d7a49dc7d1039699a65ee60d62e1ba22
7
+ data.tar.gz: 449066005af17034bdd41b606fa8c649c2dc99e42950567fb8d91f903a34451a1b483f8f369037b3d6b1f68fe68bae98e377822865d2238581ef889ff442b4b8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.9.1 / Unreleased
2
+
3
+ * [FEATURE] Propono will raise exceptions if the message processing fails
4
+
1
5
  # 0.9.0 / Unreleased
2
6
 
3
7
  * [FEATURE] Add message ids that track throughout Propono
@@ -46,8 +46,8 @@ module Propono
46
46
  message = context.delete(:message)
47
47
  Propono.config.logger.info "Propono [#{context[:id]}]: Received from sqs."
48
48
  @message_processor.call(message, context)
49
- rescue
50
- Propono.config.logger.info("Sending and recieving messags without ids is deprecated")
49
+ rescue JSON::ParserError, TypeError
50
+ Propono.config.logger.info("Sending and recieving messages without ids is deprecated")
51
51
  @message_processor.call(body)
52
52
  end
53
53
  sqs.delete_message(queue_url, sqs_message['ReceiptHandle'])
@@ -1,3 +1,3 @@
1
1
  module Propono
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -105,6 +105,13 @@ module Propono
105
105
  @listener.stubs(queue_url: queue_url)
106
106
  @listener.send(:read_messages)
107
107
  end
108
+
109
+ def test_messages_are_not_deleted_if_there_is_an_exception
110
+ @listener = QueueListener.new(@topic_id) { raise StandardError.new("Test Error") }
111
+ @listener.stubs(sqs: @sqs)
112
+ @sqs.expects(:delete_message).never
113
+ @listener.send(:read_messages)
114
+ end
108
115
  end
109
116
  class QueueListenerLegacySyntaxTest < Minitest::Test
110
117
 
@@ -129,7 +136,7 @@ module Propono
129
136
  end
130
137
 
131
138
  def test_old_syntax_has_deprecation_warning
132
- Propono.config.logger.expects(:info).with("Sending and recieving messags without ids is deprecated")
139
+ Propono.config.logger.expects(:info).with("Sending and recieving messages without ids is deprecated")
133
140
  @listener.stubs(sqs: @sqs)
134
141
  @listener.send(:read_messages)
135
142
  end
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.9.0
4
+ version: 0.9.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-11-13 00:00:00.000000000 Z
12
+ date: 2013-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog