Permalink
Browse files

Switch back to released faraday.

@i0rek moved the new typhoeus faraday adapter into typhoeus itself.
  • Loading branch information...
1 parent a20ac40 commit 8043c323f7ca717f44d8018051f7ecf50c6a5a74 @myronmarston committed Oct 29, 2012
View
@@ -4,7 +4,6 @@ gem 'appraisal'
gem 'typhoeus', :git => "https://github.com/typhoeus/typhoeus.git"
gem 'webmock', :git => "https://github.com/i0rek/webmock.git", :branch => "typhoeus_0.5.0"
-gem 'faraday', :git => "https://github.com/i0rek/faraday.git", :branch => "typhoeus_0.5.0"
gemspec
@@ -96,6 +96,7 @@ Feature: hook_into
require 'excon'
require 'faraday'
require 'vcr'
+ <extra_require>
VCR.configure { |c| c.ignore_localhost = true }
@@ -167,8 +168,8 @@ Feature: hook_into
| Faraday 2: Hello faraday |
Examples:
- | hook_into | faraday_adapter |
- | :fakeweb | net_http |
- | :webmock | net_http |
- | :fakeweb | typhoeus |
- | :webmock | typhoeus |
+ | hook_into | faraday_adapter | extra_require |
+ | :fakeweb | net_http | |
+ | :webmock | net_http | |
+ | :fakeweb | typhoeus | require 'typhoeus/adapters/faraday' |
+ | :webmock | typhoeus | require 'typhoeus/adapters/faraday' |
@@ -21,6 +21,7 @@ Feature: Faraday middleware
require 'faraday'
require 'vcr'
+ <extra_require>
VCR.configure do |c|
c.default_cassette_options = { :serialize_with => :syck }
@@ -49,7 +50,7 @@ Feature: Faraday middleware
And the file "cassettes/example.yml" should contain "Hello foo 1"
Examples:
- | adapter |
- | net_http |
- | typhoeus |
+ | adapter | extra_require |
+ | net_http | |
+ | typhoeus | require 'typhoeus/adapters/faraday' |
@@ -23,8 +23,9 @@ def available?; true; end
end
def include_http_adapter_for(lib)
- require 'support/http_library_adapters'
require (lib =~ /faraday/ ? 'faraday' : lib)
+ require 'typhoeus' if lib.include?('typhoeus') # for faraday-typhoeus
+ require 'support/http_library_adapters'
include HTTP_LIBRARY_ADAPTERS[lib]
end
@@ -4,7 +4,6 @@ source :rubygems
gem "appraisal"
gem "webmock", :git=>"https://github.com/i0rek/webmock.git", :branch=>"typhoeus_0.5.0"
-gem "faraday", :git=>"https://github.com/i0rek/faraday.git", :branch=>"typhoeus_0.5.0"
gem "jruby-openssl", :platforms=>:jruby
gem "yard"
gem "relish", "~> 0.6"
@@ -1,12 +1,4 @@
GIT
- remote: https://github.com/i0rek/faraday.git
- revision: 69a2fa65e3a37e1fe9e8a2e4c900d79a3bc0546a
- branch: typhoeus_0.5.0
- specs:
- faraday (0.9.0.pre)
- multipart-post (~> 1.1)
-
-GIT
remote: https://github.com/i0rek/webmock.git
revision: aeac5cc6a1ac7a313c138514d66cd536802b9dc4
branch: typhoeus_0.5.0
@@ -17,10 +9,10 @@ GIT
GIT
remote: https://github.com/typhoeus/typhoeus.git
- revision: 73ef1a00c2615cf77e92591c1efd885ffafb16b6
+ revision: 6f4e9079ade2f90c20341dddd022ab1d153400ec
specs:
typhoeus (0.5.0.rc)
- ethon (= 0.5.0)
+ ethon (= 0.5.1)
PATH
remote: /Users/myron/code/vcr
@@ -40,8 +32,8 @@ GEM
cucumber (>= 1.1.1)
ffi (>= 1.0.11)
rspec (>= 2.7.0)
- builder (3.1.3)
- childprocess (0.3.5)
+ builder (3.1.4)
+ childprocess (0.3.6)
ffi (~> 1.0, >= 1.0.6)
columnize (0.3.6)
cookiejar (0.3.0)
@@ -69,12 +61,14 @@ GEM
http_parser.rb (>= 0.5.3)
em-socksify (0.2.1)
eventmachine (>= 1.0.0.beta.4)
- ethon (0.5.0)
+ ethon (0.5.1)
ffi (~> 1.0.11)
mime-types (~> 1.18)
eventmachine (1.0.0)
- excon (0.16.4)
+ excon (0.16.7)
fakeweb (1.3.0)
+ faraday (0.8.4)
+ multipart-post (~> 1.1)
ffi (1.0.11)
fuubar (1.0.0)
rspec (~> 2.0)
@@ -136,7 +130,7 @@ GEM
tilt (1.3.3)
timecop (0.3.5)
yajl-ruby (1.1.0)
- yard (0.8.2.1)
+ yard (0.8.3)
PLATFORMS
ruby
@@ -151,7 +145,7 @@ DEPENDENCIES
em-http-request (~> 1.0.2)
excon (>= 0.11.0, < 1.0)
fakeweb (~> 1.3.0)
- faraday!
+ faraday (~> 0.8)
fuubar
fuubar-cucumber
github-markup
@@ -3,7 +3,6 @@
source :rubygems
gem "appraisal"
-gem "faraday", :git=>"https://github.com/i0rek/faraday.git", :branch=>"typhoeus_0.5.0"
gem "jruby-openssl", :platforms=>:jruby
gem "yard"
gem "relish", "~> 0.6"
@@ -1,11 +1,3 @@
-GIT
- remote: https://github.com/i0rek/faraday.git
- revision: 69a2fa65e3a37e1fe9e8a2e4c900d79a3bc0546a
- branch: typhoeus_0.5.0
- specs:
- faraday (0.9.0.pre)
- multipart-post (~> 1.1)
-
PATH
remote: /Users/myron/code/vcr
specs:
@@ -24,8 +16,8 @@ GEM
cucumber (>= 1.1.1)
ffi (>= 1.0.11)
rspec (>= 2.7.0)
- builder (3.1.3)
- childprocess (0.3.5)
+ builder (3.1.4)
+ childprocess (0.3.6)
ffi (~> 1.0, >= 1.0.6)
columnize (0.3.6)
cookiejar (0.3.0)
@@ -54,8 +46,10 @@ GEM
em-socksify (0.2.1)
eventmachine (>= 1.0.0.beta.4)
eventmachine (1.0.0)
- excon (0.16.4)
+ excon (0.16.7)
fakeweb (1.3.0)
+ faraday (0.8.4)
+ multipart-post (~> 1.1)
ffi (1.1.5)
fuubar (1.0.0)
rspec (~> 2.0)
@@ -123,7 +117,7 @@ GEM
addressable (>= 2.2.7)
crack (>= 0.1.7)
yajl-ruby (1.1.0)
- yard (0.8.2.1)
+ yard (0.8.3)
PLATFORMS
ruby
@@ -138,7 +132,7 @@ DEPENDENCIES
em-http-request (~> 1.0.2)
excon (>= 0.11.0, < 1.0)
fakeweb (~> 1.3.0)
- faraday!
+ faraday (~> 0.8)
fuubar
fuubar-cucumber
github-markup
@@ -219,6 +219,12 @@ def normalize_request_headers(headers)
end
%w[ net_http typhoeus patron ].each do |_faraday_adapter|
+ if _faraday_adapter == 'typhoeus' &&
+ defined?(::Typhoeus::VERSION) &&
+ ::Typhoeus::VERSION.to_f >= 0.5
+ require 'typhoeus/adapters/faraday'
+ end
+
HTTP_LIBRARY_ADAPTERS["faraday (w/ #{_faraday_adapter})"] = Module.new do
class << self; self; end.class_eval do
define_method(:http_library_name) do
@@ -56,7 +56,7 @@ def self.test_record_and_playback(description, query)
test_record_and_playback "with a complex escaped query param", "q=#{CGI.escape("A&(! 234k !@ kasdj232\#$ kjw35")}"
it 'plays back an empty body response exactly as it was recorded (e.g. nil vs empty string)' do
- pending "awaiting an external fix", :if => library_hook_name == :fakeweb do
+ pending "awaiting an external fix", :if => library.gsub('_', '/').include?('net/http') && library_hook_name != :webmock do
get_body = lambda do
VCR.use_cassette('empty_body', :record => :once) do
get_body_object make_http_request(:get, "http://localhost:#{VCR::SinatraApp.port}/204")

0 comments on commit 8043c32

Please sign in to comment.