deprecation_toolkit 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/lib/deprecation_toolkit/behaviors/raise.rb +4 -0
- data/lib/deprecation_toolkit/version.rb +1 -1
- metadata +4 -19
- data/.gitignore +0 -10
- data/.rspec +0 -4
- data/.rubocop.yml +0 -15
- data/.ruby-version +0 -1
- data/CHANGELOG.md +0 -85
- data/Gemfile +0 -17
- data/Gemfile.lock +0 -89
- data/RELEASE.md +0 -21
- data/Rakefile +0 -13
- data/deprecation_toolkit.gemspec +0 -31
- data/shipit.rubygems.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6764813c0b9b8522fa1e755f59e4f3e7137fa229a24e5b96ae05fbcbd53efdc7
|
4
|
+
data.tar.gz: 5e570bcbf742061e36c5aeb4b1073a3ba546c47e5caefaba2b1d33abaaf1c037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c851ca5d25bdaed7522be6f1736766bd92a66f454993ec060c048fe6f09feb9f28d3d7c608ba248a31492b8c6656782871507d6e9fd138af85e03b53446dda7
|
7
|
+
data.tar.gz: f8ba1b548b6cde09de40768dce5f2b79ba23dd3bf69620cc6255520efc6fe11c4f8839978d7f0d1ecfa1f0c77307ddf2743cd219d1834ae181f3f762d2f3a80a
|
data/README.md
CHANGED
@@ -172,7 +172,22 @@ DEPRECATION_BEHAVIOR="record" bundle exec rspec path/to/file_spec.rb
|
|
172
172
|
|
173
173
|
## Usage without Rails
|
174
174
|
|
175
|
-
Without Rails, you'll need to make sure your `ActiveSupport::Deprecation` instances use the [`:notify` behavior](https://api.rubyonrails.org/classes/ActiveSupport/Deprecation/Behavior.html#method-i-behavior-3D)
|
175
|
+
Without Rails, you'll need to make sure your `ActiveSupport::Deprecation` instances use the [`:notify` behavior](https://api.rubyonrails.org/classes/ActiveSupport/Deprecation/Behavior.html#method-i-behavior-3D) and the `attach_to` is the underscored version of the deprecator's `gem_name` (this is how the `:notify` behavior works):
|
176
|
+
|
177
|
+
```ruby
|
178
|
+
# defined in the gem:
|
179
|
+
MyGem.deprecator = ActiveSupport::Deprecation.new("2.0", "MyGem::Something")
|
180
|
+
|
181
|
+
# in the test helper:
|
182
|
+
MyGem.deprecator.behavior = :notify
|
183
|
+
|
184
|
+
DeprecationToolkit::Configuration.configure do |config|
|
185
|
+
config.attach_to = MyGem.deprecator.gem_name.underscore.tr("/", "_")
|
186
|
+
# or more simply
|
187
|
+
# config.attach_to = "my_gem_something"
|
188
|
+
config.behavior = :notify
|
189
|
+
end
|
190
|
+
```
|
176
191
|
|
177
192
|
## License
|
178
193
|
|
@@ -34,7 +34,9 @@ module DeprecationToolkit
|
|
34
34
|
You have introduced new deprecations in the codebase. Fix or record them in order to discard this error.
|
35
35
|
#{record_message}
|
36
36
|
|
37
|
+
******* The following deprecations were added: *******
|
37
38
|
#{introduced_deprecations.join("\n")}
|
39
|
+
******************************************************
|
38
40
|
EOM
|
39
41
|
|
40
42
|
super(message)
|
@@ -57,7 +59,9 @@ module DeprecationToolkit
|
|
57
59
|
The recorded deprecations needs to be updated to reflect your changes.
|
58
60
|
#{record_message}
|
59
61
|
|
62
|
+
****** The following deprecations were removed: ******
|
60
63
|
#{removed_deprecations.join("\n")}
|
64
|
+
******************************************************
|
61
65
|
EOM
|
62
66
|
|
63
67
|
super(message)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deprecation_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -24,25 +23,14 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '6.1'
|
27
|
-
description:
|
28
26
|
email:
|
29
27
|
- rails@shopify.com
|
30
28
|
executables: []
|
31
29
|
extensions: []
|
32
30
|
extra_rdoc_files: []
|
33
31
|
files:
|
34
|
-
- ".gitignore"
|
35
|
-
- ".rspec"
|
36
|
-
- ".rubocop.yml"
|
37
|
-
- ".ruby-version"
|
38
|
-
- CHANGELOG.md
|
39
|
-
- Gemfile
|
40
|
-
- Gemfile.lock
|
41
32
|
- LICENSE.txt
|
42
33
|
- README.md
|
43
|
-
- RELEASE.md
|
44
|
-
- Rakefile
|
45
|
-
- deprecation_toolkit.gemspec
|
46
34
|
- lib/deprecation_toolkit.rb
|
47
35
|
- lib/deprecation_toolkit/behaviors/ci_record_helper.rb
|
48
36
|
- lib/deprecation_toolkit/behaviors/disabled.rb
|
@@ -60,16 +48,14 @@ files:
|
|
60
48
|
- lib/deprecation_toolkit/warning.rb
|
61
49
|
- lib/minitest/deprecation_toolkit_plugin.rb
|
62
50
|
- lib/tasks/ci_recorder.rake
|
63
|
-
- shipit.rubygems.yml
|
64
51
|
homepage: https://github.com/shopify/deprecation_toolkit
|
65
52
|
licenses:
|
66
53
|
- MIT
|
67
54
|
metadata:
|
68
55
|
homepage_uri: https://github.com/shopify/deprecation_toolkit
|
69
|
-
source_code_uri: https://github.com/
|
56
|
+
source_code_uri: https://github.com/Shopify/deprecation_toolkit/tree/v2.2.2
|
70
57
|
changelog_uri: https://github.com/Shopify/deprecation_toolkit/blob/main/CHANGELOG.md
|
71
58
|
allowed_push_host: https://rubygems.org
|
72
|
-
post_install_message:
|
73
59
|
rdoc_options: []
|
74
60
|
require_paths:
|
75
61
|
- lib
|
@@ -84,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
70
|
- !ruby/object:Gem::Version
|
85
71
|
version: '0'
|
86
72
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
88
|
-
signing_key:
|
73
|
+
rubygems_version: 3.6.2
|
89
74
|
specification_version: 4
|
90
75
|
summary: Deprecation Toolkit around ActiveSupport::Deprecation
|
91
76
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.3.0
|
data/CHANGELOG.md
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
# Change log
|
2
|
-
|
3
|
-
## main (unreleased)
|
4
|
-
|
5
|
-
## 2.2.0 (2024-02-05)
|
6
|
-
|
7
|
-
* Restore Rails 6.1 compatibility.
|
8
|
-
* Accept anything that responds to `===` in `Configuration.warnings_treated_as_deprecation`.
|
9
|
-
|
10
|
-
## 2.1.0 (2024-01-19)
|
11
|
-
|
12
|
-
* [#99](https://github.com/Shopify/deprecation_toolkit/pull/99): Fix `Warning.warn` hook to accept a category.
|
13
|
-
* [#95](https://github.com/Shopify/deprecation_toolkit/pull/95): Allow configuration of deprecation file paths and file names.
|
14
|
-
|
15
|
-
## 2.0.4 (2023-11-20)
|
16
|
-
|
17
|
-
* [#90](https://github.com/Shopify/deprecation_toolkit/pull/90) & [#93](https://github.com/Shopify/deprecation_toolkit/pull/93): Stop using deprecated behavior from Active Support. (@etiennebarrie)
|
18
|
-
* [#91](https://github.com/Shopify/deprecation_toolkit/pull/91): Require necessary Active Support core extension. (@etiennebarrie)
|
19
|
-
|
20
|
-
## 2.0.3 (2023-02-10)
|
21
|
-
|
22
|
-
* [#80](https://github.com/Shopify/deprecation_toolkit/pull/80): Filter out stack trace from Gem::Deprecate deprecation messages (@davidstosik)
|
23
|
-
|
24
|
-
## 2.0.2 (2023-02-08)
|
25
|
-
|
26
|
-
* [#78](https://github.com/Shopify/deprecation_toolkit/pull/78): Show deprecations without stacktrace. (@shioyama)
|
27
|
-
|
28
|
-
## 2.0.1 (2022-11-18)
|
29
|
-
|
30
|
-
* [#74](https://github.com/Shopify/deprecation_toolkit/pull/74): Add support for `Rails.application.deprecators`. (@gmcgibbon)
|
31
|
-
|
32
|
-
## 2.0.0 (2022-03-16)
|
33
|
-
|
34
|
-
* [#58](https://github.com/Shopify/deprecation_toolkit/pull/58): Drop support for Ruby < 2.6 & Active Support < 5.2. (@sambostock)
|
35
|
-
* [#58](https://github.com/Shopify/deprecation_toolkit/pull/58): Ensure compatibility with Rails 7. (@sambostock)
|
36
|
-
|
37
|
-
## 1.5.1 (2020-04-28)
|
38
|
-
|
39
|
-
* [#46](https://github.com/Shopify/deprecation_toolkit/pull/46): Handle another two part Ruby 2.7 keyword argument deprecation warning. (@casperisfine)
|
40
|
-
|
41
|
-
## 1.5.0 (2020-04-14)
|
42
|
-
|
43
|
-
* [#42](https://github.com/Shopify/deprecation_toolkit/pull/42): Fix Minitest plugin kicking in when it shouldn't. (@Edouard-chin)
|
44
|
-
* [#45](https://github.com/Shopify/deprecation_toolkit/pull/45): Handle two part Ruby 2.7 keyword argument deprecation warning. (@casperisfine)
|
45
|
-
|
46
|
-
## 1.4.0 (2019-04-29)
|
47
|
-
|
48
|
-
* [#37](https://github.com/Shopify/deprecation_toolkit/pull/37): Add Rspec support. (@andrewmarkle)
|
49
|
-
|
50
|
-
## 1.3.0 (2019-02-28)
|
51
|
-
|
52
|
-
* [#38](https://github.com/Shopify/deprecation_toolkit/pull/38): Add a way to mark test as flaky. (@Edouard-chin)
|
53
|
-
* [#39](https://github.com/Shopify/deprecation_toolkit/pull/39): Introduced a way to help recording massive amount of deprecations. (@Edouard-chin)
|
54
|
-
|
55
|
-
## 1.2.1 (2019-01-09)
|
56
|
-
|
57
|
-
### Bug fixes
|
58
|
-
* [#34](https://github.com/Shopify/deprecation_toolkit/pull/34): Fixes SystemStackError with RubyGems v3 and Ruby 2.5+. (@dylanahsmith)
|
59
|
-
|
60
|
-
## 1.2.0 (2018-11-28)
|
61
|
-
|
62
|
-
### New features
|
63
|
-
|
64
|
-
* [#30](https://github.com/Shopify/deprecation_toolkit/pull/30): Introduce a `DeprecationMismatch` error class. (@Edouard-chin)
|
65
|
-
### Bug fixes
|
66
|
-
* [#29](https://github.com/Shopify/deprecation_toolkit/pull/29): Fix issue where the error class triggered was incorrect in some circumstances. (@Edouard-chin)
|
67
|
-
|
68
|
-
## 1.1.0 (2018-11-13)
|
69
|
-
|
70
|
-
### New features
|
71
|
-
|
72
|
-
* [#28](https://github.com/Shopify/deprecation_toolkit/pull/28): `Configuration.allowed_deprecations` now accepts Procs.
|
73
|
-
This is useful if you need to whitelist deprecations based on the caller.
|
74
|
-
|
75
|
-
## 1.0.3 (2018-10-25)
|
76
|
-
|
77
|
-
### Bug fixes
|
78
|
-
|
79
|
-
* [#22](https://github.com/Shopify/deprecation_toolkit/pull/22): Fixes `Kernel.warn` not triggering deprecation. (@rmacklin)
|
80
|
-
|
81
|
-
## 1.0.2 (2018-10-01)
|
82
|
-
|
83
|
-
### New features
|
84
|
-
|
85
|
-
* [#15](https://github.com/Shopify/deprecation_toolkit/pull/15): Add support for ActiveSupport 4.2. (@andrewmarkle)
|
data/Gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
gem "bundler"
|
8
|
-
gem "minitest"
|
9
|
-
gem "rake"
|
10
|
-
gem "rspec"
|
11
|
-
gem "rubocop-shopify"
|
12
|
-
|
13
|
-
if defined?(@activesupport_gem_requirement) && @activesupport_gem_requirement
|
14
|
-
# causes Dependabot to ignore the next line
|
15
|
-
activesupport = "activesupport"
|
16
|
-
gem activesupport, @activesupport_gem_requirement
|
17
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
deprecation_toolkit (2.2.1)
|
5
|
-
activesupport (>= 6.1)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activesupport (7.1.3.4)
|
11
|
-
base64
|
12
|
-
bigdecimal
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
connection_pool (>= 2.2.5)
|
15
|
-
drb
|
16
|
-
i18n (>= 1.6, < 2)
|
17
|
-
minitest (>= 5.1)
|
18
|
-
mutex_m
|
19
|
-
tzinfo (~> 2.0)
|
20
|
-
ast (2.4.2)
|
21
|
-
base64 (0.2.0)
|
22
|
-
bigdecimal (3.1.8)
|
23
|
-
concurrent-ruby (1.3.3)
|
24
|
-
connection_pool (2.4.1)
|
25
|
-
diff-lcs (1.5.1)
|
26
|
-
drb (2.2.1)
|
27
|
-
i18n (1.14.5)
|
28
|
-
concurrent-ruby (~> 1.0)
|
29
|
-
json (2.7.2)
|
30
|
-
language_server-protocol (3.17.0.3)
|
31
|
-
minitest (5.25.1)
|
32
|
-
mutex_m (0.2.0)
|
33
|
-
parallel (1.24.0)
|
34
|
-
parser (3.3.1.0)
|
35
|
-
ast (~> 2.4.1)
|
36
|
-
racc
|
37
|
-
racc (1.7.3)
|
38
|
-
rainbow (3.1.1)
|
39
|
-
rake (13.2.1)
|
40
|
-
regexp_parser (2.9.2)
|
41
|
-
rexml (3.3.6)
|
42
|
-
strscan
|
43
|
-
rspec (3.13.0)
|
44
|
-
rspec-core (~> 3.13.0)
|
45
|
-
rspec-expectations (~> 3.13.0)
|
46
|
-
rspec-mocks (~> 3.13.0)
|
47
|
-
rspec-core (3.13.0)
|
48
|
-
rspec-support (~> 3.13.0)
|
49
|
-
rspec-expectations (3.13.0)
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.13.0)
|
52
|
-
rspec-mocks (3.13.1)
|
53
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.13.0)
|
55
|
-
rspec-support (3.13.1)
|
56
|
-
rubocop (1.63.5)
|
57
|
-
json (~> 2.3)
|
58
|
-
language_server-protocol (>= 3.17.0)
|
59
|
-
parallel (~> 1.10)
|
60
|
-
parser (>= 3.3.0.2)
|
61
|
-
rainbow (>= 2.2.2, < 4.0)
|
62
|
-
regexp_parser (>= 1.8, < 3.0)
|
63
|
-
rexml (>= 3.2.5, < 4.0)
|
64
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
65
|
-
ruby-progressbar (~> 1.7)
|
66
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
67
|
-
rubocop-ast (1.31.3)
|
68
|
-
parser (>= 3.3.1.0)
|
69
|
-
rubocop-shopify (2.15.1)
|
70
|
-
rubocop (~> 1.51)
|
71
|
-
ruby-progressbar (1.13.0)
|
72
|
-
strscan (3.1.0)
|
73
|
-
tzinfo (2.0.6)
|
74
|
-
concurrent-ruby (~> 1.0)
|
75
|
-
unicode-display_width (2.5.0)
|
76
|
-
|
77
|
-
PLATFORMS
|
78
|
-
ruby
|
79
|
-
|
80
|
-
DEPENDENCIES
|
81
|
-
bundler
|
82
|
-
deprecation_toolkit!
|
83
|
-
minitest
|
84
|
-
rake
|
85
|
-
rspec
|
86
|
-
rubocop-shopify
|
87
|
-
|
88
|
-
BUNDLED WITH
|
89
|
-
2.5.10
|
data/RELEASE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# Contribution to Deprecation Toolkit
|
2
|
-
|
3
|
-
## Releasing a new version
|
4
|
-
|
5
|
-
1. Audit PRs and commits merged since the last release, ensuring **all user fancing changes are documented** in `CHANGELOG.md`.
|
6
|
-
2. Based on the changes, determine whether to increment the major, minor, or patch version, adhering to [Semantic Versioning][semver].
|
7
|
-
3. Update the gem version string accordingly in `lib/deprecation_toolkit/version.rb`.
|
8
|
-
4. Run `bundle install` to update the `Gemfile.lock`.
|
9
|
-
5. Insert a new heading in `CHANGELOG.md` containing the version identifier and expected release date (e.g. `## 1.2.3 (1999-12-31)`).
|
10
|
-
6. Commit changes on a new branch and open a PR.
|
11
|
-
7. **Draft** a [new release][github-new-release] on GitHub, but **do not publish it yet**.
|
12
|
-
8. Once you have received approval on your PR, merge it into `main`.
|
13
|
-
9. Deploy using the [ShipIt][shipit] UI, and **verify** the new version is available on [RubyGems][rubygems].
|
14
|
-
10. Publish the drafted release, tagging the deployed commit (should be `HEAD` of the `main` branch) with a tag of the form `vMAJOR.MINOR.PATCH`.
|
15
|
-
|
16
|
-
If something goes wrong during the deploy process, address it and tag whatever commit was successfully deployed as that version.
|
17
|
-
|
18
|
-
[semver]: https://semver.org
|
19
|
-
[github-new-release]: https://github.com/Shopify/deprecation_toolkit/releases/new
|
20
|
-
[shipit]: https://shipit.shopify.io/shopify/deprecation_toolkit/rubygems
|
21
|
-
[rubygems]: https://rubygems.org/gems/deprecation_toolkit/versions
|
data/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require "rake/testtask"
|
5
|
-
|
6
|
-
Rake::TestTask.new(:test) do |t|
|
7
|
-
t.libs << "test"
|
8
|
-
t.libs << "lib"
|
9
|
-
t.warning = true
|
10
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
11
|
-
end
|
12
|
-
|
13
|
-
task(default: :test)
|
data/deprecation_toolkit.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path("lib", __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "deprecation_toolkit/version"
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = "deprecation_toolkit"
|
9
|
-
spec.version = DeprecationToolkit::VERSION
|
10
|
-
spec.authors = ["Shopify"]
|
11
|
-
spec.email = ["rails@shopify.com"]
|
12
|
-
|
13
|
-
spec.summary = "Deprecation Toolkit around ActiveSupport::Deprecation"
|
14
|
-
spec.homepage = "https://github.com/shopify/deprecation_toolkit"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
-
spec.metadata["source_code_uri"] = "https://github.com/shopify/deprecation_toolkit"
|
19
|
-
spec.metadata["changelog_uri"] = "https://github.com/Shopify/deprecation_toolkit/blob/main/CHANGELOG.md"
|
20
|
-
|
21
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
22
|
-
|
23
|
-
spec.required_ruby_version = ">= 3.0.0"
|
24
|
-
|
25
|
-
spec.files = %x(git ls-files -z).split("\x0").reject do |f|
|
26
|
-
f.match(%r{^(test|spec|\.github|gemfiles)/})
|
27
|
-
end
|
28
|
-
spec.require_paths = ["lib"]
|
29
|
-
|
30
|
-
spec.add_runtime_dependency("activesupport", ">= 6.1")
|
31
|
-
end
|
data/shipit.rubygems.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# using the default shipit config
|