circuitry 3.3.0 → 3.5.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 +4 -4
- data/.circleci/config.yml +1 -1
- data/CHANGELOG.md +12 -1
- data/Gemfile +1 -1
- data/README.md +2 -0
- data/circuitry.gemspec +1 -1
- data/lib/circuitry/config/shared_settings.rb +3 -1
- data/lib/circuitry/provisioning/subscription_creator.rb +4 -4
- data/lib/circuitry/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97df62f8343b6567a34117f0689cd76347bfcc10df90bd4d16dc21b6b2a8725d
|
4
|
+
data.tar.gz: 1f0ad6c207c527eb49c2693afd40d8ca47c911ff8cec739e40d7299744e873a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5414b437a23afe45f35ec2f9102a391af8e3f3e6bfec3b585a485891972ed84fe26822f530c0018af82d24da92034ec8c026b4b45295afa580b87b72a478741
|
7
|
+
data.tar.gz: 8331142f98db79ef0a72e72fc5075d783ca7b520dd678b0e4a5d6efaa8bfd5140fa603af4cb02c61402cf0d0e6995804936f9441faeb4ddfc484205d5e42bea2
|
data/.circleci/config.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,18 @@
|
|
1
|
+
## Circuitry 3.5.0 (Jan 27, 2023)
|
2
|
+
|
3
|
+
* Changes the way SQL Policy statements are generated to avoid triggering an error when more a
|
4
|
+
queue subscribes to more than 20 SNS topics.
|
5
|
+
|
6
|
+
## Circuitry 3.4.0 (Sep 16, 2020)
|
7
|
+
|
8
|
+
* Adds an option for publisher and subscriber configs to override the AWS client options. *wahlg*
|
9
|
+
See: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Client.html
|
10
|
+
See: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SNS/Client.html
|
11
|
+
|
1
12
|
## Circuitry 3.3.0 (June 23, 2020)
|
2
13
|
|
3
14
|
* Update AWS SDK to version 3 and use module sdk gems. *thogg4*
|
4
|
-
See https://github.com/aws/aws-sdk-ruby
|
15
|
+
See https://github.com/aws/aws-sdk-ruby
|
5
16
|
Version 3 is backwards compatible with version 2.
|
6
17
|
* Catch `Aws::SNS::Errors::InvalidParameter` and rethrow with the topic
|
7
18
|
and message that caused the problem for improved debugging.
|
data/Gemfile
CHANGED
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in circuitry.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'memcache_mock', '0.0.14',
|
6
|
+
gem 'memcache_mock', '0.0.14', git: 'https://github.com/mhuggins/MemcacheMock', branch: 'expiry-and-add'
|
data/README.md
CHANGED
@@ -150,6 +150,8 @@ Available configuration options for *both* subscriber and publisher applications
|
|
150
150
|
* `middleware`: A chain of middleware that messages must go through when sent or received.
|
151
151
|
Please refer to the [Middleware](#middleware) section for more details regarding this
|
152
152
|
option.
|
153
|
+
* `aws_options_overrides`: A key/value hash of option overrides and additions passed through to the
|
154
|
+
[`AWS::SQS::Client`](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Client.html)(for subscriber config) or [`AWS::SNS::Client`](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SNS/Client.html)(for publisher config)
|
153
155
|
|
154
156
|
Available configuration options for subscriber applications include:
|
155
157
|
|
data/circuitry.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency 'virtus', '~> 1.0'
|
27
27
|
spec.add_dependency 'thor'
|
28
28
|
|
29
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
29
|
+
spec.add_development_dependency 'bundler', '~> 1.17.0'
|
30
30
|
spec.add_development_dependency 'simplecov'
|
31
31
|
spec.add_development_dependency 'connection_pool'
|
32
32
|
spec.add_development_dependency 'dalli'
|
@@ -15,6 +15,7 @@ module Circuitry
|
|
15
15
|
base.attribute :topic_names, Array[String], default: []
|
16
16
|
base.attribute :on_async_exit
|
17
17
|
base.attribute :async_strategy, Symbol, default: ->(_page, _att) { :fork }
|
18
|
+
base.attribute :aws_options_overrides, Hash, default: {}
|
18
19
|
end
|
19
20
|
|
20
21
|
def middleware
|
@@ -27,7 +28,8 @@ module Circuitry
|
|
27
28
|
{
|
28
29
|
access_key_id: access_key,
|
29
30
|
secret_access_key: secret_key,
|
30
|
-
region: region
|
31
|
+
region: region,
|
32
|
+
**aws_options_overrides
|
31
33
|
}
|
32
34
|
end
|
33
35
|
|
@@ -43,20 +43,20 @@ module Circuitry
|
|
43
43
|
'Policy' => {
|
44
44
|
'Version' => '2012-10-17',
|
45
45
|
'Id' => "#{queue.arn}/SNSPolicy",
|
46
|
-
'Statement' =>
|
46
|
+
'Statement' => [build_policy_statement]
|
47
47
|
}.to_json
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
51
|
-
def build_policy_statement
|
51
|
+
def build_policy_statement
|
52
52
|
{
|
53
|
-
'Sid' => "Sid
|
53
|
+
'Sid' => "Sid-#{queue.name}-subscriptions",
|
54
54
|
'Effect' => 'Allow',
|
55
55
|
'Principal' => { 'AWS' => '*' },
|
56
56
|
'Action' => 'SQS:SendMessage',
|
57
57
|
'Resource' => queue.arn,
|
58
58
|
'Condition' => {
|
59
|
-
'ArnEquals' => { 'aws:SourceArn' =>
|
59
|
+
'ForAnyValue:ArnEquals' => { 'aws:SourceArn' => topics.map(&:arn) }
|
60
60
|
}
|
61
61
|
}
|
62
62
|
end
|
data/lib/circuitry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circuitry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Huggins
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sqs
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 1.17.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 1.17.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: simplecov
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|