Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
aderyabin committed May 6, 2022
1 parent aecdf70 commit aca8adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['3.1', '3.0', '2.7']
ruby-version: ['3.1', '3.0', '2.7', '2.6', '2.5']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
Expand Down
8 changes: 3 additions & 5 deletions lib/sniffer/adapters/ethon_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,14 @@ def perform

if defined?(::Ethon::Easy)
if defined?(Sniffer::Adapters::EthonAdapter::PREPEND)
Ethon::Easy::Http.prepend Sniffer::Adapters::EthonAdapter::Http::Prepend
Ethon::Easy::Operations.prepend Sniffer::Adapters::EthonAdapter::Operations::Prepend
Ethon::Easy.prepend Sniffer::Adapters::EthonAdapter::Http::Prepend
Ethon::Easy.prepend Sniffer::Adapters::EthonAdapter::Operations::Prepend
else
Ethon::Easy::Http.class_eval do
Ethon::Easy.class_eval do
include Sniffer::Adapters::EthonAdapter::Http
alias_method :http_request_without_sniffer, :http_request
alias_method :http_request, :http_request_with_sniffer
end

Ethon::Easy::Operations.class_eval do
include Sniffer::Adapters::EthonAdapter::Operations
alias_method :perform_without_sniffer, :perform
alias_method :perform, :perform_with_sniffer
Expand Down

0 comments on commit aca8adb

Please sign in to comment.