Skip to content

Commit

Permalink
Merge pull request #1070 from c960657/em-http-ruby-head
Browse files Browse the repository at this point in the history
Exclude em-http-request on Ruby 3.4
  • Loading branch information
bblimke authored Sep 24, 2024
2 parents f4bfa73 + 4fd657a commit cd84c06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/webmock/http_lib_adapters/em_http_request_adapter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

return if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')

begin
require 'em-http-request'
rescue LoadError
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/em_http_request/em_http_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
describe "EM::HttpRequest" do
include EMHttpRequestSpecHelper

before(:all) do
skip 'em-http-request is not supported on Ruby >= 3.4' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')
end

include_context "with WebMock", :no_status_message

#functionality only supported for em-http-request 1.x
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
unless RUBY_PLATFORM =~ /java/
require 'curb'
require 'patron'
require 'em-http'
require 'typhoeus'
end
if RUBY_PLATFORM =~ /java/
Expand Down

0 comments on commit cd84c06

Please sign in to comment.