pheme 4.0.2 → 4.0.3

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
  SHA256:
3
- metadata.gz: 38d24eb669b4e507e93aca15a084c375d9dd5d9d6a734d6e7c0ca3336d216f2e
4
- data.tar.gz: f3e87e1c473b1f8ec4b7adfc4c94891026f29ad4fc4d192d982d207233993601
3
+ metadata.gz: 0a03bd21407e73fb60ef72e1802d45683fe8e5fb20017f5144d2a6fd5a34b59e
4
+ data.tar.gz: fd9e6b59b514c56700ded3dc91a654cea4fc0fc132c32cfd9496deea30688ab0
5
5
  SHA512:
6
- metadata.gz: ccdd560c4cb055cd877804f57b73bbab6a2d95d7a8e4140d3b38e4d6e6c9d5cee6dbd8d632a9c8d4e6651d295317d55ffdb3e4cbbd689f65344f6dcf21d2fbd4
7
- data.tar.gz: 4069eea7b5d377d3e245d4e4596abd18d7fe9534112967eadb1597eb225f048f97d9324b1de1a20683c9f1991ef508ae06786d63893cbdf78796d8091f01468b
6
+ metadata.gz: e69e7edc5eacbe3d6e81d2e478c7963acf878a44f970f7a8ebd0b1cfa91f2077132bf2f137e6fe13c82168170ac9e6258b6c3b78c7e7cb5caea5a9a8c9874345
7
+ data.tar.gz: 62ceeeec4b07913d09cd22d8e28b57e6fe19e72d62e2fa658e099ccd8ffea54753f1db71f1249e6d03366dc16c443ea0d2ff31601324f81d06b0f0e628fd925c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 4.0.3 - 2021-03-08
8
+ - Update documentation to include instructions on directly publishing to SQS
9
+
7
10
  ## 4.0.2 - 2020-12-17
8
11
  - Bump local dev version, rubocop fixes, add backstage catalog file + sonarqube project settings
9
12
 
data/README.md CHANGED
@@ -39,3 +39,9 @@ end
39
39
  See https://github.com/wealthsimple/pheme/tree/master/spec/support for example implementations of each class.
40
40
 
41
41
  TODO: write better usage instructions.
42
+
43
+ ### Handling SQS messages
44
+
45
+ Pheme expects that the SQS messages it is handling will have first been published to an SNS topic
46
+ before being sent to the SQS queue. This means if the service publishing messages is publishing them
47
+ **directly** to the SQS queue, that service must nest the message payload underneath a `Message` property.
@@ -151,14 +151,10 @@ module Pheme
151
151
 
152
152
  def coerce_message_attribute(value)
153
153
  case value['Type']
154
- when 'String'
154
+ when 'Binary', 'String'
155
155
  value['Value']
156
- when 'Number'
156
+ when 'Number', 'String.Array'
157
157
  JSON.parse(value['Value'])
158
- when 'String.Array'
159
- JSON.parse(value['Value'])
160
- when 'Binary'
161
- value['Value']
162
158
  else
163
159
  Pheme.logger.info("Unsupported custom data type")
164
160
  value["Value"]
data/lib/pheme/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pheme
2
- VERSION = '4.0.2'.freeze
2
+ VERSION = '4.0.3'.freeze
3
3
  end
@@ -418,7 +418,7 @@ describe Pheme::QueuePoller do
418
418
 
419
419
  let(:queue_message) { OpenStruct.new(body: { 'Records' => records }.to_json) }
420
420
  let(:records) do
421
- [{ 'eventVersion' => '2.0', 'eventSource': 'aws:s3' }]
421
+ [{ 'eventVersion' => '2.0', eventSource: 'aws:s3' }]
422
422
  end
423
423
 
424
424
  before do
data/spec/version_spec.rb CHANGED
@@ -4,7 +4,7 @@ describe Pheme do
4
4
  def get_version(git, branch = 'HEAD')
5
5
  git.grep('VERSION = ', 'lib/*/version.rb', { object: branch }).
6
6
  map { |_sha, matches| matches.first[1] }.
7
- map(&method(:parse_version)).
7
+ map { |version_string| parse_version(version_string) }.
8
8
  reject(&:nil?).
9
9
  first
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pheme
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Graham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2021-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport