Skip to content

Commit 098bdbe

Browse files
committed
Merge branch '0.1x' into reship-0.17.2
2 parents 0d3ee6f + e8a6662 commit 098bdbe

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/faraday/deprecate.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ def ===(other)
4646
# end
4747
module Deprecate
4848
def self.skip # :nodoc:
49-
@skip ||= false
49+
@skip ||= begin
50+
case ENV['FARADAY_DEPRECATE'].to_s.downcase
51+
when '1', 'warn' then :warn
52+
else :skip
53+
end
54+
end
55+
@skip == :skip
5056
end
5157

5258
def self.skip=(value) # :nodoc:
53-
@skip = value
59+
@skip = value ? :skip : :warn
5460
end
5561

5662
# Temporarily turn off warnings. Intended for tests only.

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'faraday'
4+
Faraday::Deprecate.skip = false
45

56
# This file was generated by the `rspec --init` command. Conventionally, all
67
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.

0 commit comments

Comments
 (0)