Skip to content

Commit

Permalink
Merge pull request #21 from bhaberer/mg/faraday-2-support
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia committed Apr 11, 2024
2 parents 5a2dc1d + 3d39d47 commit ce6fded
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ jobs:

runs-on: ubuntu-latest

env:
FARADAY_VERSION: ${{ matrix.faraday-version }}

strategy:
matrix:
ruby-version: [3.1, "3.0", 2.7, 2.6]
ruby-version: ['3.0', 3.1, 3.2, 3.3]
faraday-version: ['~> 1.0', '~> 2.0']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require: rubocop-rspec

AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 3.0
SuggestExtensions: false
Exclude:
- vendor/**/*
- bin/**/*
Expand Down
13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,16 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in faraday-digestauth.gemspec
gemspec

install_if -> { ENV.fetch('FARADAY_VERSION', nil) } do
gem 'faraday', ENV.fetch('FARADAY_VERSION', nil)
end

gem 'coveralls', '~> 0.1'
gem 'rake', '~> 12.3'
gem 'rspec', '~> 3'
gem 'rubocop', '~> 1.62'
gem 'rubocop-packaging', '~> 0.5'
gem 'rubocop-performance', '~> 1.20'
gem 'rubocop-rspec', '~> 2.27'
gem 'webmock', '~> 3.23'
8 changes: 2 additions & 6 deletions faraday-digestauth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 3.0', '< 4'

spec.add_dependency 'faraday', '>= 0.7'
spec.add_dependency 'net-http-digest_auth', '~> 1.4'
spec.add_development_dependency 'coveralls', '~> 0.1'
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'rspec', '~> 3'
spec.add_development_dependency 'rubocop', '0.82.0'
spec.add_development_dependency 'rubocop-rspec', '1.39.0'
spec.add_development_dependency 'webmock', '~> 3.8.3'
end
10 changes: 6 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
require 'coveralls'
require 'simplecov'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
)
SimpleCov.start

require 'faraday/digestauth'
Expand Down

0 comments on commit ce6fded

Please sign in to comment.