deprecation_toolkit 2.2.0 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 562db3c54971f9c7513f6777b6b351325772a467f3a12b9467aee8ae09faea7b
4
- data.tar.gz: 5d8bfeb8af3b883747c4b72a168e7504080f9e87260b65a67f9ecabe99071016
3
+ metadata.gz: 6764813c0b9b8522fa1e755f59e4f3e7137fa229a24e5b96ae05fbcbd53efdc7
4
+ data.tar.gz: 5e570bcbf742061e36c5aeb4b1073a3ba546c47e5caefaba2b1d33abaaf1c037
5
5
  SHA512:
6
- metadata.gz: 4a801c1cd12e35a705b89ecb7e3f2863be8ef488f29efb8537f7a858d86f68355cd571f22e4b16cd8b50b3c08b7b63e6ac187a12e9bcda184f268b41695b2a14
7
- data.tar.gz: 940e38840d651bd4cb2432b8d99c0cbdd78257fc8a5cce2175c60fbd40c0bca45a4ad66e6201e3699fdaaf4b6867c7c02257762dec942e1a3b1e29fd89bef9b0
6
+ metadata.gz: 9c851ca5d25bdaed7522be6f1736766bd92a66f454993ec060c048fe6f09feb9f28d3d7c608ba248a31492b8c6656782871507d6e9fd138af85e03b53446dda7
7
+ data.tar.gz: f8ba1b548b6cde09de40768dce5f2b79ba23dd3bf69620cc6255520efc6fe11c4f8839978d7f0d1ecfa1f0c77307ddf2743cd219d1834ae181f3f762d2f3a80a
data/README.md CHANGED
@@ -57,16 +57,16 @@ This gem provides 4 behaviors, the default one being `DeprecationToolkit::Behavi
57
57
  DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
58
58
  ```
59
59
 
60
- You can also create your own behavior class and perform the logic you want. Your behavior needs to respond to `.trigger`.
60
+ You can also create your own behavior object and perform the logic you want. Your behavior needs to respond to `trigger`.
61
61
 
62
62
  ```ruby
63
63
  class StatsdBehavior
64
- def self.trigger(test, deprecations, recorded_deprecations)
64
+ def trigger(test, deprecations, recorded_deprecations)
65
65
  # Could send some statsd event for example
66
66
  end
67
67
  end
68
68
 
69
- DeprecationToolkit::Configuration.behavior = StatsdBehavior
69
+ DeprecationToolkit::Configuration.behavior = StatsdBehavior.new
70
70
  ```
71
71
 
72
72
  #### DeprecationToolkit::Behaviors::CIRecordHelper
@@ -75,7 +75,7 @@ This is a special type of behaviour meant to help you record deprecations if you
75
75
  Imagine if you have thousands of tests and need to record deprecations for each on your machine, this is going to take ages.
76
76
  Recording deprecations on CI with the regular `Record` behavior isn't possible because of the way CI parallelize test in multiple container (Multiple tests from the same file runs in parallel in diferrent machines, the deprecation files that get created are then splitted. Regrouping them is a nightmare.)
77
77
 
78
- This behaviour will output a JSON representation of your deprecations. Your CI should have a way to download the log generated from the test run. Download it on your locale machine. Finally run the rake task `FILEPATH=<path_to_downloaded_log> deprecation_toolkit:record_from_ci_output`.
78
+ This behavior will output a JSON representation of your deprecations. Your CI should have a way to download the log generated from the test run. Download it on your locale machine. Finally run the rake task `FILEPATH=<path_to_downloaded_log> deprecation_toolkit:record_from_ci_output`.
79
79
  This task will parse your CI log and grab the output generated by the DeprecationToolkit and will finally convert everything back to YML files.
80
80
 
81
81
  ### 🔨 `#DeprecationToolkit::Configuration#allowed_deprecations`
@@ -170,6 +170,25 @@ It's possible to record deprecations while running your specs by adding an ENV['
170
170
  DEPRECATION_BEHAVIOR="record" bundle exec rspec path/to/file_spec.rb
171
171
  ```
172
172
 
173
+ ## Usage without Rails
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) 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
+ ```
191
+
173
192
  ## License
174
193
 
175
194
  Deprecation Toolkit is licensed under the [MIT license](LICENSE.txt).
@@ -4,12 +4,13 @@ require "json"
4
4
 
5
5
  module DeprecationToolkit
6
6
  module Behaviors
7
- class CIRecordHelper
7
+ module CIRecordHelper
8
+ extend self
8
9
  extend ReadWriteHelper
9
10
 
10
11
  HEADER = "[DeprecationToolkit]"
11
12
 
12
- def self.trigger(test, current_deprecations, _recorded_deprecations)
13
+ def trigger(test, current_deprecations, _recorded_deprecations)
13
14
  filename = recorded_deprecations_path(test)
14
15
 
15
16
  to_output = {
@@ -2,8 +2,10 @@
2
2
 
3
3
  module DeprecationToolkit
4
4
  module Behaviors
5
- class Disabled
6
- def self.trigger(*)
5
+ module Disabled
6
+ extend self
7
+
8
+ def trigger(*)
7
9
  end
8
10
  end
9
11
  end
@@ -2,8 +2,10 @@
2
2
 
3
3
  module DeprecationToolkit
4
4
  module Behaviors
5
- class Raise
6
- def self.trigger(_test, current_deprecations, recorded_deprecations)
5
+ module Raise
6
+ extend self
7
+
8
+ def trigger(_test, current_deprecations, recorded_deprecations)
7
9
  error_class = if current_deprecations.size > recorded_deprecations.size
8
10
  DeprecationIntroduced
9
11
  elsif current_deprecations.size < recorded_deprecations.size
@@ -32,7 +34,9 @@ module DeprecationToolkit
32
34
  You have introduced new deprecations in the codebase. Fix or record them in order to discard this error.
33
35
  #{record_message}
34
36
 
37
+ ******* The following deprecations were added: *******
35
38
  #{introduced_deprecations.join("\n")}
39
+ ******************************************************
36
40
  EOM
37
41
 
38
42
  super(message)
@@ -55,7 +59,9 @@ module DeprecationToolkit
55
59
  The recorded deprecations needs to be updated to reflect your changes.
56
60
  #{record_message}
57
61
 
62
+ ****** The following deprecations were removed: ******
58
63
  #{removed_deprecations.join("\n")}
64
+ ******************************************************
59
65
  EOM
60
66
 
61
67
  super(message)
@@ -2,10 +2,11 @@
2
2
 
3
3
  module DeprecationToolkit
4
4
  module Behaviors
5
- class Record
5
+ module Record
6
+ extend self
6
7
  extend ReadWriteHelper
7
8
 
8
- def self.trigger(test, collector, _)
9
+ def trigger(test, collector, _)
9
10
  deprecation_file = recorded_deprecations_path(test)
10
11
 
11
12
  write(deprecation_file, test_name(test) => collector.deprecations_without_stacktrace)
@@ -65,11 +65,7 @@ module DeprecationToolkit
65
65
  private
66
66
 
67
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
68
+ [/ \(called from .*\)$/, ""]
73
69
  end
74
70
 
75
71
  def gem_deprecate_sub_params
@@ -4,8 +4,10 @@ require "active_support/subscriber"
4
4
 
5
5
  module DeprecationToolkit
6
6
  class DeprecationSubscriber < ActiveSupport::Subscriber
7
- def self.already_attached?
8
- notifier != nil
7
+ class << self
8
+ def already_attached?
9
+ notifier != nil
10
+ end
9
11
  end
10
12
 
11
13
  def deprecation(event)
@@ -17,10 +19,13 @@ module DeprecationToolkit
17
19
  private
18
20
 
19
21
  def deprecation_allowed?(payload)
20
- allowed_deprecations, procs = Configuration.allowed_deprecations.partition { |el| el.is_a?(Regexp) }
21
-
22
- allowed_deprecations.any? { |regex| regex =~ payload[:message] } ||
23
- procs.any? { |proc| proc.call(payload[:message], payload[:callstack]) }
22
+ Configuration.allowed_deprecations.any? do |rule|
23
+ if rule.is_a?(Regexp)
24
+ rule.match?(payload[:message])
25
+ else
26
+ rule.call(payload[:message], payload[:callstack])
27
+ end
28
+ end
24
29
  end
25
30
  end
26
31
  end
@@ -2,7 +2,9 @@
2
2
 
3
3
  module DeprecationToolkit
4
4
  module TestTriggerer
5
- def self.trigger_deprecation_toolkit_behavior(test)
5
+ extend self
6
+
7
+ def trigger_deprecation_toolkit_behavior(test)
6
8
  current_deprecations = DeprecationToolkit::Collector.new(DeprecationToolkit::Collector.deprecations)
7
9
  recorded_deprecations = DeprecationToolkit::Collector.load(test)
8
10
  if !recorded_deprecations.flaky? && current_deprecations != recorded_deprecations
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationToolkit
4
- VERSION = "2.2.0"
4
+ VERSION = "2.2.2"
5
5
  end
@@ -48,11 +48,13 @@ module DeprecationToolkit
48
48
  end
49
49
  end
50
50
  end
51
- end
52
51
 
53
- module DeprecationToolkit
54
52
  module WarningPatch
55
53
  def warn(str, *)
54
+ if Configuration.warnings_treated_as_deprecation.empty?
55
+ return super
56
+ end
57
+
56
58
  str = DeprecationToolkit::Warning.handle_multipart(str)
57
59
  return unless str
58
60
 
@@ -64,5 +66,6 @@ module DeprecationToolkit
64
66
  end
65
67
  ruby2_keywords :warn
66
68
  end
69
+
70
+ ::Warning.singleton_class.prepend(WarningPatch)
67
71
  end
68
- Warning.singleton_class.prepend(DeprecationToolkit::WarningPatch)
@@ -44,7 +44,7 @@ module DeprecationToolkit
44
44
  def each_deprecator(&block)
45
45
  if defined?(Rails.application) && Rails.application.respond_to?(:deprecators)
46
46
  Rails.application.deprecators.each(&block)
47
- else
47
+ elsif ActiveSupport::Deprecation.respond_to?(:behavior)
48
48
  block.call(ActiveSupport::Deprecation)
49
49
  end
50
50
  end
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.0
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: 2024-02-05 00:00:00.000000000 Z
10
+ date: 2025-01-23 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -24,24 +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
- - CHANGELOG.md
38
- - Gemfile
39
- - Gemfile.lock
40
32
  - LICENSE.txt
41
33
  - README.md
42
- - RELEASE.md
43
- - Rakefile
44
- - deprecation_toolkit.gemspec
45
34
  - lib/deprecation_toolkit.rb
46
35
  - lib/deprecation_toolkit/behaviors/ci_record_helper.rb
47
36
  - lib/deprecation_toolkit/behaviors/disabled.rb
@@ -59,16 +48,14 @@ files:
59
48
  - lib/deprecation_toolkit/warning.rb
60
49
  - lib/minitest/deprecation_toolkit_plugin.rb
61
50
  - lib/tasks/ci_recorder.rake
62
- - shipit.rubygems.yml
63
51
  homepage: https://github.com/shopify/deprecation_toolkit
64
52
  licenses:
65
53
  - MIT
66
54
  metadata:
67
55
  homepage_uri: https://github.com/shopify/deprecation_toolkit
68
- source_code_uri: https://github.com/shopify/deprecation_toolkit
56
+ source_code_uri: https://github.com/Shopify/deprecation_toolkit/tree/v2.2.2
69
57
  changelog_uri: https://github.com/Shopify/deprecation_toolkit/blob/main/CHANGELOG.md
70
58
  allowed_push_host: https://rubygems.org
71
- post_install_message:
72
59
  rdoc_options: []
73
60
  require_paths:
74
61
  - lib
@@ -76,15 +63,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
63
  requirements:
77
64
  - - ">="
78
65
  - !ruby/object:Gem::Version
79
- version: '2.7'
66
+ version: 3.0.0
80
67
  required_rubygems_version: !ruby/object:Gem::Requirement
81
68
  requirements:
82
69
  - - ">="
83
70
  - !ruby/object:Gem::Version
84
71
  version: '0'
85
72
  requirements: []
86
- rubygems_version: 3.5.5
87
- signing_key:
73
+ rubygems_version: 3.6.2
88
74
  specification_version: 4
89
75
  summary: Deprecation Toolkit around ActiveSupport::Deprecation
90
76
  test_files: []
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- /.byebug_history
10
- gemfiles/*.lock
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
4
-
data/.rubocop.yml DELETED
@@ -1,16 +0,0 @@
1
- inherit_gem:
2
- rubocop-shopify: rubocop.yml
3
-
4
- AllCops:
5
- TargetRubyVersion: 2.6
6
- SuggestExtensions: false
7
- Exclude:
8
- - gemfiles/vendor/**/*
9
-
10
- Style/MethodCallWithArgsParentheses:
11
- Exclude:
12
- - Gemfile
13
- - gemfiles/*
14
-
15
- Style/CaseEquality:
16
- Enabled: false
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,83 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- deprecation_toolkit (2.2.0)
5
- activesupport (>= 6.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (7.1.2)
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.4)
23
- concurrent-ruby (1.2.2)
24
- connection_pool (2.4.1)
25
- diff-lcs (1.5.0)
26
- drb (2.2.0)
27
- ruby2_keywords
28
- i18n (1.14.1)
29
- concurrent-ruby (~> 1.0)
30
- minitest (5.20.0)
31
- mutex_m (0.2.0)
32
- parallel (1.21.0)
33
- parser (3.1.1.0)
34
- ast (~> 2.4.1)
35
- rainbow (3.1.1)
36
- rake (13.0.6)
37
- regexp_parser (2.2.1)
38
- rexml (3.2.5)
39
- rspec (3.11.0)
40
- rspec-core (~> 3.11.0)
41
- rspec-expectations (~> 3.11.0)
42
- rspec-mocks (~> 3.11.0)
43
- rspec-core (3.11.0)
44
- rspec-support (~> 3.11.0)
45
- rspec-expectations (3.11.0)
46
- diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.11.0)
48
- rspec-mocks (3.11.0)
49
- diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.11.0)
51
- rspec-support (3.11.0)
52
- rubocop (1.25.1)
53
- parallel (~> 1.10)
54
- parser (>= 3.1.0.0)
55
- rainbow (>= 2.2.2, < 4.0)
56
- regexp_parser (>= 1.8, < 3.0)
57
- rexml
58
- rubocop-ast (>= 1.15.1, < 2.0)
59
- ruby-progressbar (~> 1.7)
60
- unicode-display_width (>= 1.4.0, < 3.0)
61
- rubocop-ast (1.16.0)
62
- parser (>= 3.1.1.0)
63
- rubocop-shopify (2.5.0)
64
- rubocop (~> 1.25)
65
- ruby-progressbar (1.11.0)
66
- ruby2_keywords (0.0.5)
67
- tzinfo (2.0.6)
68
- concurrent-ruby (~> 1.0)
69
- unicode-display_width (2.1.0)
70
-
71
- PLATFORMS
72
- ruby
73
-
74
- DEPENDENCIES
75
- bundler
76
- deprecation_toolkit!
77
- minitest
78
- rake
79
- rspec
80
- rubocop-shopify
81
-
82
- BUNDLED WITH
83
- 2.4.4
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)
@@ -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 = ">= 2.7"
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