deprecation_toolkit 2.2.4 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 928c5fd8932b5f69fd9a51ea255ff5db6977fedc011c9ff211de0e3d73f4cc4e
4
- data.tar.gz: f514ee0194329683cad36aa454280acaa0a8ecd84ba02d698b45b7b1c84cf0f8
3
+ metadata.gz: 1d780d3c9ef2ad886d0d267a6a3d7e6e5b335cdfef2bb47ea462f285e975e703
4
+ data.tar.gz: 51eb2e75cee43f91cfa3834baa9640b7c487b1e2b4d6ed8a62c714df84fe4c5c
5
5
  SHA512:
6
- metadata.gz: 65c66a322df4cfcd5977531d5b0fa60221c096d8d36e7e653b2c9f6d571e175d1fa6a868b53d85c63c80e768a115b7813f65494a61697d96a9456c786a4267e9
7
- data.tar.gz: 149af66da445071b2b586373cffaf03f43d24b59210d102529b70024a8b5c94bdc5d465270ed2e25709e86133ebae43ba43946e4941fe888677c0d9ae1776257
6
+ metadata.gz: 2bdc3a73e47cd1341ff4cf34285d73ae5872b27a41343ae34fe447c502c979e1fb7c45dbde21eb4f590590770d2351c4c187b8a80a8310e27fb468874434bd80
7
+ data.tar.gz: 31c99027dc40530906abeb3dfded92f5672e25710ad0d7fcf32965a22c063b36bcb2ffbdb53af5f995b9b46ff5dd0d9a03211af2482997af3557cf773d0490e8
@@ -1,24 +1,41 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_support/configurable"
4
-
5
3
  module DeprecationToolkit
6
- class Configuration
7
- include ActiveSupport::Configurable
8
-
9
- config_accessor(:allowed_deprecations) { [] }
10
- config_accessor(:attach_to) { [:rails] }
11
- config_accessor(:behavior) { Behaviors::Raise }
12
- config_accessor(:deprecation_path) { "test/deprecations" }
13
- config_accessor(:test_runner) { :minitest }
14
- config_accessor(:warnings_treated_as_deprecation) { [] }
15
- config_accessor(:deprecation_file_path_format) do
16
- proc do |test|
17
- if DeprecationToolkit::Configuration.test_runner == :rspec
18
- test.example_group.file_path.sub(%r{^./spec/}, "").sub(/_spec.rb$/, "")
19
- else
20
- test.class.name.underscore
21
- end
4
+ module Configuration
5
+ @allowed_deprecations = []
6
+ singleton_class.attr_accessor(:allowed_deprecations)
7
+
8
+ @attach_to = [:rails]
9
+ singleton_class.attr_accessor(:attach_to)
10
+
11
+ @behavior = Behaviors::Raise
12
+ singleton_class.attr_accessor(:behavior)
13
+
14
+ @deprecation_path = "test/deprecations"
15
+ singleton_class.attr_accessor(:deprecation_path)
16
+
17
+ @test_runner = :minitest
18
+ singleton_class.attr_accessor(:test_runner)
19
+
20
+ @warnings_treated_as_deprecation = []
21
+ singleton_class.attr_accessor(:warnings_treated_as_deprecation)
22
+
23
+ @deprecation_file_path_format = proc do |test|
24
+ if DeprecationToolkit::Configuration.test_runner == :rspec
25
+ test.example_group.file_path.sub(%r{^./spec/}, "").sub(/_spec.rb$/, "")
26
+ else
27
+ test.class.name.underscore
28
+ end
29
+ end
30
+ singleton_class.attr_accessor(:deprecation_file_path_format)
31
+
32
+ class << self
33
+ def configure
34
+ yield self
35
+ end
36
+
37
+ def config
38
+ self
22
39
  end
23
40
  end
24
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationToolkit
4
- VERSION = "2.2.4"
4
+ VERSION = "2.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprecation_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '6.1'
18
+ version: '7.0'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '6.1'
25
+ version: '7.0'
26
26
  email:
27
27
  - rails@shopify.com
28
28
  executables: []
@@ -53,7 +53,7 @@ licenses:
53
53
  - MIT
54
54
  metadata:
55
55
  homepage_uri: https://github.com/shopify/deprecation_toolkit
56
- source_code_uri: https://github.com/Shopify/deprecation_toolkit/tree/v2.2.4
56
+ source_code_uri: https://github.com/Shopify/deprecation_toolkit/tree/v2.3.0
57
57
  changelog_uri: https://github.com/Shopify/deprecation_toolkit/blob/main/CHANGELOG.md
58
58
  allowed_push_host: https://rubygems.org
59
59
  rdoc_options: []
@@ -63,14 +63,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 3.0.0
66
+ version: 3.2.0
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
- rubygems_version: 3.7.1
73
+ rubygems_version: 3.7.2
74
74
  specification_version: 4
75
75
  summary: Deprecation Toolkit around ActiveSupport::Deprecation
76
76
  test_files: []