diff --git a/.travis.yml b/.travis.yml index 6b27c77..f7011e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,5 @@ notifications: email: false gemfile: - gemfiles/Gemfile.faraday-0.8 + - gemfiles/Gemfile.faraday-1.0 - Gemfile diff --git a/faraday-http-cache.gemspec b/faraday-http-cache.gemspec index 1b6a79d..024df59 100644 --- a/faraday-http-cache.gemspec +++ b/faraday-http-cache.gemspec @@ -15,5 +15,5 @@ Gem::Specification.new do |gem| gem.executables = [] gem.required_ruby_version = '>= 2.1.0' - gem.add_dependency 'faraday', '~> 0.8' + gem.add_dependency 'faraday', '>= 0.8' end diff --git a/gemfiles/Gemfile.faraday-1.0 b/gemfiles/Gemfile.faraday-1.0 new file mode 100644 index 0000000..e4afeaf --- /dev/null +++ b/gemfiles/Gemfile.faraday-1.0 @@ -0,0 +1,12 @@ +source 'http://rubygems.org' + +gem 'faraday-http-cache', path: '..' + +gem 'faraday', '1.0.0' +gem 'faraday_middleware', '1.0.0.rc1' + +gem 'em-http-request', '~> 1.1' +gem 'rspec', '~> 3.1' +gem 'rake', '~> 12.0' +gem 'activesupport', '>= 5.0' +gem 'sinatra', '~> 2.0' diff --git a/lib/faraday/http_cache.rb b/lib/faraday/http_cache.rb index e33bb75..df502e3 100644 --- a/lib/faraday/http_cache.rb +++ b/lib/faraday/http_cache.rb @@ -297,7 +297,7 @@ def create_response(env) { status: hash[:status], - body: hash[:body], + body: hash[:body] || hash[:response_body], response_headers: hash[:response_headers] } end