waterdrop 2.0.0 → 2.0.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: 616222bb9061a061dbe807b3c490c04fc368b0f457dc70e27b27c5cc049b1271
4
- data.tar.gz: f6330179e3db7aea799360ca51a09fa56d9d7bbc757925bf482a901c90e4e76d
3
+ metadata.gz: 950a87d0cb91932f4fb6dc99dc45445948235db00d18ce03fca42f4d3262fed6
4
+ data.tar.gz: e90da26b2231c001af204d7f52de1078112b1617b38089a0e253ce8c90bb3baf
5
5
  SHA512:
6
- metadata.gz: e09358bf7a02acca118f62f869f3f53bf417356e9f28f32187c578af5debfd6d602463b13082cfc79a3a12042e2e2efcedb000fd45009802bc186249dee4a6bb
7
- data.tar.gz: 81fe2d98e27704662201408c47746f8a800a955143f260afcbc2e4f3c3d44f34b5b27fbfdedb7bfe642e1fd3df966265f2e69585cc59cc3c4941005e17238079
6
+ metadata.gz: '0861a98c89e55cc8d0d00d15c9d251d09b4c83c27b87b0fd3b994be32eb285155fa786e8d79e61baf397e6f7eb995c05c0f6da4d4cfcf8658c56de0949d36c88'
7
+ data.tar.gz: 5527c9f42186a5764a2544252ffbf7d752842ac1c389a24d1e83a2c98744f90a3564776ff72d4ef324fa70d7c8ed6e07f05c0f1bb4e09daa8ad85859322983e8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,7 @@
1
1
  name: ci
2
2
 
3
3
  on:
4
+ pull_request:
4
5
  push:
5
6
  schedule:
6
7
  - cron: '0 1 * * *'
@@ -8,16 +9,17 @@ on:
8
9
  jobs:
9
10
  specs:
10
11
  runs-on: ubuntu-latest
12
+ needs: diffend
11
13
  strategy:
12
14
  fail-fast: false
13
15
  matrix:
14
16
  ruby:
17
+ - '3.0'
15
18
  - '2.7'
16
19
  - '2.6'
17
- - '2.5'
18
- - 'jruby'
20
+ - 'jruby-head'
19
21
  include:
20
- - ruby: '2.7'
22
+ - ruby: '3.0'
21
23
  coverage: 'true'
22
24
  steps:
23
25
  - uses: actions/checkout@v2
@@ -41,6 +43,26 @@ jobs:
41
43
  env:
42
44
  GITHUB_COVERAGE: ${{matrix.coverage}}
43
45
  run: bundle exec rspec
46
+
47
+ diffend:
48
+ runs-on: ubuntu-latest
49
+ strategy:
50
+ fail-fast: false
51
+ steps:
52
+ - uses: actions/checkout@v2
53
+ with:
54
+ fetch-depth: 0
55
+ - name: Set up Ruby
56
+ uses: ruby/setup-ruby@v1
57
+ with:
58
+ ruby-version: 3.0
59
+ - name: Install latest bundler
60
+ run: gem install bundler --no-document
61
+ - name: Install Diffend plugin
62
+ run: bundle plugin install diffend
63
+ - name: Bundle Secure
64
+ run: bundle secure
65
+
44
66
  coditsu:
45
67
  runs-on: ubuntu-latest
46
68
  strategy:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.0.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # WaterDrop changelog
2
2
 
3
+ ## 2.0.1 (2021-06-05)
4
+ - Remove Ruby 2.5 support and update minimum Ruby requirement to 2.6
5
+ - Fix the `finalizer references object to be finalized` warning issued with 3.0
6
+
3
7
  ## 2.0.0 (2020-12-13)
4
8
  - Redesign of the whole API (see `README.md` for the use-cases and the current API)
5
9
  - Replace `ruby-kafka` with `rdkafka`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (2.0.0)
4
+ waterdrop (2.0.1)
5
5
  concurrent-ruby (>= 1.1)
6
6
  dry-configurable (~> 0.8)
7
7
  dry-monitor (~> 0.3)
@@ -12,54 +12,48 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (6.1.0)
15
+ activesupport (6.1.3.2)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
20
  zeitwerk (~> 2.3)
21
21
  byebug (11.1.3)
22
- concurrent-ruby (1.1.7)
22
+ concurrent-ruby (1.1.9)
23
23
  diff-lcs (1.4.4)
24
- docile (1.3.2)
25
- dry-configurable (0.11.6)
24
+ docile (1.4.0)
25
+ dry-configurable (0.12.1)
26
26
  concurrent-ruby (~> 1.0)
27
- dry-core (~> 0.4, >= 0.4.7)
28
- dry-equalizer (~> 0.2)
27
+ dry-core (~> 0.5, >= 0.5.0)
29
28
  dry-container (0.7.2)
30
29
  concurrent-ruby (~> 1.0)
31
30
  dry-configurable (~> 0.1, >= 0.1.3)
32
- dry-core (0.5.0)
31
+ dry-core (0.6.0)
33
32
  concurrent-ruby (~> 1.0)
34
33
  dry-equalizer (0.3.0)
35
- dry-events (0.2.0)
34
+ dry-events (0.3.0)
36
35
  concurrent-ruby (~> 1.0)
37
- dry-core (~> 0.4)
38
- dry-equalizer (~> 0.2)
36
+ dry-core (~> 0.5, >= 0.5)
39
37
  dry-inflector (0.2.0)
40
38
  dry-initializer (3.0.4)
41
- dry-logic (1.0.8)
39
+ dry-logic (1.2.0)
42
40
  concurrent-ruby (~> 1.0)
43
- dry-core (~> 0.2)
44
- dry-equalizer (~> 0.2)
45
- dry-monitor (0.3.2)
41
+ dry-core (~> 0.5, >= 0.5)
42
+ dry-monitor (0.4.0)
46
43
  dry-configurable (~> 0.5)
47
- dry-core (~> 0.4)
48
- dry-equalizer (~> 0.2)
44
+ dry-core (~> 0.5, >= 0.5)
49
45
  dry-events (~> 0.2)
50
- dry-schema (1.5.6)
46
+ dry-schema (1.6.2)
51
47
  concurrent-ruby (~> 1.0)
52
48
  dry-configurable (~> 0.8, >= 0.8.3)
53
- dry-core (~> 0.4)
54
- dry-equalizer (~> 0.2)
49
+ dry-core (~> 0.5, >= 0.5)
55
50
  dry-initializer (~> 3.0)
56
51
  dry-logic (~> 1.0)
57
- dry-types (~> 1.4)
58
- dry-types (1.4.0)
52
+ dry-types (~> 1.5)
53
+ dry-types (1.5.1)
59
54
  concurrent-ruby (~> 1.0)
60
55
  dry-container (~> 0.3)
61
- dry-core (~> 0.4, >= 0.4.4)
62
- dry-equalizer (~> 0.3)
56
+ dry-core (~> 0.5, >= 0.5)
63
57
  dry-inflector (~> 0.1, >= 0.1.2)
64
58
  dry-logic (~> 1.0, >= 1.0.2)
65
59
  dry-validation (1.6.0)
@@ -69,14 +63,14 @@ GEM
69
63
  dry-equalizer (~> 0.2)
70
64
  dry-initializer (~> 3.0)
71
65
  dry-schema (~> 1.5, >= 1.5.2)
72
- factory_bot (6.1.0)
66
+ factory_bot (6.2.0)
73
67
  activesupport (>= 5.0.0)
74
- ffi (1.13.1)
75
- i18n (1.8.5)
68
+ ffi (1.15.1)
69
+ i18n (1.8.10)
76
70
  concurrent-ruby (~> 1.0)
77
- mini_portile2 (2.5.0)
78
- minitest (5.14.2)
79
- rake (13.0.1)
71
+ mini_portile2 (2.6.1)
72
+ minitest (5.14.4)
73
+ rake (13.0.3)
80
74
  rdkafka (0.8.1)
81
75
  ffi (~> 1.9)
82
76
  mini_portile2 (~> 2.1)
@@ -85,27 +79,28 @@ GEM
85
79
  rspec-core (~> 3.10.0)
86
80
  rspec-expectations (~> 3.10.0)
87
81
  rspec-mocks (~> 3.10.0)
88
- rspec-core (3.10.0)
82
+ rspec-core (3.10.1)
89
83
  rspec-support (~> 3.10.0)
90
- rspec-expectations (3.10.0)
84
+ rspec-expectations (3.10.1)
91
85
  diff-lcs (>= 1.2.0, < 2.0)
92
86
  rspec-support (~> 3.10.0)
93
- rspec-mocks (3.10.0)
87
+ rspec-mocks (3.10.2)
94
88
  diff-lcs (>= 1.2.0, < 2.0)
95
89
  rspec-support (~> 3.10.0)
96
- rspec-support (3.10.0)
97
- simplecov (0.20.0)
90
+ rspec-support (3.10.2)
91
+ simplecov (0.21.2)
98
92
  docile (~> 1.1)
99
93
  simplecov-html (~> 0.11)
100
94
  simplecov_json_formatter (~> 0.1)
101
95
  simplecov-html (0.12.3)
102
- simplecov_json_formatter (0.1.2)
103
- tzinfo (2.0.3)
96
+ simplecov_json_formatter (0.1.3)
97
+ tzinfo (2.0.4)
104
98
  concurrent-ruby (~> 1.0)
105
99
  zeitwerk (2.4.2)
106
100
 
107
101
  PLATFORMS
108
- ruby
102
+ x86_64-darwin
103
+ x86_64-darwin-19
109
104
  x86_64-linux
110
105
 
111
106
  DEPENDENCIES
@@ -117,4 +112,4 @@ DEPENDENCIES
117
112
  waterdrop!
118
113
 
119
114
  BUNDLED WITH
120
- 2.2.0
115
+ 2.2.19
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  # WaterDrop
2
2
 
3
- **Note**: Documentation presented here refers to WaterDrop `2.0.0.pre1`.
3
+ **Note**: Documentation presented here refers to WaterDrop `2.0.0`.
4
4
 
5
5
  WaterDrop `2.0` does **not** work with Karafka `1.*` and aims to either work as a standalone producer outside of Karafka `1.*` ecosystem or as a part of not yet released Karafka `2.0.*`.
6
6
 
7
7
  Please refer to [this](https://github.com/karafka/waterdrop/tree/1.4) branch and it's documentation for details about WaterDrop `1.*` usage.
8
8
 
9
9
  [![Build Status](https://github.com/karafka/waterdrop/workflows/ci/badge.svg)](https://github.com/karafka/waterdrop/actions?query=workflow%3Aci)
10
- [![Join the chat at https://gitter.im/karafka/karafka](https://badges.gitter.im/karafka/karafka.svg)](https://gitter.im/karafka/karafka?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10
+ [![Gem Version](https://badge.fury.io/rb/waterdrop.svg)](http://badge.fury.io/rb/waterdrop)
11
+ [![Join the chat at https://gitter.im/karafka/karafka](https://badges.gitter.im/karafka/karafka.svg)](https://gitter.im/karafka/karafka)
11
12
 
12
13
  Gem used to send messages to Kafka in an easy way with an extra validation layer. It is a part of the [Karafka](https://github.com/karafka/karafka) ecosystem.
13
14
 
@@ -88,7 +89,7 @@ You can create producers with different `kafka` settings. Documentation of the a
88
89
 
89
90
  ## Usage
90
91
 
91
- Please refer to the [documentation](https://www.rubydoc.info/github/karafka/waterdrop) in case you're interested in the more advanced API.
92
+ Please refer to the [documentation](https://www.rubydoc.info/gems/waterdrop) in case you're interested in the more advanced API.
92
93
 
93
94
  ### Basic usage
94
95
 
@@ -262,5 +263,3 @@ Each pull request must pass all the RSpec specs and meet our quality requirement
262
263
  To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
263
264
 
264
265
  Coditsu will automatically check your work against our quality standards. You can find your commit check results on the [builds page](https://app.coditsu.io/karafka/repositories/waterdrop/builds/commit_builds) of WaterDrop repository.
265
-
266
- [![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://app.coditsu.io/karafka/repositories/waterdrop/builds/commit_builds)
@@ -70,12 +70,13 @@ module WaterDrop
70
70
 
71
71
  # We undefine all the finalizers, in case it was a fork, so the finalizers from the parent
72
72
  # process don't leak
73
- ObjectSpace.undefine_finalizer(self)
73
+ ObjectSpace.undefine_finalizer(id)
74
74
  # Finalizer tracking is needed for handling shutdowns gracefully.
75
75
  # I don't expect everyone to remember about closing all the producers all the time, thus
76
76
  # this approach is better. Although it is still worth keeping in mind, that this will
77
- # block GC from removing a no longer used producer unless closed properly
78
- ObjectSpace.define_finalizer(self, proc { close })
77
+ # block GC from removing a no longer used producer unless closed properly but at least
78
+ # won't crash the VM upon closing the process
79
+ ObjectSpace.define_finalizer(id, proc { close })
79
80
 
80
81
  @pid = Process.pid
81
82
  @client = Builder.new.call(self, @config)
@@ -98,7 +99,7 @@ module WaterDrop
98
99
 
99
100
  # No need for auto-gc if everything got closed by us
100
101
  # This should be used only in case a producer was not closed properly and forgotten
101
- ObjectSpace.undefine_finalizer(self)
102
+ ObjectSpace.undefine_finalizer(id)
102
103
 
103
104
  # Flush has it's own buffer mutex but even if it is blocked, flushing can still happen
104
105
  # as we close the client after the flushing (even if blocked by the mutex)
@@ -3,5 +3,5 @@
3
3
  # WaterDrop library
4
4
  module WaterDrop
5
5
  # Current WaterDrop version
6
- VERSION = '2.0.0'
6
+ VERSION = '2.0.1'
7
7
  end
data/waterdrop.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'rdkafka', '>= 0.6.0'
24
24
  spec.add_dependency 'zeitwerk', '~> 2.1'
25
25
 
26
- spec.required_ruby_version = '>= 2.5.0'
26
+ spec.required_ruby_version = '>= 2.6.0'
27
27
 
28
28
  if $PROGRAM_NAME.end_with?('gem')
29
29
  spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -34,7 +34,7 @@ cert_chain:
34
34
  2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
35
35
  nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2020-12-13 00:00:00.000000000 Z
37
+ date: 2021-06-06 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: concurrent-ruby
@@ -176,14 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 2.5.0
179
+ version: 2.6.0
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
- rubygems_version: 3.1.4
186
+ rubygems_version: 3.2.15
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Kafka messaging made easy!
metadata.gz.sig CHANGED
Binary file