Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Explicit modules" #426

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# WaterDrop changelog

## 2.6.12 (Unreleased)
- [Fix] Use explicit file modules declarations to avoid potential loading errors.
- [Change] Remove usage of concurrent ruby.

## 2.6.11 (2023-10-25)
Expand Down
7 changes: 0 additions & 7 deletions lib/waterdrop/clients.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/waterdrop/clients/rdkafka.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

module WaterDrop
# Namespace for all the clients that WaterDrop may use under the hood
module Clients
# Default Rdkafka client.
# Since we use the ::Rdkafka::Producer under the hood, this is just a module that aligns with
Expand Down
7 changes: 0 additions & 7 deletions lib/waterdrop/helpers.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/waterdrop/helpers/counter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

module WaterDrop
# Extra internal helper objects
module Helpers
# Atomic counter that we can safely increment and decrement without race conditions
class Counter
Expand Down
7 changes: 0 additions & 7 deletions lib/waterdrop/instrumentation.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/waterdrop/instrumentation/callbacks.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/waterdrop/instrumentation/callbacks/statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module WaterDrop
module Instrumentation
# Namespace for handlers of callbacks emitted by the kafka client lib
module Callbacks
# Statistics callback handler
# @note We decorate the statistics with our own decorator because some of the metrics from
Expand Down
1 change: 1 addition & 0 deletions lib/waterdrop/instrumentation/logger_listener.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

module WaterDrop
# WaterDrop instrumentation related module
module Instrumentation
# Default listener that hooks up to our instrumentation and uses its events for logging
# It can be removed/replaced or anything without any harm to the Waterdrop flow
Expand Down
9 changes: 0 additions & 9 deletions lib/waterdrop/instrumentation/vendors.rb

This file was deleted.

11 changes: 0 additions & 11 deletions lib/waterdrop/instrumentation/vendors/datadog.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

module WaterDrop
module Instrumentation
# Namespace for vendor specific instrumentation
module Vendors
# Datadog specific instrumentation
module Datadog
# Listener that can be used to subscribe to WaterDrop producer to receive stats via StatsD
# and/or Datadog
Expand Down
13 changes: 0 additions & 13 deletions spec/lib/waterdrop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,4 @@
it { expect(waterdrop.gem_root.to_path).to eq path }
end
end

describe 'modules files existence' do
let(:lib_location) { File.join(WaterDrop.gem_root, 'lib', 'waterdrop', '**/**') }
let(:candidates) { Dir[lib_location].to_a }

it do
failed = candidates.select do |path|
File.directory?(path) && !File.exist?("#{path}.rb")
end

expect(failed).to eq([])
end
end
end