deprecation_toolkit 2.3.0 → 2.4.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e0fdc8f5fbba44721aa51696b6f183771568af945b846d53edbcacc84b3aeb4
|
|
4
|
+
data.tar.gz: dffb18987c119ab631d2d6d503e56b87b884cb8bfd683e2c99a786961d205fa9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de19002fca2ba8619af71a0dc485b225bde5d5414f04f9b43e9a869e49612994d8c1c66bd4a3ab93353341f44ce986f1df2af8dd5fe59b8aa557938c3f1265ec
|
|
7
|
+
data.tar.gz: c55e0e431a1585c1ea24fcd460b0a6a06153f788462093257196891302875f27ea15c6b2671d30c4bd5b2258572c7c7900cdf569fca200fc92e8f3ab3fcf0495
|
|
@@ -29,6 +29,11 @@ module DeprecationToolkit
|
|
|
29
29
|
end
|
|
30
30
|
singleton_class.attr_accessor(:deprecation_file_path_format)
|
|
31
31
|
|
|
32
|
+
@deprecation_test_name_normalize = proc do |test_name|
|
|
33
|
+
test_name
|
|
34
|
+
end
|
|
35
|
+
singleton_class.attr_accessor(:deprecation_test_name_normalize)
|
|
36
|
+
|
|
32
37
|
class << self
|
|
33
38
|
def configure
|
|
34
39
|
yield self
|
|
@@ -9,7 +9,22 @@ module DeprecationToolkit
|
|
|
9
9
|
module ReadWriteHelper
|
|
10
10
|
def read(test)
|
|
11
11
|
deprecation_file = Bundler.root.join(recorded_deprecations_path(test))
|
|
12
|
-
YAML.load(deprecation_file.read)
|
|
12
|
+
data = YAML.load(deprecation_file.read)
|
|
13
|
+
name = test_name(test)
|
|
14
|
+
|
|
15
|
+
# Fast path: exact match
|
|
16
|
+
return data[name] if data.key?(name)
|
|
17
|
+
|
|
18
|
+
# Fallback: match by normalized name (handles tag addition/removal)
|
|
19
|
+
normalized_name = normalized_test_name(name)
|
|
20
|
+
return data[normalized_name] if data.key?(normalized_name)
|
|
21
|
+
|
|
22
|
+
# Fallback: iterate over all normalized keys
|
|
23
|
+
data.each do |key, deprecations|
|
|
24
|
+
return deprecations if normalized_test_name(key) == normalized_name
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
[]
|
|
13
28
|
rescue Errno::ENOENT
|
|
14
29
|
[]
|
|
15
30
|
end
|
|
@@ -19,6 +34,10 @@ module DeprecationToolkit
|
|
|
19
34
|
updated_deprecations = original_deprecations.dup
|
|
20
35
|
|
|
21
36
|
deprecations_to_record.each do |test, deprecation_to_record|
|
|
37
|
+
# Remove any stale key that normalizes to the same name
|
|
38
|
+
normalized = normalized_test_name(test)
|
|
39
|
+
updated_deprecations.delete_if { |key, _| key != test && normalized_test_name(key) == normalized }
|
|
40
|
+
|
|
22
41
|
if deprecation_to_record.any?
|
|
23
42
|
updated_deprecations[test] = deprecation_to_record
|
|
24
43
|
else
|
|
@@ -63,5 +82,9 @@ module DeprecationToolkit
|
|
|
63
82
|
test.name
|
|
64
83
|
end
|
|
65
84
|
end
|
|
85
|
+
|
|
86
|
+
def normalized_test_name(name)
|
|
87
|
+
DeprecationToolkit::Configuration.deprecation_test_name_normalize.call(name)
|
|
88
|
+
end
|
|
66
89
|
end
|
|
67
90
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deprecation_toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -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.
|
|
56
|
+
source_code_uri: https://github.com/Shopify/deprecation_toolkit/tree/v2.4.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.
|
|
66
|
+
version: 3.3.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.
|
|
73
|
+
rubygems_version: 3.6.2
|
|
74
74
|
specification_version: 4
|
|
75
75
|
summary: Deprecation Toolkit around ActiveSupport::Deprecation
|
|
76
76
|
test_files: []
|