eventboss 1.9.0 → 1.9.2
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/.github/workflows/bundler_audit.yml +2 -2
- data/.github/workflows/rspec.yml +2 -2
- data/.gitignore +1 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +25 -27
- data/lib/eventboss/configuration.rb +15 -4
- data/lib/eventboss/launcher.rb +6 -2
- data/lib/eventboss/sns_client.rb +14 -4
- data/lib/eventboss/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b73ea2f72af8571564b345b0a1057b6184d94f88db0b423d31860a0a443ee069
|
4
|
+
data.tar.gz: d7ab90cd9a1026245b834326d251a6f21587cc1673b85cb35a14d15ac8498cc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4ad40fbee3c5f693c2c57f8148f25c82e46e455fd72cf43fe28651bb1e5ee833bdab581f608b86cf5f161d035f233ed64ed673df652c9ba69d69791b8b3632
|
7
|
+
data.tar.gz: ccfdf0da8efc60f0c52fe30c4eb1e3cb2c8df7b1c15569f1419f668b88673de8b402af48d9d9b67fb65edeb3a721a504126ebaabc730df46902eb463254e7ab6
|
data/.github/workflows/rspec.yml
CHANGED
@@ -14,9 +14,9 @@ jobs:
|
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
strategy:
|
16
16
|
matrix:
|
17
|
-
ruby-version: ["3.0"]
|
17
|
+
ruby-version: ["3.0", "3.1", "3.2"]
|
18
18
|
steps:
|
19
|
-
- uses: actions/checkout@
|
19
|
+
- uses: actions/checkout@v4
|
20
20
|
- name: Set up Ruby
|
21
21
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
|
22
22
|
uses: ruby/setup-ruby@v1
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,14 @@ 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
|
+
## [1.9.2] - 2025-01-21
|
8
|
+
|
9
|
+
- Fix typo in instance var during shut down
|
10
|
+
|
11
|
+
## [1.9.1] - 2024-12-30
|
12
|
+
|
13
|
+
- Add support for AWS Session Token in development mode
|
14
|
+
|
7
15
|
## [1.9.0] - 2024-03-12
|
8
16
|
|
9
17
|
- Eliminate the dependency on `dotenv`. However, the application will still load `dotenv` if it is available.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eventboss (1.9.
|
4
|
+
eventboss (1.9.2)
|
5
5
|
aws-sdk-sns (>= 1.1.0)
|
6
6
|
aws-sdk-sqs (>= 1.3.0)
|
7
7
|
rexml (~> 3.0)
|
@@ -10,40 +10,38 @@ GEM
|
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
aws-eventstream (1.3.0)
|
13
|
-
aws-partitions (1.
|
14
|
-
aws-sdk-core (3.
|
13
|
+
aws-partitions (1.1040.0)
|
14
|
+
aws-sdk-core (3.216.0)
|
15
15
|
aws-eventstream (~> 1, >= 1.3.0)
|
16
|
-
aws-partitions (~> 1, >= 1.
|
17
|
-
aws-sigv4 (~> 1.
|
16
|
+
aws-partitions (~> 1, >= 1.992.0)
|
17
|
+
aws-sigv4 (~> 1.9)
|
18
18
|
jmespath (~> 1, >= 1.6.1)
|
19
|
-
aws-sdk-sns (1.
|
20
|
-
aws-sdk-core (~> 3, >= 3.
|
21
|
-
aws-sigv4 (~> 1.
|
22
|
-
aws-sdk-sqs (1.
|
23
|
-
aws-sdk-core (~> 3, >= 3.
|
24
|
-
aws-sigv4 (~> 1.
|
25
|
-
aws-sigv4 (1.
|
19
|
+
aws-sdk-sns (1.93.0)
|
20
|
+
aws-sdk-core (~> 3, >= 3.216.0)
|
21
|
+
aws-sigv4 (~> 1.5)
|
22
|
+
aws-sdk-sqs (1.91.0)
|
23
|
+
aws-sdk-core (~> 3, >= 3.216.0)
|
24
|
+
aws-sigv4 (~> 1.5)
|
25
|
+
aws-sigv4 (1.11.0)
|
26
26
|
aws-eventstream (~> 1, >= 1.0.2)
|
27
|
-
diff-lcs (1.5.
|
27
|
+
diff-lcs (1.5.1)
|
28
28
|
dotenv (3.1.0)
|
29
29
|
jmespath (1.6.2)
|
30
30
|
rake (13.0.6)
|
31
|
-
rexml (3.
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
rspec-expectations (3.11.0)
|
31
|
+
rexml (3.4.0)
|
32
|
+
rspec (3.13.0)
|
33
|
+
rspec-core (~> 3.13.0)
|
34
|
+
rspec-expectations (~> 3.13.0)
|
35
|
+
rspec-mocks (~> 3.13.0)
|
36
|
+
rspec-core (3.13.0)
|
37
|
+
rspec-support (~> 3.13.0)
|
38
|
+
rspec-expectations (3.13.1)
|
40
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.13.0)
|
41
|
+
rspec-mocks (3.13.1)
|
43
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
strscan (3.1.0)
|
43
|
+
rspec-support (~> 3.13.0)
|
44
|
+
rspec-support (3.13.1)
|
47
45
|
|
48
46
|
PLATFORMS
|
49
47
|
ruby
|
@@ -20,6 +20,7 @@ module Eventboss
|
|
20
20
|
:eventboss_account_id,
|
21
21
|
:aws_access_key_id,
|
22
22
|
:aws_secret_access_key,
|
23
|
+
:aws_session_token,
|
23
24
|
:aws_sns_endpoint,
|
24
25
|
:aws_sqs_endpoint,
|
25
26
|
:sns_sqs_name_infix,
|
@@ -63,10 +64,7 @@ module Eventboss
|
|
63
64
|
defined_or_default('sqs_client') do
|
64
65
|
options = {
|
65
66
|
region: eventboss_region,
|
66
|
-
credentials:
|
67
|
-
aws_access_key_id,
|
68
|
-
aws_secret_access_key
|
69
|
-
)
|
67
|
+
credentials: credentials
|
70
68
|
}
|
71
69
|
if aws_sqs_endpoint
|
72
70
|
options[:endpoint] = aws_sqs_endpoint
|
@@ -76,6 +74,15 @@ module Eventboss
|
|
76
74
|
end
|
77
75
|
end
|
78
76
|
|
77
|
+
def credentials
|
78
|
+
return Aws::Credentials.new(aws_access_key_id, aws_secret_access_key, aws_session_token) if development_mode?
|
79
|
+
|
80
|
+
Aws::Credentials.new(
|
81
|
+
aws_access_key_id,
|
82
|
+
aws_secret_access_key
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
79
86
|
def eventboss_region
|
80
87
|
defined_or_default('eventboss_region') { ENV['EVENTBOSS_REGION'] || ENV['EVENTBUS_REGION'] }
|
81
88
|
end
|
@@ -96,6 +103,10 @@ module Eventboss
|
|
96
103
|
defined_or_default('aws_secret_access_key') { ENV['AWS_SECRET_ACCESS_KEY'] }
|
97
104
|
end
|
98
105
|
|
106
|
+
def aws_session_token
|
107
|
+
defined_or_default('aws_session_token') { ENV['AWS_SESSION_TOKEN'] }
|
108
|
+
end
|
109
|
+
|
99
110
|
def aws_sqs_endpoint
|
100
111
|
defined_or_default('aws_sqs_endpoint') { ENV['AWS_SQS_ENDPOINT'] }
|
101
112
|
end
|
data/lib/eventboss/launcher.rb
CHANGED
@@ -29,7 +29,7 @@ module Eventboss
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def stop
|
32
|
-
logger.info('launcher') { '
|
32
|
+
logger.info('launcher') { 'Starting shutdown' }
|
33
33
|
|
34
34
|
@bus.clear
|
35
35
|
@pollers.each(&:terminate)
|
@@ -41,7 +41,10 @@ module Eventboss
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def hard_shutdown
|
44
|
-
|
44
|
+
if @pollers.empty? && @workers.empty?
|
45
|
+
logger.info('launcher') { 'Gracefully shutdown' }
|
46
|
+
return
|
47
|
+
end
|
45
48
|
|
46
49
|
logger.info('launcher') { "Killing remaining #{@pollers.size} pollers, #{@workers.size} workers" }
|
47
50
|
@pollers.each(&:kill)
|
@@ -82,6 +85,7 @@ module Eventboss
|
|
82
85
|
attempts = 0
|
83
86
|
while @pollers.any? || @workers.any?
|
84
87
|
break if (attempts += 1) > shutdown_attempts
|
88
|
+
|
85
89
|
sleep shutdown_delay
|
86
90
|
logger.info('launcher') { "Waiting for #{@pollers.size} pollers, #{@workers.size} workers" }
|
87
91
|
end
|
data/lib/eventboss/sns_client.rb
CHANGED
@@ -42,10 +42,7 @@ module Eventboss
|
|
42
42
|
if configured?
|
43
43
|
options = {
|
44
44
|
region: configuration.eventboss_region,
|
45
|
-
credentials:
|
46
|
-
configuration.aws_access_key_id,
|
47
|
-
configuration.aws_secret_access_key
|
48
|
-
)
|
45
|
+
credentials: credentials
|
49
46
|
}
|
50
47
|
if configuration.aws_sns_endpoint
|
51
48
|
options[:endpoint] = configuration.aws_sns_endpoint
|
@@ -59,6 +56,19 @@ module Eventboss
|
|
59
56
|
end
|
60
57
|
end
|
61
58
|
|
59
|
+
def credentials
|
60
|
+
return ::Aws::Credentials.new(
|
61
|
+
configuration.aws_access_key_id,
|
62
|
+
configuration.aws_secret_access_key,
|
63
|
+
configuration.aws_session_token
|
64
|
+
) if configuration.development_mode?
|
65
|
+
|
66
|
+
::Aws::Credentials.new(
|
67
|
+
configuration.aws_access_key_id,
|
68
|
+
configuration.aws_secret_access_key
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
62
72
|
def configured?
|
63
73
|
!!(
|
64
74
|
configuration.eventboss_region &&
|
data/lib/eventboss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventboss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AirHelp
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sqs
|
@@ -170,7 +170,7 @@ homepage: https://github.com/AirHelp/eventboss
|
|
170
170
|
licenses:
|
171
171
|
- MIT
|
172
172
|
metadata: {}
|
173
|
-
post_install_message:
|
173
|
+
post_install_message:
|
174
174
|
rdoc_options: []
|
175
175
|
require_paths:
|
176
176
|
- lib
|
@@ -185,8 +185,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
|
-
rubygems_version: 3.
|
189
|
-
signing_key:
|
188
|
+
rubygems_version: 3.5.22
|
189
|
+
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Eventboss Ruby Client.
|
192
192
|
test_files: []
|