eventboss 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c16e0055ed83a41be69e092740587b616ae42aab860eeab6cf1c0d783c5d7c58
4
- data.tar.gz: 12570bb31ea7222bde4f5260c4374bc62b114eabc50234f88efcc99792e78a0b
3
+ metadata.gz: 5b1f420f839811acce009c9e21966d74629313ab8a72cd05b40f3cd404534cfd
4
+ data.tar.gz: 566b513304186deeeba8afae2d5efed84926b2caa879fcaff67b6381dd4512d7
5
5
  SHA512:
6
- metadata.gz: 6b60edf00b98747f09f95396681dcb1b70364736f59bddb13da4801b6eecda05d07590d8ff32bf2e301e819107401d8e1e4489ded2c5716e5887c9a2aaad978d
7
- data.tar.gz: 32ff2b2a477e78497a7d54faa012307c6eb44ceb34869ed4f3399bb058b8d183f1ef12235b9d7e2abea94ccbb273e8a3de98304a5b8e764d257cb238198801e3
6
+ metadata.gz: 6debb38be48b97c0261c0b5569d4bf7c3b5cfac5cc843e93155c83656eb531be6687e4a8c9f1e6325c2a6fa60cdde34b80d231424ef11a5272df5d127d8edb9e
7
+ data.tar.gz: 110fad36d51db6f7456fe3a2005adec5f111c59c8df4ad6593a737f5906db93ddfe5d63cb512c26eda9497b85c0641e77eefe2efc9d4202306b66ad76e02effa
@@ -9,9 +9,9 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: ["3.0"]
12
+ ruby-version: ["3.0", "3.1", "3.2"]
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v4
15
15
  - name: Set up Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
@@ -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@v2
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
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .ruby-version
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
+ ## [1.9.1] - 2024-12-30
8
+
9
+ - Add support for AWS Session Token in development mode
10
+
7
11
  ## [1.9.0] - 2024-03-12
8
12
 
9
13
  - 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.0)
4
+ eventboss (1.9.1)
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.896.0)
14
- aws-sdk-core (3.191.3)
13
+ aws-partitions (1.1029.0)
14
+ aws-sdk-core (3.214.1)
15
15
  aws-eventstream (~> 1, >= 1.3.0)
16
- aws-partitions (~> 1, >= 1.651.0)
17
- aws-sigv4 (~> 1.8)
16
+ aws-partitions (~> 1, >= 1.992.0)
17
+ aws-sigv4 (~> 1.9)
18
18
  jmespath (~> 1, >= 1.6.1)
19
- aws-sdk-sns (1.72.0)
20
- aws-sdk-core (~> 3, >= 3.191.0)
21
- aws-sigv4 (~> 1.1)
22
- aws-sdk-sqs (1.70.0)
23
- aws-sdk-core (~> 3, >= 3.191.0)
24
- aws-sigv4 (~> 1.1)
25
- aws-sigv4 (1.8.0)
19
+ aws-sdk-sns (1.92.0)
20
+ aws-sdk-core (~> 3, >= 3.210.0)
21
+ aws-sigv4 (~> 1.5)
22
+ aws-sdk-sqs (1.89.0)
23
+ aws-sdk-core (~> 3, >= 3.210.0)
24
+ aws-sigv4 (~> 1.5)
25
+ aws-sigv4 (1.10.1)
26
26
  aws-eventstream (~> 1, >= 1.0.2)
27
- diff-lcs (1.5.0)
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.2.8)
32
- strscan (>= 3.0.9)
33
- rspec (3.11.0)
34
- rspec-core (~> 3.11.0)
35
- rspec-expectations (~> 3.11.0)
36
- rspec-mocks (~> 3.11.0)
37
- rspec-core (3.11.0)
38
- rspec-support (~> 3.11.0)
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.11.0)
42
- rspec-mocks (3.11.0)
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.11.0)
45
- rspec-support (3.11.0)
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: Aws::Credentials.new(
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
@@ -29,7 +29,7 @@ module Eventboss
29
29
  end
30
30
 
31
31
  def stop
32
- logger.info('launcher') { 'Gracefully shutdown' }
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
- return if @pollers.empty? && @workers.empty?
44
+ if @poolers.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)
@@ -42,10 +42,7 @@ module Eventboss
42
42
  if configured?
43
43
  options = {
44
44
  region: configuration.eventboss_region,
45
- credentials: ::Aws::Credentials.new(
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 &&
@@ -1,3 +1,3 @@
1
1
  module Eventboss
2
- VERSION = "1.9.0"
2
+ VERSION = "1.9.1"
3
3
  end
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.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AirHelp
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-19 00:00:00.000000000 Z
11
+ date: 2025-01-03 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.0.3.1
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: []