Skip to content

Commit

Permalink
Revert "Explicit modules (#425)"
Browse files Browse the repository at this point in the history
This reverts commit b5b13c2.
  • Loading branch information
mensfeld authored Dec 17, 2023
1 parent b5b13c2 commit d9be90a
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 64 deletions.
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

0 comments on commit d9be90a

Please sign in to comment.