diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f4462e..c77fa26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,14 +17,11 @@ jobs: gemfile: - Gemfile include: - # See https://github.com/dblock/strava-ruby-client/issues/113: json - # 2.x is the version this gem currently supports. json_3 is - # commented out until Faraday's :json middleware supports json >= - # 3.0, since it currently fails (Faraday::ParsingError). + # See https://github.com/dblock/strava-ruby-client/issues/113. - ruby-version: "3.4" gemfile: gemfiles/json_2.gemfile - # - ruby-version: "3.4" - # gemfile: gemfiles/json_3.gemfile + - ruby-version: "3.4" + gemfile: gemfiles/json_3.gemfile env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} steps: diff --git a/Appraisals b/Appraisals index f04553b..9105571 100644 --- a/Appraisals +++ b/Appraisals @@ -1,10 +1,7 @@ # frozen_string_literal: true -# Tests the gem against the two major json releases that are relevant to -# https://github.com/dblock/strava-ruby-client/issues/113: json < 3.0, where -# JSON.parse accepts a positional options hash (the form Faraday's :json -# response middleware uses), and json >= 3.0, where JSON.parse only accepts -# keyword arguments and Faraday's call raises an ArgumentError. +# Tests the gem against the two major json releases relevant to +# https://github.com/dblock/strava-ruby-client/issues/113. appraise 'json-2' do gem 'json', '~> 2.3' end diff --git a/CHANGELOG.md b/CHANGELOG.md index 36a6601..7941575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 3.1.1 (Next) * [#113](https://github.com/dblock/strava-ruby-client/issues/113): Adds Appraisals (`json-2`, `json-3`) - [@dblock](https://github.com/dblock). +* [#113](https://github.com/dblock/strava-ruby-client/issues/113): Supports `json` gem >= 3.0 by requiring Faraday >= 2.14.4 - [@dblock](https://github.com/dblock). * Your contribution here. ### 3.1.0 (2026/08/29) diff --git a/Gemfile b/Gemfile index 3bbd50f..e102e48 100755 --- a/Gemfile +++ b/Gemfile @@ -4,12 +4,6 @@ source 'http://rubygems.org' gemspec -# Faraday's :json response middleware is incompatible with json >= 3.0 (see -# https://github.com/dblock/strava-ruby-client/issues/113), so pin json here -# rather than relying on rubocop's own transitive constraint. The `json-3` -# appraisal (see Appraisals) is used to track when this can be removed. -gem 'json', '~> 2.3' - group :development, :test do gem 'appraisal' gem 'csv' diff --git a/strava-ruby-client.gemspec b/strava-ruby-client.gemspec index 86d4c5e..59b35ab 100644 --- a/strava-ruby-client.gemspec +++ b/strava-ruby-client.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.licenses = ['MIT'] s.summary = 'Strava API Ruby client.' s.add_dependency 'activesupport' - s.add_dependency 'faraday', '>= 2.0' + s.add_dependency 'faraday', '>= 2.14.4' s.add_dependency 'faraday-multipart', '>= 1.0' s.add_dependency 'hashie' s.metadata['rubygems_mfa_required'] = 'true'