Skip to content

Commit ee34253

Browse files
committed
💚 add backports to fix vcr on Ruby 2.4
1 parent 8509168 commit ee34253

File tree

6 files changed

+56
-7
lines changed

6 files changed

+56
-7
lines changed

.idea/oauth.iml

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.rubocop_gradual.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"lib/oauth/tokens/consumer_token.rb:3696415131": [
3535
[9, 5, 155, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 349576019]
3636
],
37-
"oauth.gemspec:3033391650": [
37+
"oauth.gemspec:1987611209": [
3838
[133, 3, 56, "Gemspec/DependencyVersion: Dependency version specification is required.", 644892567],
3939
[153, 3, 40, "Gemspec/DependencyVersion: Dependency version specification is required.", 2300588954],
4040
[155, 3, 44, "Gemspec/DependencyVersion: Dependency version specification is required.", 1905290578],

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ PLATFORMS
498498

499499
DEPENDENCIES
500500
appraisal2 (~> 3.0)
501+
backports (~> 3.25, >= 3.25.1)
501502
benchmark (~> 0.4, >= 0.4.1)
502503
bundler-audit (~> 0.9.2)
503504
debug (>= 1.1)

oauth.gemspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ Thanks, |7eter l-|. l3oling
190190
spec.add_development_dependency("gitmoji-regex", "~> 1.0", ">= 1.0.3") # ruby >= 2.3.0
191191

192192
# HTTP recording for deterministic specs
193-
# It seems that somehow just having a newer version of appraisal installed breaks
194-
# Ruby 2.3 and 2.4 even if their bundle specifies an older version,
195-
# and as a result it can only be a dependency in the appraisals.
193+
# Ruby 2.3 / 2.4 can fail with:
196194
# | An error occurred while loading spec_helper.
197195
# | Failure/Error: require "vcr"
198196
# |
@@ -202,6 +200,8 @@ Thanks, |7eter l-|. l3oling
202200
# | # ./spec/config/vcr.rb:3:in `<top (required)>'
203201
# | # ./spec/spec_helper.rb:8:in `require_relative'
204202
# | # ./spec/spec_helper.rb:8:in `<top (required)>'
205-
spec.add_development_dependency("vcr", ">= 4") # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
206-
spec.add_development_dependency("webmock", ">= 3") # Last version to support ruby >= 2.3
203+
# So that's why we need backports.
204+
spec.add_development_dependency("backports", "~> 3.25", ">= 3.25.1") # ruby >= 0
205+
spec.add_development_dependency("vcr", ">= 4") # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
206+
spec.add_development_dependency("webmock", ">= 3") # Last version to support ruby >= 2.3
207207
end

spec/ext/backports.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# frozen_string_literal: true
2+
3+
require "backports/2.5.0/hash/transform_keys"
4+
require "backports/2.5.0/string/delete_prefix"

spec/spec_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# frozen_string_literal: true
22

3-
# External libs
3+
# Global Extensions
4+
require_relative "ext/backports"
5+
6+
# External libraries
47
# N/A
58

69
# External RSpec & related config

0 commit comments

Comments
 (0)