pheme 6.0.2 → 6.1.0

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
  SHA256:
3
- metadata.gz: '02147649c5dec0a1ad1e85813ce883f94d6a05b1cdb0aab9d7cd1d3fded41579'
4
- data.tar.gz: f791e3d557b2c5bdbeb907e1eb4358d779db3d22105d9ce4fd813b7fb8498d33
3
+ metadata.gz: 491c3859e6cc70d89446dc968888dd2e8e494998ddb7b537463f16e8f2615265
4
+ data.tar.gz: 852489189fe6c30ab39d26412e3840b4dbfc95a06b7aea5555e37eab493c9201
5
5
  SHA512:
6
- metadata.gz: a09ad2729eb5f69fe5858cccee90227cff403b5e8ba06cc5fd03bfb06bf4f193a8eab8e2a62aa8951bab753d76e27ddcc545c35f1489b6f9df970725fa6ac208
7
- data.tar.gz: deec50f932617340704a0ea16b1b709098e84562745de8de58f11e3baf3e0d14ccae468ead8e898e4dab0a21009d55fa4d5056d0a4fcc64ea174fb20147d08e4
6
+ metadata.gz: 91f4b2e0aadfdefeefc196c4b0495ac65633b8dbfc04b2d573ef11068098da23e79854b1a01e790e55c78c11210fe58367e339191ec216f2bbc888041ff357b2
7
+ data.tar.gz: 7526fd0d1059daa2d4c9e10838497e898f61f9c334adab1e9ce4969df51b90b9ec9826059db242ca5035d6cf7e8deddd793e8c132042d4435d91490027afaeaf
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @wealthsimple/developer-tools
1
+ * @wealthsimple/build-platform
@@ -0,0 +1,49 @@
1
+ version: 2
2
+ registries:
3
+ rubygems-public-reposerver:
4
+ type: rubygems-server
5
+ url: https://reposerver.w10external.com/repository/gems
6
+ username: ${{ secrets.REPOSERVER_CI_READ_USERNAME }}
7
+ password: ${{ secrets.REPOSERVER_CI_READ_PASSWORD }}
8
+ rubygems-internal-reposerver:
9
+ type: rubygems-server
10
+ url: https://reposerver.w10external.com/repository/gems-internal
11
+ username: ${{ secrets.REPOSERVER_CI_READ_USERNAME }}
12
+ password: ${{ secrets.REPOSERVER_CI_READ_PASSWORD }}
13
+ rubygems-sidekiq-reposerver:
14
+ type: rubygems-server
15
+ url: https://reposerver.w10external.com/repository/gems-sidekiq
16
+ username: ${{ secrets.REPOSERVER_CI_READ_USERNAME }}
17
+ password: ${{ secrets.REPOSERVER_CI_READ_PASSWORD }}
18
+ updates:
19
+ - package-ecosystem: bundler
20
+ registries:
21
+ - rubygems-public-reposerver
22
+ - rubygems-internal-reposerver
23
+ - rubygems-sidekiq-reposerver
24
+ schedule:
25
+ interval: 'weekly'
26
+ cooldown:
27
+ default-days: 6
28
+ semver-major-days: 6
29
+ semver-minor-days: 6
30
+ semver-patch-days: 6
31
+ pull-request-branch-name:
32
+ separator: '-'
33
+ open-pull-requests-limit: 10
34
+ rebase-strategy: disabled
35
+ groups:
36
+ development-dependencies:
37
+ dependency-type: 'development'
38
+ update-types:
39
+ - 'patch'
40
+ - 'minor'
41
+ - 'major'
42
+ production-dependencies:
43
+ dependency-type: 'production'
44
+ update-types:
45
+ - 'patch'
46
+ - 'minor'
47
+ directories:
48
+ - '/'
49
+ insecure-external-code-execution: allow
@@ -18,3 +18,4 @@ jobs:
18
18
  This issue has been automatically closed because it has had no activity
19
19
  for over 90 days. Please re-open if you feel this was done in error.
20
20
  exempt-pr-labels: 'dependabot,depfu,dependencies,security'
21
+ delete-branch: true
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 6.1.0 - 2025-12-24
10
+ ### Added
11
+ - Added optional `skip_default_logging` configuration to suppress INFO logs during message publishing. When set to `true`, TopicPublisher will not emit "publishing message to..." logs, reducing noise in high-volume applications.
12
+
9
13
  ## 6.0.2 - 2025-02-13
10
14
  ### Changed
11
15
  - Update docs
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pheme (6.0.2)
4
+ pheme (6.1.0)
5
5
  activesupport (>= 4)
6
6
  aws-sdk-sns (~> 1.1)
7
7
  aws-sdk-sqs (~> 1.3)
@@ -12,7 +12,7 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (8.0.1)
15
+ activesupport (8.0.2)
16
16
  base64
17
17
  benchmark (>= 0.3)
18
18
  bigdecimal
@@ -27,109 +27,120 @@ GEM
27
27
  uri (>= 0.13.1)
28
28
  addressable (2.8.7)
29
29
  public_suffix (>= 2.0.2, < 7.0)
30
- ast (2.4.2)
31
- aws-eventstream (1.3.0)
32
- aws-partitions (1.1050.0)
33
- aws-sdk-core (3.218.1)
30
+ ast (2.4.3)
31
+ aws-eventstream (1.4.0)
32
+ aws-partitions (1.1143.0)
33
+ aws-sdk-core (3.229.0)
34
34
  aws-eventstream (~> 1, >= 1.3.0)
35
35
  aws-partitions (~> 1, >= 1.992.0)
36
36
  aws-sigv4 (~> 1.9)
37
37
  base64
38
+ bigdecimal
38
39
  jmespath (~> 1, >= 1.6.1)
39
- aws-sdk-sns (1.95.0)
40
- aws-sdk-core (~> 3, >= 3.216.0)
40
+ logger
41
+ aws-sdk-sns (1.104.0)
42
+ aws-sdk-core (~> 3, >= 3.228.0)
41
43
  aws-sigv4 (~> 1.5)
42
- aws-sdk-sqs (1.92.0)
43
- aws-sdk-core (~> 3, >= 3.216.0)
44
+ aws-sdk-sqs (1.100.0)
45
+ aws-sdk-core (~> 3, >= 3.228.0)
44
46
  aws-sigv4 (~> 1.5)
45
- aws-sigv4 (1.11.0)
47
+ aws-sigv4 (1.12.1)
46
48
  aws-eventstream (~> 1, >= 1.0.2)
47
- base64 (0.2.0)
48
- benchmark (0.4.0)
49
- bigdecimal (3.1.9)
49
+ base64 (0.3.0)
50
+ benchmark (0.4.1)
51
+ bigdecimal (3.2.2)
50
52
  bundler-audit (0.9.2)
51
53
  bundler (>= 1.2.0, < 3)
52
54
  thor (~> 1.0)
53
55
  concurrent-ruby (1.3.5)
54
- connection_pool (2.5.0)
55
- diff-lcs (1.5.1)
56
+ connection_pool (2.5.3)
57
+ diff-lcs (1.6.2)
56
58
  docile (1.4.1)
57
- drb (2.2.1)
58
- git (2.3.3)
59
+ drb (2.2.3)
60
+ git (4.0.4)
59
61
  activesupport (>= 5.0)
60
62
  addressable (~> 2.8)
61
- process_executer (~> 1.1)
62
- rchardet (~> 1.8)
63
+ process_executer (~> 4.0)
64
+ rchardet (~> 1.9)
63
65
  i18n (1.14.7)
64
66
  concurrent-ruby (~> 1.0)
65
67
  jmespath (1.6.2)
66
- json (2.10.1)
67
- language_server-protocol (3.17.0.4)
68
+ json (2.13.2)
69
+ language_server-protocol (3.17.0.5)
68
70
  lint_roller (1.1.0)
69
- logger (1.6.5)
70
- minitest (5.25.4)
71
- parallel (1.26.3)
71
+ logger (1.7.0)
72
+ minitest (5.25.5)
73
+ parallel (1.27.0)
72
74
  parse_a_changelog (1.3.3)
73
75
  treetop (~> 1.6)
74
- parser (3.3.7.1)
76
+ parser (3.3.9.0)
75
77
  ast (~> 2.4.1)
76
78
  racc
77
79
  polyglot (0.3.5)
78
- process_executer (1.2.0)
79
- public_suffix (6.0.1)
80
+ prism (1.4.0)
81
+ process_executer (4.0.0)
82
+ track_open_instances (~> 0.1)
83
+ public_suffix (6.0.2)
80
84
  racc (1.8.1)
81
- rack (3.1.10)
85
+ rack (3.2.0)
82
86
  rainbow (3.1.1)
83
- rake (13.2.1)
87
+ rake (13.3.0)
84
88
  rchardet (1.9.0)
85
- regexp_parser (2.10.0)
89
+ regexp_parser (2.11.0)
86
90
  resource-struct (0.4.0)
87
- rexml (3.4.0)
88
- rspec (3.13.0)
91
+ rexml (3.4.1)
92
+ rspec (3.13.1)
89
93
  rspec-core (~> 3.13.0)
90
94
  rspec-expectations (~> 3.13.0)
91
95
  rspec-mocks (~> 3.13.0)
92
96
  rspec-collection_matchers (1.2.1)
93
97
  rspec-expectations (>= 2.99.0.beta1)
94
- rspec-core (3.13.3)
98
+ rspec-core (3.13.5)
95
99
  rspec-support (~> 3.13.0)
96
- rspec-expectations (3.13.3)
100
+ rspec-expectations (3.13.5)
97
101
  diff-lcs (>= 1.2.0, < 2.0)
98
102
  rspec-support (~> 3.13.0)
99
103
  rspec-its (2.0.0)
100
104
  rspec-core (>= 3.13.0)
101
105
  rspec-expectations (>= 3.13.0)
102
- rspec-mocks (3.13.2)
106
+ rspec-mocks (3.13.5)
103
107
  diff-lcs (>= 1.2.0, < 2.0)
104
108
  rspec-support (~> 3.13.0)
105
- rspec-support (3.13.2)
109
+ rspec-support (3.13.4)
106
110
  rspec_junit_formatter (0.6.0)
107
111
  rspec-core (>= 2, < 4, != 2.12.0)
108
- rubocop (1.71.2)
112
+ rubocop (1.75.8)
109
113
  json (~> 2.3)
110
- language_server-protocol (>= 3.17.0)
114
+ language_server-protocol (~> 3.17.0.2)
115
+ lint_roller (~> 1.1.0)
111
116
  parallel (~> 1.10)
112
117
  parser (>= 3.3.0.2)
113
118
  rainbow (>= 2.2.2, < 4.0)
114
119
  regexp_parser (>= 2.9.3, < 3.0)
115
- rubocop-ast (>= 1.38.0, < 2.0)
120
+ rubocop-ast (>= 1.44.0, < 2.0)
116
121
  ruby-progressbar (~> 1.7)
117
122
  unicode-display_width (>= 2.4.0, < 4.0)
118
- rubocop-ast (1.38.0)
119
- parser (>= 3.3.1.0)
120
- rubocop-factory_bot (2.26.1)
121
- rubocop (~> 1.61)
122
- rubocop-performance (1.23.1)
123
- rubocop (>= 1.48.1, < 2.0)
124
- rubocop-ast (>= 1.31.1, < 2.0)
125
- rubocop-rails (2.26.2)
123
+ rubocop-ast (1.46.0)
124
+ parser (>= 3.3.7.2)
125
+ prism (~> 1.4)
126
+ rubocop-factory_bot (2.27.1)
127
+ lint_roller (~> 1.1)
128
+ rubocop (~> 1.72, >= 1.72.1)
129
+ rubocop-performance (1.25.0)
130
+ lint_roller (~> 1.1)
131
+ rubocop (>= 1.75.0, < 2.0)
132
+ rubocop-ast (>= 1.38.0, < 2.0)
133
+ rubocop-rails (2.31.0)
126
134
  activesupport (>= 4.2.0)
135
+ lint_roller (~> 1.1)
127
136
  rack (>= 1.1)
128
- rubocop (>= 1.52.0, < 2.0)
129
- rubocop-ast (>= 1.31.1, < 2.0)
130
- rubocop-rspec (3.4.0)
131
- rubocop (~> 1.61)
132
- rubocop-vendor (0.13.2)
137
+ rubocop (>= 1.75.0, < 2.0)
138
+ rubocop-ast (>= 1.38.0, < 2.0)
139
+ rubocop-rspec (3.6.0)
140
+ lint_roller (~> 1.1)
141
+ rubocop (~> 1.72, >= 1.72.1)
142
+ rubocop-vendor (0.14.2)
143
+ lint_roller
133
144
  rubocop
134
145
  ruby-progressbar (1.13.0)
135
146
  securerandom (0.4.1)
@@ -137,25 +148,26 @@ GEM
137
148
  docile (~> 1.1)
138
149
  simplecov-html (~> 0.11)
139
150
  simplecov_json_formatter (~> 0.1)
140
- simplecov-html (0.13.1)
151
+ simplecov-html (0.13.2)
141
152
  simplecov_json_formatter (0.1.4)
142
- smarter_csv (1.13.1)
143
- standard (1.45.0)
153
+ smarter_csv (1.14.4)
154
+ standard (1.50.0)
144
155
  language_server-protocol (~> 3.17.0.2)
145
156
  lint_roller (~> 1.0)
146
- rubocop (~> 1.71.0)
157
+ rubocop (~> 1.75.5)
147
158
  standard-custom (~> 1.0.0)
148
- standard-performance (~> 1.6)
159
+ standard-performance (~> 1.8)
149
160
  standard-custom (1.0.2)
150
161
  lint_roller (~> 1.0)
151
162
  rubocop (~> 1.50)
152
- standard-performance (1.6.0)
163
+ standard-performance (1.8.0)
153
164
  lint_roller (~> 1.1)
154
- rubocop-performance (~> 1.23.0)
155
- standard-rails (1.2.0)
165
+ rubocop-performance (~> 1.25.0)
166
+ standard-rails (1.4.0)
156
167
  lint_roller (~> 1.0)
157
- rubocop-rails (~> 2.26.0)
158
- thor (1.3.2)
168
+ rubocop-rails (~> 2.31.0)
169
+ thor (1.4.0)
170
+ track_open_instances (0.1.15)
159
171
  treetop (1.6.14)
160
172
  polyglot (~> 0.3)
161
173
  tzinfo (2.0.6)
@@ -163,11 +175,11 @@ GEM
163
175
  unicode-display_width (3.1.4)
164
176
  unicode-emoji (~> 4.0, >= 4.0.4)
165
177
  unicode-emoji (4.0.4)
166
- uri (1.0.2)
167
- ws-style (7.6.1)
178
+ uri (1.0.3)
179
+ ws-style (7.7.2)
168
180
  rubocop-factory_bot (>= 2.26.0)
169
181
  rubocop-rspec (>= 3.0.0)
170
- rubocop-vendor (>= 0.11)
182
+ rubocop-vendor (>= 0.14.2)
171
183
  standard (>= 1.30.1)
172
184
  standard-custom (>= 1.0.2)
173
185
  standard-rails (>= 0.1.0)
@@ -17,7 +17,7 @@ module Pheme
17
17
 
18
18
  class Configuration
19
19
  ATTRIBUTES = %i[sns_client sqs_client logger].freeze
20
- OPTIONAL_ATTRIBUTES = %i[error_reporting_func].freeze
20
+ OPTIONAL_ATTRIBUTES = %i[error_reporting_func skip_default_logging].freeze
21
21
  DEPRECATED_ATTRIBUTES = %i[rollbar].freeze
22
22
 
23
23
  attr_accessor(*ATTRIBUTES, *OPTIONAL_ATTRIBUTES, *DEPRECATED_ATTRIBUTES)
@@ -25,6 +25,7 @@ module Pheme
25
25
  def initialize
26
26
  @logger ||= Logger.new($stdout) # rubocop:disable Lint/DisjunctiveAssignmentInConstructor
27
27
  @logger = ActiveSupport::TaggedLogging.new(@logger) unless @logger.respond_to?(:tagged)
28
+ @skip_default_logging = false
28
29
  end
29
30
 
30
31
  def validate!
@@ -39,14 +39,16 @@ module Pheme
39
39
  message_attributes: nil,
40
40
  message_deduplication_id: nil,
41
41
  message_group_id: nil)
42
- payload = {
43
- message: "#{self.class} publishing message to #{topic_arn}",
44
- body: message,
45
- publisher: self.class.to_s,
46
- topic_arn: topic_arn,
47
- }
42
+ unless Pheme.configuration.skip_default_logging
43
+ payload = {
44
+ message: "#{self.class} publishing message to #{topic_arn}",
45
+ body: message,
46
+ publisher: self.class.to_s,
47
+ topic_arn: topic_arn,
48
+ }
48
49
 
49
- Pheme.logger.info(payload.except(:body).to_json)
50
+ Pheme.logger.info(payload.except(:body).to_json)
51
+ end
50
52
 
51
53
  sns_client.publish(
52
54
  topic_arn: topic_arn,
data/lib/pheme/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pheme
2
- VERSION = '6.0.2'.freeze
2
+ VERSION = '6.1.0'.freeze
3
3
  end
@@ -137,5 +137,36 @@ describe Pheme::TopicPublisher do
137
137
  subject
138
138
  end
139
139
  end
140
+
141
+ context 'with skip_default_logging enabled' do
142
+ subject { described_class.new(topic_arn: topic_arn) }
143
+
144
+ let(:topic_arn) { "arn:aws:sns:anything" }
145
+ let(:message) { { test: "data" } }
146
+
147
+ before do
148
+ Pheme.configure do |config|
149
+ config.skip_default_logging = true
150
+ end
151
+ end
152
+
153
+ after do
154
+ Pheme.configure do |config|
155
+ config.skip_default_logging = false
156
+ end
157
+ end
158
+
159
+ it "publishes without logging" do
160
+ expect(Pheme.configuration.sns_client).to receive(:publish).with({
161
+ topic_arn: topic_arn,
162
+ message: message.to_json,
163
+ message_attributes: nil,
164
+ message_deduplication_id: nil,
165
+ message_group_id: nil,
166
+ })
167
+ expect(Pheme.logger).not_to receive(:info)
168
+ subject.publish(message)
169
+ end
170
+ end
140
171
  end
141
172
  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: 6.0.2
4
+ version: 6.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: 2025-02-19 00:00:00.000000000 Z
11
+ date: 2025-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -243,6 +243,7 @@ extra_rdoc_files: []
243
243
  files:
244
244
  - ".github/CODEOWNERS"
245
245
  - ".github/PULL_REQUEST_TEMPLATE.md"
246
+ - ".github/dependabot.yml"
246
247
  - ".github/workflows/default.yaml"
247
248
  - ".github/workflows/guardrails.yaml"
248
249
  - ".github/workflows/stale.yml"