retriable 3.5.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/spec/spec_helper.rb CHANGED
@@ -7,8 +7,21 @@ require "pry"
7
7
  require_relative "../lib/retriable"
8
8
  require_relative "support/exceptions"
9
9
 
10
+ # Make Retriable's deprecation notices observable to RSpec's
11
+ # `output().to_stderr` matcher. On Ruby 3.0+ the `:deprecated` warning category
12
+ # is suppressed by default, which would hide the notices we want to assert on.
13
+ WARNING_DEPRECATION_SUPPORTED = defined?(Warning) && Warning.respond_to?(:[])
14
+ Warning[:deprecated] = true if WARNING_DEPRECATION_SUPPORTED
15
+
16
+ # Used by deprecation specs that only make sense on Rubies where `Kernel#warn`
17
+ # supports the `category:` keyword (added in Ruby 2.7).
18
+ WARN_CATEGORY_SUPPORTED = WARNING_DEPRECATION_SUPPORTED &&
19
+ Kernel.method(:warn).parameters.include?(%i[key category])
20
+
10
21
  RSpec.configure do |config|
11
22
  config.before(:each) do
12
23
  srand(0)
24
+ Retriable::Config.timeout_deprecation_warned = false
25
+ Warning[:deprecated] = true if WARNING_DEPRECATION_SUPPORTED
13
26
  end
14
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: retriable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Chu
@@ -74,10 +74,12 @@ files:
74
74
  - Rakefile
75
75
  - bin/console
76
76
  - bin/setup
77
+ - docs/testing.md
77
78
  - lib/retriable.rb
78
79
  - lib/retriable/config.rb
79
80
  - lib/retriable/core_ext/kernel.rb
80
81
  - lib/retriable/exponential_backoff.rb
82
+ - lib/retriable/validation.rb
81
83
  - lib/retriable/version.rb
82
84
  - retriable.gemspec
83
85
  - sig/retriable.rbs