pheme 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +18 -20
- data/lib/pheme/message_type/aws_event.rb +2 -0
- data/lib/pheme/queue_poller.rb +4 -0
- data/lib/pheme/version.rb +1 -1
- data/spec/message_handler_spec.rb +3 -1
- data/spec/queue_poller_spec.rb +6 -0
- data/spec/version_spec.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff68537e797de06e1b5ee79eeaa3b6f64c4783c571febadbb19779511b0eb426
|
4
|
+
data.tar.gz: 9e49021b2cc77aa556de089c21b23397d9a6b03b98f03a5838310db04fac8b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e31aa40b21e8aff4d26c2869baae883b14c62aff3c7dc9073ff3ab2020b80a74093b731056a552d4148e1bc463a49073b9d715193373f401eb34f7593241605
|
7
|
+
data.tar.gz: bd46da56fef237e5f952c428fd80247f77d7df3470da501195aa4712d1597ac2eb021a999d10002f20e3a505d0d549519213eb9ae519e3a6fa194430fb52a9dd
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,12 @@ 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.1.1 - 2022-01-04
|
8
|
+
### Changed
|
9
|
+
- Updated dependencies
|
10
|
+
|
7
11
|
## 4.1.0 - 2021-12-31
|
12
|
+
### Changed
|
8
13
|
- Add Ruby 3 support
|
9
14
|
|
10
15
|
## 4.0.15 - 2021-12-03
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pheme (4.1.
|
4
|
+
pheme (4.1.1)
|
5
5
|
activesupport (>= 4)
|
6
6
|
aws-sdk-sns (~> 1.1)
|
7
7
|
aws-sdk-sqs (~> 1.3)
|
@@ -11,15 +11,14 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (
|
14
|
+
activesupport (7.0.0)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
16
|
i18n (>= 1.6, < 2)
|
17
17
|
minitest (>= 5.1)
|
18
18
|
tzinfo (~> 2.0)
|
19
|
-
zeitwerk (~> 2.3)
|
20
19
|
ast (2.4.2)
|
21
20
|
aws-eventstream (1.2.0)
|
22
|
-
aws-partitions (1.
|
21
|
+
aws-partitions (1.544.0)
|
23
22
|
aws-sdk-core (3.125.0)
|
24
23
|
aws-eventstream (~> 1, >= 1.0.2)
|
25
24
|
aws-partitions (~> 1, >= 1.525.0)
|
@@ -37,23 +36,23 @@ GEM
|
|
37
36
|
bundler (>= 1.2.0, < 3)
|
38
37
|
thor (~> 1.0)
|
39
38
|
concurrent-ruby (1.1.9)
|
40
|
-
diff-lcs (1.
|
39
|
+
diff-lcs (1.5.0)
|
41
40
|
docile (1.4.0)
|
42
|
-
git (1.
|
41
|
+
git (1.10.1)
|
43
42
|
rchardet (~> 1.8)
|
44
43
|
i18n (1.8.11)
|
45
44
|
concurrent-ruby (~> 1.0)
|
46
45
|
jmespath (1.4.0)
|
47
|
-
minitest (5.
|
46
|
+
minitest (5.15.0)
|
48
47
|
parallel (1.21.0)
|
49
|
-
parser (3.0.
|
48
|
+
parser (3.1.0.0)
|
50
49
|
ast (~> 2.4.1)
|
51
50
|
rack (2.2.3)
|
52
51
|
rainbow (3.0.0)
|
53
52
|
rake (13.0.6)
|
54
53
|
rchardet (1.8.0)
|
55
54
|
recursive-open-struct (1.1.3)
|
56
|
-
regexp_parser (2.
|
55
|
+
regexp_parser (2.2.0)
|
57
56
|
rexml (3.2.5)
|
58
57
|
rspec (3.10.0)
|
59
58
|
rspec-core (~> 3.10.0)
|
@@ -73,29 +72,29 @@ GEM
|
|
73
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
74
73
|
rspec-support (~> 3.10.0)
|
75
74
|
rspec-support (3.10.3)
|
76
|
-
rspec_junit_formatter (0.
|
75
|
+
rspec_junit_formatter (0.5.0)
|
77
76
|
rspec-core (>= 2, < 4, != 2.12.0)
|
78
|
-
rubocop (1.
|
77
|
+
rubocop (1.24.1)
|
79
78
|
parallel (~> 1.10)
|
80
79
|
parser (>= 3.0.0.0)
|
81
80
|
rainbow (>= 2.2.2, < 4.0)
|
82
81
|
regexp_parser (>= 1.8, < 3.0)
|
83
82
|
rexml
|
84
|
-
rubocop-ast (>= 1.
|
83
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
85
84
|
ruby-progressbar (~> 1.7)
|
86
85
|
unicode-display_width (>= 1.4.0, < 3.0)
|
87
|
-
rubocop-ast (1.
|
86
|
+
rubocop-ast (1.15.1)
|
88
87
|
parser (>= 3.0.1.1)
|
89
|
-
rubocop-performance (1.
|
88
|
+
rubocop-performance (1.13.1)
|
90
89
|
rubocop (>= 1.7.0, < 2.0)
|
91
90
|
rubocop-ast (>= 0.4.0)
|
92
|
-
rubocop-rails (2.
|
91
|
+
rubocop-rails (2.13.0)
|
93
92
|
activesupport (>= 4.2.0)
|
94
93
|
rack (>= 1.1)
|
95
94
|
rubocop (>= 1.7.0, < 2.0)
|
96
|
-
rubocop-rspec (2.
|
95
|
+
rubocop-rspec (2.7.0)
|
97
96
|
rubocop (~> 1.19)
|
98
|
-
rubocop-vendor (0.
|
97
|
+
rubocop-vendor (0.8.0)
|
99
98
|
rubocop (>= 0.53.0)
|
100
99
|
ruby-progressbar (1.11.0)
|
101
100
|
simplecov (0.21.2)
|
@@ -109,13 +108,12 @@ GEM
|
|
109
108
|
tzinfo (2.0.4)
|
110
109
|
concurrent-ruby (~> 1.0)
|
111
110
|
unicode-display_width (2.1.0)
|
112
|
-
ws-style (6.
|
113
|
-
rubocop (>= 1.
|
111
|
+
ws-style (6.12.3)
|
112
|
+
rubocop (>= 1.23)
|
114
113
|
rubocop-performance (>= 1.10.2)
|
115
114
|
rubocop-rails (>= 2.9.1)
|
116
115
|
rubocop-rspec (>= 2.2.0)
|
117
116
|
rubocop-vendor (>= 0.6.0)
|
118
|
-
zeitwerk (2.5.1)
|
119
117
|
|
120
118
|
PLATFORMS
|
121
119
|
ruby
|
@@ -19,7 +19,9 @@ module Pheme
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def parse_aws_event(message_contents)
|
22
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
22
23
|
RecursiveOpenStruct.new({ wrapper: message_contents }, recurse_over_arrays: true).wrapper
|
24
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
data/lib/pheme/queue_poller.rb
CHANGED
@@ -127,12 +127,16 @@ module Pheme
|
|
127
127
|
|
128
128
|
def parse_csv(message_contents)
|
129
129
|
parsed_body = SmarterCSV.process(StringIO.new(message_contents))
|
130
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
130
131
|
parsed_body.map { |item| RecursiveOpenStruct.new(item, recurse_over_arrays: true) }
|
132
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
131
133
|
end
|
132
134
|
|
133
135
|
def parse_json(message_contents)
|
134
136
|
parsed_body = JSON.parse(message_contents)
|
137
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
135
138
|
RecursiveOpenStruct.new({ wrapper: parsed_body }, recurse_over_arrays: true).wrapper
|
139
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
136
140
|
end
|
137
141
|
|
138
142
|
def handle(message, metadata, message_attributes)
|
data/lib/pheme/version.rb
CHANGED
@@ -3,7 +3,9 @@ describe Pheme::MessageHandler do
|
|
3
3
|
|
4
4
|
before { use_default_configuration! }
|
5
5
|
|
6
|
-
|
6
|
+
# rubocop:disable RSpec/VerifiedDoubles
|
7
|
+
let(:message) { double(status: status) }
|
8
|
+
# rubocop:enable RSpec/VerifiedDoubles
|
7
9
|
let(:timestamp) { '2018-04-17T21:45:05.915Z' }
|
8
10
|
|
9
11
|
describe "#handle" do
|
data/spec/queue_poller_spec.rb
CHANGED
@@ -222,7 +222,9 @@ describe Pheme::QueuePoller do
|
|
222
222
|
end
|
223
223
|
|
224
224
|
it { is_expected.to have(2).items }
|
225
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
225
226
|
it { is_expected.to eq(RecursiveOpenStruct.new({ wrapper: expected_message }, recurse_over_arrays: true).wrapper) }
|
227
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
226
228
|
end
|
227
229
|
|
228
230
|
context "with unknown message format" do
|
@@ -240,7 +242,9 @@ describe Pheme::QueuePoller do
|
|
240
242
|
|
241
243
|
it { is_expected.to be_a(Array) }
|
242
244
|
its(:first) { is_expected.to be_a(Array) }
|
245
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
243
246
|
its('first.first') { is_expected.to be_a(RecursiveOpenStruct) }
|
247
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
244
248
|
|
245
249
|
it "parses the nested object" do
|
246
250
|
expect(subject.first.first.test).to eq('test')
|
@@ -361,7 +365,9 @@ describe Pheme::QueuePoller do
|
|
361
365
|
|
362
366
|
it "handles the message" do
|
363
367
|
expect(ExampleMessageHandler).to receive(:new).with(
|
368
|
+
# rubocop:disable Vendor/RecursiveOpenStructUse
|
364
369
|
message: RecursiveOpenStruct.new(message),
|
370
|
+
# rubocop:enable Vendor/RecursiveOpenStructUse
|
365
371
|
metadata: { timestamp: timestamp, topic_arn: topic_arn },
|
366
372
|
message_attributes: {},
|
367
373
|
)
|
data/spec/version_spec.rb
CHANGED
@@ -4,8 +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
|
-
|
8
|
-
reject(&:nil?).
|
7
|
+
filter_map { |version_string| parse_version(version_string) }.
|
9
8
|
first
|
10
9
|
end
|
11
10
|
|