pheme 5.0.10 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/pheme/topic_publisher.rb +12 -2
- data/lib/pheme/version.rb +1 -1
- data/spec/topic_publisher_spec.rb +10 -0
- 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: c6f5dc5e3c3409e2929e01abc12a87f73f49d27770bb167b5bea96701340a015
|
4
|
+
data.tar.gz: 4d4bdddbb03d6f032883b1ddc1791724053cead9a03203fc2cc5c7c69853876e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f02a0a86b987062dd7ef2fb26db9ded87c8ab3c9a7f1ac28743f527e01ec6eea91e651c633168c79aa3e3f4b87e64b059b91755b0a5d0f98b447acbad4e10de
|
7
|
+
data.tar.gz: 6d8b88463be6b765bf779001d57b308c4b7a9ab4a5dc65baa2c89a419091aa8398e71bac3954b642a5fb0cf6f7f6205bb30ef749f9395ecd768ed40ca3eb79b8
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ 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
|
+
## 5.1.0 - 2022-08-16
|
8
|
+
### Changed
|
9
|
+
- Added support for FIFO params when publishing to SNS topic
|
10
|
+
|
7
11
|
## 5.0.10 - 2022-08-12
|
8
12
|
### Changed
|
9
13
|
- Updated dependencies
|
data/Gemfile.lock
CHANGED
@@ -34,7 +34,11 @@ module Pheme
|
|
34
34
|
raise NotImplementedError
|
35
35
|
end
|
36
36
|
|
37
|
-
def publish(message,
|
37
|
+
def publish(message,
|
38
|
+
sns_client: Pheme.configuration.sns_client,
|
39
|
+
message_attributes: nil,
|
40
|
+
message_deduplication_id: nil,
|
41
|
+
message_group_id: nil)
|
38
42
|
payload = {
|
39
43
|
message: "#{self.class} publishing message to #{topic_arn}",
|
40
44
|
body: message,
|
@@ -43,7 +47,13 @@ module Pheme
|
|
43
47
|
}
|
44
48
|
Pheme.logger.info(payload.to_json)
|
45
49
|
|
46
|
-
sns_client.publish(
|
50
|
+
sns_client.publish(
|
51
|
+
topic_arn: topic_arn,
|
52
|
+
message: serialize(message),
|
53
|
+
message_attributes: message_attributes,
|
54
|
+
message_deduplication_id: message_deduplication_id,
|
55
|
+
message_group_id: message_group_id,
|
56
|
+
)
|
47
57
|
end
|
48
58
|
|
49
59
|
def serialize(message)
|
data/lib/pheme/version.rb
CHANGED
@@ -37,11 +37,15 @@ describe Pheme::TopicPublisher do
|
|
37
37
|
topic_arn: "arn:aws:sns:whatever",
|
38
38
|
message: { id: "id-0", status: "complete" }.to_json,
|
39
39
|
message_attributes: nil,
|
40
|
+
message_deduplication_id: nil,
|
41
|
+
message_group_id: nil,
|
40
42
|
})
|
41
43
|
expect(Pheme.configuration.sns_client).to receive(:publish).with({
|
42
44
|
topic_arn: "arn:aws:sns:whatever",
|
43
45
|
message: { id: "id-1", status: "complete" }.to_json,
|
44
46
|
message_attributes: nil,
|
47
|
+
message_deduplication_id: nil,
|
48
|
+
message_group_id: nil,
|
45
49
|
})
|
46
50
|
subject.publish_events
|
47
51
|
end
|
@@ -57,6 +61,8 @@ describe Pheme::TopicPublisher do
|
|
57
61
|
topic_arn: topic_arn,
|
58
62
|
message: message,
|
59
63
|
message_attributes: nil,
|
64
|
+
message_deduplication_id: nil,
|
65
|
+
message_group_id: nil,
|
60
66
|
})
|
61
67
|
subject.publish(message)
|
62
68
|
end
|
@@ -69,6 +75,8 @@ describe Pheme::TopicPublisher do
|
|
69
75
|
topic_arn: topic_arn,
|
70
76
|
message: message,
|
71
77
|
message_attributes: nil,
|
78
|
+
message_deduplication_id: nil,
|
79
|
+
message_group_id: nil,
|
72
80
|
})
|
73
81
|
subject.publish(message, sns_client: sns_client)
|
74
82
|
end
|
@@ -94,6 +102,8 @@ describe Pheme::TopicPublisher do
|
|
94
102
|
topic_arn: topic_arn,
|
95
103
|
message: compressed_message,
|
96
104
|
message_attributes: nil,
|
105
|
+
message_deduplication_id: nil,
|
106
|
+
message_group_id: nil,
|
97
107
|
}),
|
98
108
|
)
|
99
109
|
|
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: 5.0
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Graham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|