cloud_powers 0.2.7.14 → 0.2.7.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac69cfc616ae29a4812e4602e448a476fd70bb1a
4
- data.tar.gz: 5b26a6600585899b8fbbf38243387cd21cefbece
3
+ metadata.gz: b03dba271c1be74477dbab7f5dd6c2ab0ecfae29
4
+ data.tar.gz: 5d18228258a8b4be63b2c72bf0dc390018c7a3cd
5
5
  SHA512:
6
- metadata.gz: 870d76f26bad77ad99eb5dfc06f3808d20a2cd5bbbc34ac30b80aaec8d203ecb3ee4f4a674caa6d59c9370db4ab0d744d3c4a98bd8ef5e315d014458cf9b3c39
7
- data.tar.gz: 86800fbad6fe49d944c62814d87e97d2cdc9293618ffba68664647bae2f88c4f93b4a17eda1d18d4b48fd70ab5b6087b379488eba9ae37ea03c5fed18b6071ba
6
+ metadata.gz: a38563605e25d0cc3a4de802a6096fafb7fe370d9e068a4cd1e78446707c506a75ac8eb2f6c56ca4df91cab9eccefd992be8183a5539265f34bfee054baad9e4
7
+ data.tar.gz: bdf7ecd94a8af7a12a3ae49816f9a1ced6e9446c94554ad4b486be2e337e0a9ba6da83426eac1482ec807d0ac950a51228e86ba7933a4931599e03f130f76d97
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloud_powers (0.2.7.14)
4
+ cloud_powers (0.2.7.15)
5
5
  activesupport-core-ext (~> 4)
6
6
  aws-sdk (~> 2)
7
7
  dotenv (~> 2.1)
@@ -1,3 +1,3 @@
1
1
  module CloudPowers
2
- VERSION = "0.2.7.14"
2
+ VERSION = "0.2.7.15"
3
3
  end
@@ -248,6 +248,17 @@ module Smash
248
248
  # for it yet but you can use this hash as a guide
249
249
  # for your own custom configuration
250
250
  def self.queue_stub(opts = {})
251
+ msg_body = if opts[:body]
252
+ if opts[:body].kind_of? Hash
253
+ opts[:body] = opts[:body].to_json
254
+ elsif JSON.parse(opts[:body])
255
+ begin
256
+ opts[:body]
257
+ rescue JSON::ParserError
258
+ {foo: 'bar'}.to_json
259
+ end
260
+ end
261
+ end
251
262
  {
252
263
  stub_responses: {
253
264
  create_queue: {
@@ -273,7 +284,7 @@ module Smash
273
284
  "SenderId" => "AIDAIAZKMSNQ7TEXAMPLE",
274
285
  "SentTimestamp" => "1442428276921"
275
286
  },
276
- body: "{\"foo\":\"bar\"}",
287
+ body: msg_body || "{\"foo\":\"bar\"}",
277
288
  md5_of_body: "51b0a325...39163aa0",
278
289
  md5_of_message_attributes: "00484c68...59e48f06",
279
290
  message_attributes: {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_powers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7.14
4
+ version: 0.2.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Phillipps
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-10-14 00:00:00.000000000 Z
12
+ date: 2016-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport-core-ext