pheme 4.0.2 → 4.0.3
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +6 -0
- data/lib/pheme/queue_poller.rb +2 -6
- data/lib/pheme/version.rb +1 -1
- data/spec/queue_poller_spec.rb +1 -1
- data/spec/version_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a03bd21407e73fb60ef72e1802d45683fe8e5fb20017f5144d2a6fd5a34b59e
|
|
4
|
+
data.tar.gz: fd9e6b59b514c56700ded3dc91a654cea4fc0fc132c32cfd9496deea30688ab0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
data/lib/pheme/queue_poller.rb
CHANGED
|
@@ -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
data/spec/queue_poller_spec.rb
CHANGED
|
@@ -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',
|
|
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(
|
|
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.
|
|
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-
|
|
11
|
+
date: 2021-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|