Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ build/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
Gemfile.lock
gemfiles/*.lock
# .ruby-version
# .ruby-gemset

Expand Down
20 changes: 19 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@ rvm:
- "2.0"
- "2.1"
- "2.2"
- "2.3.3"
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- "2.7"
gemfile:
- gemfiles/faraday-0.8.gemfile
- gemfiles/faraday-1.0.gemfile
matrix:
fast_finish: true
allow_failures:
- gemfile: gemfiles/faraday-1.0.gemfile
rvm: "1.9.3"
- gemfile: gemfiles/faraday-1.0.gemfile
rvm: "2.0"
- gemfile: gemfiles/faraday-1.0.gemfile
rvm: "2.1"
- gemfile: gemfiles/faraday-1.0.gemfile
rvm: "2.2"
before_install:
- gem update bundler
script:
Expand Down
4 changes: 4 additions & 0 deletions gemfiles/faraday-0.8.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'faraday', '~> 0.8'
gemspec path: '../'
4 changes: 4 additions & 0 deletions gemfiles/faraday-1.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'faraday', '~> 1.0'
gemspec path: '../'
8 changes: 4 additions & 4 deletions hypernova.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec", "~> 3.4"
spec.add_development_dependency "simplecov", "~> 0.11"
spec.add_development_dependency "pry", "~> 0.10"
# this is pinned because ruby devs hate semver
# see https://github.com/bblimke/webmock/issues/667
spec.add_development_dependency "webmock", "=2.1.0"
spec.add_development_dependency "webmock", "= 2.3.2"
# crack gem added REXML to its dependency at v0.4.5, but it causes an error when used on Ruby 1.9
spec.add_development_dependency "crack", "< 0.4.5"
# below works around travis-ci requiring github-pages-health-check, whose subdep public_suffix
# stopped being compatible with ruby 1.9
# see https://github.com/weppos/publicsuffix-ruby/issues/127
spec.add_development_dependency "public_suffix", "=1.4.6"

spec.add_runtime_dependency "faraday", "~> 0.8"
spec.add_runtime_dependency "faraday", ">= 0.8"
end
6 changes: 5 additions & 1 deletion spec/faraday_connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
}).
and_call_original

expect(described_class.build.builder.handlers).to include(Faraday::Adapter::NetHttp)
if Gem.loaded_specs['faraday'].version >= Gem::Version.new("1.0.0")
expect(described_class.build.builder.adapter).to eq(Faraday::Adapter::NetHttp)
else
expect(described_class.build.builder.handlers).to include(Faraday::Adapter::NetHttp)
end
end
end
end