deprecation_toolkit 2.0.1 → 2.0.3
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 +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +5 -5
- data/deprecation_toolkit.gemspec +1 -1
- data/lib/deprecation_toolkit/behaviors/raise.rb +2 -2
- data/lib/deprecation_toolkit/collector.rb +17 -5
- data/lib/deprecation_toolkit/read_write_helper.rb +1 -1
- data/lib/deprecation_toolkit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a215b859ad3948057d353332378a89f8ff22199296677f2ecab9f318d24a73b3
|
4
|
+
data.tar.gz: 99a5d3368ab2a066a4118ba0330a913223214ba686c5779138cc685610eea4ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6b2c17228b8091e8d2260fb6aa001153b859fcc029412133552b6fb074cb547735bbd27e1194c36128f390658c4e8b82e76018244388a91a56528f6fad05256
|
7
|
+
data.tar.gz: 4199799c0190b92530119d4ad093e359a6b076f35a1ceb039081bbdf6c0b26bd3731cd36fedb6f6025e3bc4bedd7fc38cd43c13e21652b7a3ac898a9a86c3d37
|
data/.github/workflows/ci.yml
CHANGED
@@ -9,7 +9,7 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
gemfile: [gemfiles/activesupport_5.2.gemfile, gemfiles/activesupport_6.0.gemfile, gemfiles/activesupport_6.1.gemfile, gemfiles/activesupport_7.0.gemfile, gemfiles/activesupport_edge.gemfile]
|
12
|
-
ruby: ["2.
|
12
|
+
ruby: ["2.7", "3.0", "3.1", "3.2"]
|
13
13
|
exclude:
|
14
14
|
# Active Support requires Ruby >= 2.7 as of 7.0
|
15
15
|
- gemfile: "gemfiles/activesupport_7.0.gemfile"
|
@@ -43,7 +43,7 @@ jobs:
|
|
43
43
|
|
44
44
|
- uses: ruby/setup-ruby@v1
|
45
45
|
with:
|
46
|
-
ruby-version: "3.
|
46
|
+
ruby-version: "3.2"
|
47
47
|
bundler-cache: true
|
48
48
|
|
49
49
|
- name: RuboCop
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## main (unreleased)
|
4
4
|
|
5
|
+
## 2.0.3 (2023-02-10)
|
6
|
+
|
7
|
+
* [#80](https://github.com/Shopify/deprecation_toolkit/pull/80): Filter out stack trace from Gem::Deprecate deprecation messages
|
8
|
+
|
9
|
+
## 2.0.2 (2023-02-08)
|
10
|
+
|
11
|
+
* [#78](https://github.com/Shopify/deprecation_toolkit/pull/78): Show deprecations without stacktrace. (@shioyama)
|
12
|
+
|
5
13
|
## 2.0.1 (2022-11-18)
|
6
14
|
|
7
15
|
* [#74](https://github.com/Shopify/deprecation_toolkit/pull/74): Add support for `Rails.application.deprecators`. (@gmcgibbon)
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
deprecation_toolkit (2.0.
|
4
|
+
deprecation_toolkit (2.0.3)
|
5
5
|
activesupport (>= 5.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (7.0.4)
|
10
|
+
activesupport (7.0.4.2)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 1.6, < 2)
|
13
13
|
minitest (>= 5.1)
|
14
14
|
tzinfo (~> 2.0)
|
15
15
|
ast (2.4.2)
|
16
|
-
concurrent-ruby (1.
|
16
|
+
concurrent-ruby (1.2.0)
|
17
17
|
diff-lcs (1.5.0)
|
18
18
|
i18n (1.12.0)
|
19
19
|
concurrent-ruby (~> 1.0)
|
@@ -52,7 +52,7 @@ GEM
|
|
52
52
|
rubocop-shopify (2.5.0)
|
53
53
|
rubocop (~> 1.25)
|
54
54
|
ruby-progressbar (1.11.0)
|
55
|
-
tzinfo (2.0.
|
55
|
+
tzinfo (2.0.6)
|
56
56
|
concurrent-ruby (~> 1.0)
|
57
57
|
unicode-display_width (2.1.0)
|
58
58
|
|
@@ -68,4 +68,4 @@ DEPENDENCIES
|
|
68
68
|
rubocop-shopify
|
69
69
|
|
70
70
|
BUNDLED WITH
|
71
|
-
2.
|
71
|
+
2.4.4
|
data/deprecation_toolkit.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
22
22
|
|
23
|
-
spec.required_ruby_version = ">= 2.
|
23
|
+
spec.required_ruby_version = ">= 2.7"
|
24
24
|
|
25
25
|
spec.files = %x(git ls-files -z).split("\x0").reject do |f|
|
26
26
|
f.match(%r{^(test)/})
|
@@ -77,9 +77,9 @@ module DeprecationToolkit
|
|
77
77
|
#{record_message}
|
78
78
|
|
79
79
|
===== Expected
|
80
|
-
#{recorded_deprecations.
|
80
|
+
#{recorded_deprecations.deprecations_without_stacktrace.join("\n")}
|
81
81
|
===== Actual
|
82
|
-
#{current_deprecations.
|
82
|
+
#{current_deprecations.deprecations_without_stacktrace.join("\n")}
|
83
83
|
EOM
|
84
84
|
|
85
85
|
super(message)
|
@@ -35,11 +35,9 @@ module DeprecationToolkit
|
|
35
35
|
|
36
36
|
def deprecations_without_stacktrace
|
37
37
|
deprecations.map do |deprecation|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
deprecation.sub(/ \(called from .*\)$/, "")
|
42
|
-
end
|
38
|
+
deprecation
|
39
|
+
.sub(*active_support_deprecation_sub_params)
|
40
|
+
.sub(*gem_deprecate_sub_params)
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
@@ -63,5 +61,19 @@ module DeprecationToolkit
|
|
63
61
|
def flaky?
|
64
62
|
size == 1 && deprecations.first["flaky"] == true
|
65
63
|
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def active_support_deprecation_sub_params
|
68
|
+
if ActiveSupport.gem_version.to_s < "5.0"
|
69
|
+
[/\W\s\(called from .*\)$/, ""]
|
70
|
+
else
|
71
|
+
[/ \(called from .*\)$/, ""]
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def gem_deprecate_sub_params
|
76
|
+
[/NOTE: (.*is deprecated.*)\n.* called from.*:\d+\.\n/, "\\1"]
|
77
|
+
end
|
66
78
|
end
|
67
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deprecation_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '2.
|
95
|
+
version: '2.7'
|
96
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - ">="
|