Skip to content

Commit

Permalink
include just for test/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
balvig committed Apr 14, 2022
1 parent 084c72e commit bcd58dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ workflows:
parameters:
rails_version: ["~> 4.0"]
ruby_version: ["2.6.9"]
faraday_version: ["< 1.0"]
faraday_version: ["< 2.0"]
- build:
matrix:
alias: Rails 5
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in spyke.gemspec
gemspec

if ENV['FARADAY_TEST_VERSION'] == '< 2.0'
gem 'faraday_middleware'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ So, for example for an API that returns JSON like this:
```ruby
# config/initializers/spyke.rb

class JSONParser < Faraday::Middleware # Faraday::Response::Middleware for Faraday v1.0
class JSONParser < Faraday::Middleware
def on_complete(env)
json = MultiJson.load(env.body, symbolize_keys: true)
env.body = {
Expand Down
2 changes: 1 addition & 1 deletion spyke.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'activesupport', ENV.fetch('RAILS_TEST_VERSION', '>= 4.0.0')
spec.add_dependency 'activemodel', ENV.fetch('RAILS_TEST_VERSION', '>= 4.0.0')
spec.add_dependency 'faraday', ENV.fetch('FARADAY_TEST_VERSION', '>= 0.9.0'), '< 3.0'
spec.add_dependency 'faraday', ENV.fetch('FARADAY_TEST_VERSION', '>= 1.0.0'), '< 3.0'
spec.add_dependency 'faraday-multipart', '~> 1.0'
spec.add_dependency 'addressable', '>= 2.5.2'

Expand Down

0 comments on commit bcd58dc

Please sign in to comment.