eventboss 1.8.0 → 1.9.0

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: 96d1bb368bb5d3178aba2cf5a00bec49444f24e3a0b768d3128651d14947248e
4
- data.tar.gz: 98c2d5c2e7c64a629ef7ceedb31bfb74798c6a61d781fea22c52e36f132fd2b4
3
+ metadata.gz: c16e0055ed83a41be69e092740587b616ae42aab860eeab6cf1c0d783c5d7c58
4
+ data.tar.gz: 12570bb31ea7222bde4f5260c4374bc62b114eabc50234f88efcc99792e78a0b
5
5
  SHA512:
6
- metadata.gz: c54b9a6375dc06ce7dd516513b5e09c0f8eda8c79e796694cb9fbceaa348bff1bc196e83d400f2355b323b85b344018b13c8194505c37773b04c7196d6d6c012
7
- data.tar.gz: a64d2636b7d9a8dbb910d85f36eedd873abdeb7b7b7aa078c19fcb67772d6de7f6dfc353117cf1b0ea84505c3f5aa5f87d48a4deb2c68beb504b4a6cfe24333c
6
+ metadata.gz: 6b60edf00b98747f09f95396681dcb1b70364736f59bddb13da4801b6eecda05d07590d8ff32bf2e301e819107401d8e1e4489ded2c5716e5887c9a2aaad978d
7
+ data.tar.gz: 32ff2b2a477e78497a7d54faa012307c6eb44ceb34869ed4f3399bb058b8d183f1ef12235b9d7e2abea94ccbb273e8a3de98304a5b8e764d257cb238198801e3
@@ -0,0 +1,24 @@
1
+ name: Run Bundler Audit
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ run-bundler_audit:
8
+ name: Run bundler audit
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: ["3.0"]
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ - name: Install bundle audit
20
+ run: gem install bundle-audit
21
+ - name: Update Ruby Advisory Database
22
+ run: bundle-audit update
23
+ - name: Run audit
24
+ run: bundle audit
@@ -0,0 +1,28 @@
1
+ name: Run RSpec tests
2
+
3
+ on:
4
+ workflow_call:
5
+ workflow_dispatch:
6
+ pull_request:
7
+
8
+ env:
9
+ APPLICATION_NAME: eventboss
10
+
11
+ jobs:
12
+ run-tests:
13
+ name: Run RSpec
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ ruby-version: ["3.0"]
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ # runs 'bundle install' and caches installed gems automatically
26
+ bundler-cache: true
27
+ - name: Run tests
28
+ run: bundle exec rspec
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.0] - 2024-03-12
8
+
9
+ - Eliminate the dependency on `dotenv`. However, the application will still load `dotenv` if it is available.
10
+
7
11
  ## [1.4.0] - 2020-04-18
8
12
 
9
13
  - Introduce server middlewares (#31)
data/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventboss (1.8.0)
4
+ eventboss (1.9.0)
5
5
  aws-sdk-sns (>= 1.1.0)
6
6
  aws-sdk-sqs (>= 1.3.0)
7
- dotenv (~> 2.1, >= 2.1.1)
8
7
  rexml (~> 3.0)
9
8
 
10
9
  GEM
11
10
  remote: https://rubygems.org/
12
11
  specs:
13
- aws-eventstream (1.2.0)
14
- aws-partitions (1.568.0)
15
- aws-sdk-core (3.130.0)
16
- aws-eventstream (~> 1, >= 1.0.2)
17
- aws-partitions (~> 1, >= 1.525.0)
18
- aws-sigv4 (~> 1.1)
19
- jmespath (~> 1.0)
20
- aws-sdk-sns (1.53.0)
21
- aws-sdk-core (~> 3, >= 3.127.0)
12
+ aws-eventstream (1.3.0)
13
+ aws-partitions (1.896.0)
14
+ aws-sdk-core (3.191.3)
15
+ aws-eventstream (~> 1, >= 1.3.0)
16
+ aws-partitions (~> 1, >= 1.651.0)
17
+ aws-sigv4 (~> 1.8)
18
+ jmespath (~> 1, >= 1.6.1)
19
+ aws-sdk-sns (1.72.0)
20
+ aws-sdk-core (~> 3, >= 3.191.0)
22
21
  aws-sigv4 (~> 1.1)
23
- aws-sdk-sqs (1.51.0)
24
- aws-sdk-core (~> 3, >= 3.127.0)
22
+ aws-sdk-sqs (1.70.0)
23
+ aws-sdk-core (~> 3, >= 3.191.0)
25
24
  aws-sigv4 (~> 1.1)
26
- aws-sigv4 (1.4.0)
25
+ aws-sigv4 (1.8.0)
27
26
  aws-eventstream (~> 1, >= 1.0.2)
28
27
  diff-lcs (1.5.0)
29
- dotenv (2.7.6)
30
- jmespath (1.6.1)
28
+ dotenv (3.1.0)
29
+ jmespath (1.6.2)
31
30
  rake (13.0.6)
32
- rexml (3.2.5)
31
+ rexml (3.2.8)
32
+ strscan (>= 3.0.9)
33
33
  rspec (3.11.0)
34
34
  rspec-core (~> 3.11.0)
35
35
  rspec-expectations (~> 3.11.0)
@@ -43,12 +43,14 @@ GEM
43
43
  diff-lcs (>= 1.2.0, < 2.0)
44
44
  rspec-support (~> 3.11.0)
45
45
  rspec-support (3.11.0)
46
+ strscan (3.1.0)
46
47
 
47
48
  PLATFORMS
48
49
  ruby
49
50
 
50
51
  DEPENDENCIES
51
52
  bundler (>= 1)
53
+ dotenv (~> 3.1)
52
54
  eventboss!
53
55
  rake (>= 10.0)
54
56
  rspec (~> 3.0)
@@ -0,0 +1,27 @@
1
+ version: '2'
2
+ services:
3
+ web:
4
+ build:
5
+ context: .
6
+ dockerfile: Dockerfile-test
7
+ env_file:
8
+ - .env.example
9
+ volumes:
10
+ - tmp:/usr/src/app/tmp
11
+ - log:/usr/src/app/log
12
+ pronto:
13
+ build:
14
+ context: .
15
+ dockerfile: Dockerfile-test
16
+ volumes:
17
+ - .:/usr/src/app
18
+ entrypoint: ""
19
+ command: bash -c "bundle exec pronto run -f github_status text -c origin/master"
20
+ environment:
21
+ GITHUB_ACCESS_TOKEN: ${GITHUB_ACCESS_TOKEN}
22
+ RACK_ENV: test
23
+ RAILS_ENV: test
24
+
25
+ volumes:
26
+ log:
27
+ tmp:
data/eventboss.gemspec CHANGED
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency "aws-sdk-sqs", ">= 1.3.0"
24
24
  spec.add_dependency "aws-sdk-sns", ">= 1.1.0"
25
- spec.add_dependency "dotenv", "~> 2.1", ">= 2.1.1"
26
25
  spec.add_dependency "rexml", "~> 3.0"
27
26
 
27
+ spec.add_development_dependency "dotenv", "~> 3.1"
28
28
  spec.add_development_dependency "bundler", ">= 1"
29
29
  spec.add_development_dependency 'rake', '>= 10.0'
30
30
  spec.add_development_dependency "rspec", "~> 3.0"
data/lib/eventboss/cli.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  require 'rubygems'
2
- require 'dotenv'
2
+ begin
3
+ require 'dotenv'
4
+ Dotenv.load
5
+ rescue LoadError
6
+ end
3
7
  require 'optparse'
4
8
  require 'yaml'
5
9
  require 'erb'
@@ -36,8 +40,6 @@ module Eventboss
36
40
  private
37
41
 
38
42
  def boot_system
39
- Dotenv.load
40
-
41
43
  require 'rails'
42
44
  if ::Rails::VERSION::MAJOR < 4
43
45
  require File.expand_path('config/environment.rb')
@@ -4,7 +4,13 @@ module Eventboss
4
4
  def call(exception, context = {})
5
5
  eventboss_context = { component: 'eventboss' }
6
6
  eventboss_context[:action] = context[:processor].class.to_s if context[:processor]
7
- ::Rollbar.error(exception, eventboss_context.merge(context))
7
+
8
+ default_options = { use_exception_level_filters: true }
9
+
10
+ ::Rollbar.error(
11
+ exception,
12
+ context.merge(eventboss_context, default_options)
13
+ )
8
14
  end
9
15
  end
10
16
  end
@@ -0,0 +1,17 @@
1
+ module Eventboss
2
+ module ErrorHandlers
3
+ class Sentry
4
+ def call(exception, context = {})
5
+ eventboss_context = { component: 'eventboss' }
6
+ eventboss_context[:action] = context[:processor].class.to_s if context[:processor]
7
+
8
+ ::Sentry.with_scope do |scope|
9
+ scope.set_tags(
10
+ context.merge(eventboss_context)
11
+ )
12
+ ::Sentry.capture_exception(exception)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,6 +1,7 @@
1
1
  require 'eventboss/error_handlers/logger'
2
2
  require 'eventboss/error_handlers/airbrake'
3
3
  require 'eventboss/error_handlers/rollbar'
4
+ require 'eventboss/error_handlers/sentry'
4
5
  require 'eventboss/error_handlers/db_connection_drop_handler'
5
6
  require 'eventboss/error_handlers/db_connection_not_established_handler'
6
7
  require 'eventboss/error_handlers/non_existent_queue_handler'
@@ -1,3 +1,3 @@
1
1
  module Eventboss
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
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.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AirHelp
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sqs
@@ -39,39 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.1.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: dotenv
42
+ name: rexml
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 2.1.1
47
+ version: '3.0'
51
48
  type: :runtime
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
- version: '2.1'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 2.1.1
54
+ version: '3.0'
61
55
  - !ruby/object:Gem::Dependency
62
- name: rexml
56
+ name: dotenv
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - "~>"
66
60
  - !ruby/object:Gem::Version
67
- version: '3.0'
68
- type: :runtime
61
+ version: '3.1'
62
+ type: :development
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
66
  - - "~>"
73
67
  - !ruby/object:Gem::Version
74
- version: '3.0'
68
+ version: '3.1'
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: bundler
77
71
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +116,8 @@ executables:
122
116
  extensions: []
123
117
  extra_rdoc_files: []
124
118
  files:
125
- - ".github/workflows/verify.yml"
119
+ - ".github/workflows/bundler_audit.yml"
120
+ - ".github/workflows/rspec.yml"
126
121
  - ".gitignore"
127
122
  - ".rspec"
128
123
  - ".travis.yml"
@@ -134,6 +129,7 @@ files:
134
129
  - README.md
135
130
  - Rakefile
136
131
  - bin/eventboss
132
+ - docker-compose.test.yml
137
133
  - eventboss.gemspec
138
134
  - lib/eventboss.rb
139
135
  - lib/eventboss/cli.rb
@@ -145,6 +141,7 @@ files:
145
141
  - lib/eventboss/error_handlers/logger.rb
146
142
  - lib/eventboss/error_handlers/non_existent_queue_handler.rb
147
143
  - lib/eventboss/error_handlers/rollbar.rb
144
+ - lib/eventboss/error_handlers/sentry.rb
148
145
  - lib/eventboss/extensions.rb
149
146
  - lib/eventboss/fetcher.rb
150
147
  - lib/eventboss/instrumentation.rb
@@ -173,7 +170,7 @@ homepage: https://github.com/AirHelp/eventboss
173
170
  licenses:
174
171
  - MIT
175
172
  metadata: {}
176
- post_install_message:
173
+ post_install_message:
177
174
  rdoc_options: []
178
175
  require_paths:
179
176
  - lib
@@ -188,8 +185,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
185
  - !ruby/object:Gem::Version
189
186
  version: '0'
190
187
  requirements: []
191
- rubygems_version: 3.3.7
192
- signing_key:
188
+ rubygems_version: 3.0.3.1
189
+ signing_key:
193
190
  specification_version: 4
194
191
  summary: Eventboss Ruby Client.
195
192
  test_files: []
@@ -1,40 +0,0 @@
1
- name: Verify
2
- # Source: https://github.com/actions/setup-ruby
3
-
4
- on:
5
- push:
6
- branches: [master]
7
- pull_request:
8
- branches: [master]
9
-
10
- jobs:
11
- test:
12
- runs-on: ubuntu-latest
13
- strategy:
14
- matrix:
15
- ruby-version: ["2.6", "2.7", "3.0"]
16
- steps:
17
- - uses: actions/checkout@v2
18
- - name: Set up Ruby
19
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
20
- uses: ruby/setup-ruby@v1
21
- with:
22
- ruby-version: ${{ matrix.ruby-version }}
23
- # runs 'bundle install' and caches installed gems automatically
24
- bundler-cache: true
25
- - name: Run tests
26
- run: bundle exec rspec
27
- audit:
28
- runs-on: ubuntu-latest
29
- steps:
30
- - uses: actions/checkout@v2
31
- - name: Set up Ruby
32
- uses: ruby/setup-ruby@v1
33
- with:
34
- ruby-version: "3.0"
35
- - name: Install bundle audit
36
- run: gem install bundle-audit
37
- - name: Update Ruby Advisory Database
38
- run: bundle-audit update
39
- - name: Run audit
40
- run: bundle audit