carnivore-sqs 0.1.18 → 0.1.20

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: d03bec1dc796d3151a6b9452edab2f389f19d26b
4
- data.tar.gz: 48a99739e89943ffba0f7c514d6279593d67d460
3
+ metadata.gz: 5248710788853a993a5362663b76f455446ebfc4
4
+ data.tar.gz: eada6f4134284fd37354c88e3edd8d21b8767310
5
5
  SHA512:
6
- metadata.gz: f4a0aef3ffe45ef357c70634b70ced5c4bfbe2e62baa3beec1e7507c4d9e4634cfb040d753d425155d16d7217390346c79ba94084b66fe0755cad84e6ca24edf
7
- data.tar.gz: 2612d55dee5e24c9fce0e8e84661c1a927ff68c3c87de4bd1ea622356598e62f02dca431182aaa163c4ceff0c91b370f3f0cdba80c79e91d84eca6b093ee8a8e
6
+ metadata.gz: eb13cd455dcacd116ac90de840f4e9585fbf71e353f146b5b8509965db9842cb72122c73bca78f23fd23c0871ad51e6c5f6178980b465e9cd634d82ef6aaad3e
7
+ data.tar.gz: 7f7a23a5f6748bcac498e259f09c8edef3fdcfec6b57627b63b389cb0d60b60b94333645879be46b30831dc5c3fb29f6e852bcc8e549f05cbde040bf579270d4
@@ -1,3 +1,6 @@
1
+ # v0.1.20
2
+ * Update message generation to support auto payload unpacking
3
+
1
4
  # v0.1.18
2
5
  * Defer on remote API calls to prevent internal blocking
3
6
 
@@ -60,7 +60,7 @@ module Carnivore
60
60
  begin
61
61
  defer do
62
62
  Timeout.timeout(args.fetch(:receive_timeout, 30).to_i) do
63
- m = @fog.receive_message(q, 'MaxNumberOfMessages' => n).body['Message']
63
+ m = @fog.receive_message(q, 'MaxNumberOfMessages' => n, 'WaitTimeSeconds' => 25).body['Message']
64
64
  m.map{|mg| mg.merge('SourceQueue' => q)}
65
65
  end
66
66
  end
@@ -167,15 +167,18 @@ module Carnivore
167
167
  @fog
168
168
  end
169
169
 
170
- def pre_process(m)
171
- if(m['Body'])
170
+ def pre_process(msg)
171
+ if(msg['Body'])
172
172
  begin
173
- m['Body'] = JSON.load(m['Body'])
173
+ msg['Body'] = JSON.load(msg['Body'])
174
174
  rescue JSON::ParserError
175
175
  # well, we did our best
176
176
  end
177
177
  end
178
- m
178
+ Smash.new(
179
+ :raw => msg,
180
+ :content => msg['Body']
181
+ )
179
182
  end
180
183
 
181
184
  end
@@ -1,5 +1,5 @@
1
1
  module Carnivore
2
2
  module Sqs
3
- VERSION = Gem::Version.new('0.1.18')
3
+ VERSION = Gem::Version.new('0.1.20')
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnivore-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carnivore
@@ -77,3 +77,4 @@ signing_key:
77
77
  specification_version: 4
78
78
  summary: Message processing helper
79
79
  test_files: []
80
+ has_rdoc: