hermes-rb 0.6.1 → 0.7.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: 8d9a8e1af4d989ab98014db38015a8a00f24c2c7a4ab0d7724c849e092812855
4
- data.tar.gz: 7038b16132b50567e00ebd2398054907f8e17dccc6e15652a7367f1dbd76299e
3
+ metadata.gz: 01e56f5cf846518bbedba098f5d3129cea50b81390e948eb8b3640cd98b4ee58
4
+ data.tar.gz: d672a90b3b7ddec2b8c7fcf3a57307c208297362dd16191c11792f4d8ddc4d4f
5
5
  SHA512:
6
- metadata.gz: 432bfa0092f9dbeaad563aadea388c542a8daf06c4708dca3df620806b8c678350c88b27838d2c6fd06eda9ce84398c5eb3d770efca21eff63a528161e46a3d9
7
- data.tar.gz: ba182e98338361a3024829c2e7872bf935d28769a3c69f373ecbd4a3f6676040f6a2ecd3b2753f7683e0e799484dbbd178d695679a36fb0440a25575015f12f3
6
+ metadata.gz: 9440e207aaddc314e99d66e87c9d0296b80df0280c2d4112e4d1b6530fcf3bf9da17fcdb44f398ae8f607cf6c4dbf4eed66ba44b6836d748781ce997100777d6
7
+ data.tar.gz: 55886c1f907cf1031bdf2fb8528bfa5e4efeb062161aef0e64c6b6bf601481eb411736b93e24b0b21b5a11636d0a308f5c73bce4508e2071698c7b670e5eceff
@@ -0,0 +1,43 @@
1
+ name: CI
2
+ on: [pull_request]
3
+ jobs:
4
+ rspec:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ include:
9
+ - { ruby: '2.7', rails: '5.2' }
10
+ - { ruby: '3.0', rails: '6.1' }
11
+ - { ruby: '3.1', rails: '7.0' }
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails.${{ matrix.rails }}.gemfile
15
+ DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:5432/hermes-rb-test"
16
+ DISTRIBUTED_TRACING_DATABASE_URI: "postgresql://postgres:postgres@127.0.0.1:5432/hermes-rb-test"
17
+ HUTCH_URI: "amqp://guest:guest@127.0.0.1:5672"
18
+ HUTCH_ENABLE_HTTP_API_USE: false
19
+ services:
20
+ postgres:
21
+ image: postgres:14
22
+ env:
23
+ POSTGRES_USER: postgres
24
+ POSTGRES_PASSWORD: postgres
25
+ POSTGRES_DB: hermes-rb-test
26
+ ports:
27
+ - 5432:5432
28
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
29
+ rabbitmq:
30
+ image: rabbitmq
31
+ env:
32
+ RABBITMQ_DEFAULT_USER: guest
33
+ RABBITMQ_DEFAULT_PASS: guest
34
+ ports:
35
+ - 5672:5672
36
+ options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+ - uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: ${{ matrix.ruby }}
42
+ bundler-cache: true
43
+ - run: bundle exec rspec
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ .ruby-gemset
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7
data/Appraisals ADDED
@@ -0,0 +1,12 @@
1
+ %w[5.2 6.1 7.0].each do |version|
2
+ appraise "rails.#{version}" do
3
+ gem "activesupport", "~> #{version}.0"
4
+ gem "activerecord", "~> #{version}.0"
5
+
6
+ if version == "5.2"
7
+ gem "ddtrace", "< 1.0"
8
+ else
9
+ gem "ddtrace", "> 1.0"
10
+ end
11
+ end
12
+ end
data/Changelog.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Master
4
4
 
5
+ ## 0.7.0
6
+ - Add support for DDTrace v1
7
+
5
8
  ## 0.6.1
6
9
  - Extend the list of sensitive keywords for Hermes::Logger::ParamsFilter
7
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hermes-rb (0.6.1)
4
+ hermes-rb (0.7.0)
5
5
  activerecord (>= 5)
6
6
  activesupport (>= 5)
7
7
  dry-container (~> 0)
@@ -12,35 +12,39 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activemodel (6.1.3.2)
16
- activesupport (= 6.1.3.2)
17
- activerecord (6.1.3.2)
18
- activemodel (= 6.1.3.2)
19
- activesupport (= 6.1.3.2)
20
- activesupport (6.1.3.2)
15
+ activemodel (7.0.3)
16
+ activesupport (= 7.0.3)
17
+ activerecord (7.0.3)
18
+ activemodel (= 7.0.3)
19
+ activesupport (= 7.0.3)
20
+ activesupport (7.0.3)
21
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
22
22
  i18n (>= 1.6, < 2)
23
23
  minitest (>= 5.1)
24
24
  tzinfo (~> 2.0)
25
- zeitwerk (~> 2.3)
26
25
  amq-protocol (2.3.2)
27
- bunny (2.15.0)
26
+ appraisal (2.4.1)
27
+ bundler
28
+ rake
29
+ thor (>= 0.14.0)
30
+ bunny (2.19.0)
28
31
  amq-protocol (~> 2.3, >= 2.3.1)
32
+ sorted_set (~> 1, >= 1.0.2)
29
33
  carrot-top (0.0.7)
30
34
  json
31
- concurrent-ruby (1.1.9)
35
+ concurrent-ruby (1.1.10)
32
36
  ddtrace (0.45.0)
33
37
  msgpack
34
38
  diff-lcs (1.4.4)
35
- dry-configurable (0.12.1)
39
+ dry-configurable (0.15.0)
36
40
  concurrent-ruby (~> 1.0)
37
- dry-core (~> 0.5, >= 0.5.0)
38
- dry-container (0.8.0)
41
+ dry-core (~> 0.6)
42
+ dry-container (0.9.0)
39
43
  concurrent-ruby (~> 1.0)
40
- dry-configurable (~> 0.1, >= 0.1.3)
41
- dry-core (0.6.0)
44
+ dry-configurable (~> 0.13, >= 0.13.0)
45
+ dry-core (0.7.1)
42
46
  concurrent-ruby (~> 1.0)
43
- dry-inflector (0.2.0)
47
+ dry-inflector (0.2.1)
44
48
  dry-logic (1.2.0)
45
49
  concurrent-ruby (~> 1.0)
46
50
  dry-core (~> 0.5, >= 0.5)
@@ -54,23 +58,24 @@ GEM
54
58
  dry-core (~> 0.5, >= 0.5)
55
59
  dry-inflector (~> 0.1, >= 0.1.2)
56
60
  dry-logic (~> 1.0, >= 1.0.2)
57
- hutch (1.0.0)
58
- activesupport (>= 4.2, < 7)
59
- bunny (>= 2.15, < 2.16)
61
+ hutch (1.1.1)
62
+ activesupport (>= 4.2, < 8)
63
+ bunny (>= 2.19, < 3.0)
60
64
  carrot-top (~> 0.0.7)
61
- multi_json (~> 1.14)
62
- i18n (1.8.10)
65
+ multi_json (~> 1.15)
66
+ i18n (1.10.0)
63
67
  concurrent-ruby (~> 1.0)
64
68
  ice_nine (0.11.2)
65
- json (2.5.1)
66
- minitest (5.14.4)
69
+ json (2.6.2)
70
+ minitest (5.15.0)
67
71
  msgpack (1.4.2)
68
72
  multi_json (1.15.0)
69
73
  newrelic_rpm (6.15.0)
70
74
  pg (1.2.3)
71
- rack (2.2.3)
75
+ rack (2.2.3.1)
72
76
  rake (13.0.1)
73
- request_store (1.5.0)
77
+ rbtree (0.4.5)
78
+ request_store (1.5.1)
74
79
  rack (>= 1.4)
75
80
  rspec (3.10.0)
76
81
  rspec-core (~> 3.10.0)
@@ -85,16 +90,21 @@ GEM
85
90
  diff-lcs (>= 1.2.0, < 2.0)
86
91
  rspec-support (~> 3.10.0)
87
92
  rspec-support (3.10.0)
93
+ set (1.0.2)
94
+ sorted_set (1.0.3)
95
+ rbtree
96
+ set (~> 1.0)
97
+ thor (1.2.1)
88
98
  timecop (0.9.2)
89
99
  tzinfo (2.0.4)
90
100
  concurrent-ruby (~> 1.0)
91
101
  vcr (5.0.0)
92
- zeitwerk (2.4.2)
93
102
 
94
103
  PLATFORMS
95
104
  ruby
96
105
 
97
106
  DEPENDENCIES
107
+ appraisal
98
108
  bundler
99
109
  ddtrace
100
110
  hermes-rb!
@@ -106,4 +116,4 @@ DEPENDENCIES
106
116
  vcr
107
117
 
108
118
  BUNDLED WITH
109
- 2.1.4
119
+ 2.2.22
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 5.2.0"
6
+ gem "activerecord", "~> 5.2.0"
7
+ gem "ddtrace", "< 1.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 6.1.0"
6
+ gem "activerecord", "~> 6.1.0"
7
+ gem "ddtrace", "> 1.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 7.0.0"
6
+ gem "activerecord", "~> 7.0.0"
7
+ gem "ddtrace", "> 1.0"
8
+
9
+ gemspec path: "../"
data/hermes-rb.gemspec CHANGED
@@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
42
42
  spec.add_development_dependency "pg"
43
43
  spec.add_development_dependency "newrelic_rpm"
44
44
  spec.add_development_dependency "ddtrace"
45
+ spec.add_development_dependency "appraisal"
45
46
  end
@@ -1,5 +1,5 @@
1
1
  module Hermes
2
2
  module Rb
3
- VERSION = "0.6.1"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
@@ -11,7 +11,13 @@ module Hermes
11
11
  end
12
12
 
13
13
  def handle(message)
14
- ::Datadog.tracer.trace(klass.class.name, service: "hermes", span_type: "rabbitmq") do
14
+ tracer = ::Datadog.respond_to?(:tracer) ? ::Datadog.tracer : "Datadog::Tracing".safe_constantize
15
+
16
+ tracer.trace(
17
+ klass.class.name || klass.class.to_s,
18
+ service: "hermes",
19
+ span_type: "rabbitmq"
20
+ ) do
15
21
  klass.process(message)
16
22
  end
17
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hermes-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Galanciak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -206,6 +206,20 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: appraisal
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
209
223
  description: A messenger of gods, delivering them via RabbitMQ with a little help
210
224
  from Hutch
211
225
  email:
@@ -215,9 +229,11 @@ executables:
215
229
  extensions: []
216
230
  extra_rdoc_files: []
217
231
  files:
232
+ - ".github/workflows/ci.yml"
218
233
  - ".gitignore"
219
234
  - ".rspec"
220
- - ".travis.yml"
235
+ - ".ruby-version"
236
+ - Appraisals
221
237
  - Changelog.md
222
238
  - Gemfile
223
239
  - Gemfile.lock
@@ -227,6 +243,9 @@ files:
227
243
  - bin/console
228
244
  - bin/hermes_health_check
229
245
  - bin/setup
246
+ - gemfiles/rails.5.2.gemfile
247
+ - gemfiles/rails.6.1.gemfile
248
+ - gemfiles/rails.7.0.gemfile
230
249
  - hermes-rb.gemspec
231
250
  - lib/hermes-rb.rb
232
251
  - lib/hermes.rb
@@ -288,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
307
  - !ruby/object:Gem::Version
289
308
  version: '0'
290
309
  requirements: []
291
- rubygems_version: 3.1.2
310
+ rubygems_version: 3.2.22
292
311
  signing_key:
293
312
  specification_version: 4
294
313
  summary: A messenger of gods, delivering them via RabbitMQ with a little help from
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.2
6
- env:
7
- - HUTCH_URI="amqp://guest:guest@localhost:5672"
8
- - HUTCH_ENABLE_HTTP_API_USE=false
9
- dist: xenial
10
- addons:
11
- apt:
12
- packages:
13
- - rabbitmq-server
14
- services:
15
- - rabbitmq
16
- - postgresql
17
- before_install: gem install bundler -v 2.1.4