sec_id 8.0.0 → 8.0.1

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: 070e9688322c11aee220661a15bdc3a6feffeeda6a4d5859620e1e49ef948d0e
4
- data.tar.gz: 218328185fb31b121fc9fa36cbb2f0d20d7f81542e41e0cab9a453b4e66f366a
3
+ metadata.gz: d50c9163daf21728a883a7c9ae03215677c655ef2c8590b917b58306ab31efb1
4
+ data.tar.gz: 2a9ad832edc6be71a8bb4659909d1adfc6740e804aea2acad909b8373575a017
5
5
  SHA512:
6
- metadata.gz: 027535125c743f70d1748956f39530df76f9c537de9b2547d800c55e34ded2d8125c5a3b067edf16016c1aa88eca73ea7cb9567372f1a1875868549969fb620f
7
- data.tar.gz: 8f3345512540d6a5bfd2edbe436a44948e5c4a45a87a7637462467642b4fcacb590c4f37f675c71d8a38bf8f96f054af9191c2ff84c8798bc0bceff8b8d4a295
6
+ metadata.gz: 4a6b95868dd3d59b5bc3d48f6e7ce4b44b50d1c24389906505e5708cf4b6add66b6facc667dfe72348203a9c5e0fe35be9ef57978ed9600a4bfe9f53f5a9658a
7
+ data.tar.gz: 7592379ce4c9915548aa4e732f2065f41d455e6099e37b3a0a1dfeb48e36b3552c6f4b01bd089d4e505f7e5b73be940b832f965a8c8cc7060ed10e67171ed88f
data/CHANGELOG.md CHANGED
@@ -8,8 +8,23 @@ and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [8.0.1] - 2026-10-30
12
+
13
+ This patch release contains a breaking API change as an explicit exception to Semantic Versioning. The v7 bridge removal was scheduled for 8.0.0 but was omitted.
14
+
15
+ ### Removed
16
+
17
+ - **BREAKING:** Remove deprecated instance methods `check_digit` and `calculate_check_digit`, and class methods `check_digit` and `has_check_digit?`. Use `checksum`, `calculate_checksum`, and `has_checksum?`.
18
+ - **BREAKING:** Remove the `SecID::InvalidCheckDigitError` alias. Rescue `SecID::InvalidChecksumError` instead.
19
+ - **BREAKING:** Remove the `:check_digit` key from `to_h`, `as_json`, and pattern matching. Use `:checksum`.
20
+ - Remove the unused `SecID::Deprecation` warning helper and the bridge's RBS declarations.
21
+
11
22
  ## [8.0.0] - 2026-10-30
12
23
 
24
+ Ruby 3.3 or later is now required. Dropping Ruby 3.2 support is the breaking change that requires this major release.
25
+
26
+ The deprecated v7 check-digit methods, error alias, and component key remain available in 8.0.0.
27
+
13
28
  ### Added
14
29
 
15
30
  - Lefthook Git hooks for staged secret scanning, Ruby autocorrection, whitespace, commit messages, tests, types, and documentation coverage.
@@ -17,13 +32,12 @@ and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
17
32
 
18
33
  ### Changed
19
34
 
35
+ - **BREAKING:** Drop support for Ruby 3.2 and require Ruby 3.3 or later.
20
36
  - Reduce detector allocations by sorting candidate types once and stopping parsing at the first valid match. Unsupported input lengths no longer grow the detector cache.
21
37
  - Reduce LEI and IBAN checksum allocations by reusing decimal expansions and preserving IBAN numeric characters.
22
38
  - Reduce scanner allocations by sorting candidate types once, stopping at the first valid type, and reusing the validated instance.
23
39
  - Reduce temporary allocations in ISIN, CUSIP, CEI, and FIGI checksum calculations by processing ASCII bytes directly.
24
40
  - Refresh development dependencies, all four lockfiles, and GitHub Actions for frozen CI installs.
25
-
26
- - **BREAKING:** Minimum Ruby version raised from 3.2 to 3.3 (Ruby 3.2 reached EOL on 2026-03-31)
27
41
  - RBS: `SecID::CFI::AttributeSet#to_h` and `#as_json` are now typed `Hash[Symbol, Hash[Symbol, untyped]]` instead of `Hash[untyped, untyped]` (Steep 2.1 tuple inference)
28
42
 
29
43
  ## [7.1.1] - 2026-07-31
@@ -303,7 +317,8 @@ Gem metadata only: corrected the gemspec description and README wording. No libr
303
317
 
304
318
  - ISIN numbers support: `SecID::ISIN`
305
319
 
306
- [Unreleased]: https://github.com/svyatov/sec_id/compare/v8.0.0...HEAD
320
+ [Unreleased]: https://github.com/svyatov/sec_id/compare/v8.0.1...HEAD
321
+ [8.0.1]: https://github.com/svyatov/sec_id/compare/v8.0.0...v8.0.1
307
322
  [8.0.0]: https://github.com/svyatov/sec_id/compare/v7.1.1...v8.0.0
308
323
  [7.1.1]: https://github.com/svyatov/sec_id/compare/v7.1.0...v7.1.1
309
324
  [7.1.0]: https://github.com/svyatov/sec_id/compare/v7.0.0...v7.1.0
data/MIGRATION.md CHANGED
@@ -1,4 +1,23 @@
1
- # Upgrading to SecID 7.0
1
+ # Migration guide
2
+
3
+ ## Upgrading to SecID 8.0.1
4
+
5
+ Version 8.0.1 removes the deprecated v7 bridge that remained in 8.0.0. This is an explicit exception to Semantic Versioning: the patch release contains a breaking API change.
6
+
7
+ Replace these names before upgrading:
8
+
9
+ | Removed | Replacement |
10
+ |---|---|
11
+ | Instance `check_digit` | `checksum` |
12
+ | Instance `calculate_check_digit` | `calculate_checksum` |
13
+ | Class `check_digit(id)` | `checksum(id)` |
14
+ | Class `has_check_digit?` | `has_checksum?` |
15
+ | `SecID::InvalidCheckDigitError` | `SecID::InvalidChecksumError` |
16
+ | `:check_digit` in `to_h`, `as_json`, and pattern matching | `:checksum` |
17
+
18
+ The `SecID::Deprecation` warning helper is also removed. The canonical checksum API, `restore`, `restore!`, and checksum calculations are unchanged.
19
+
20
+ ## Upgrading to SecID 7.0
2
21
 
3
22
  This guide covers all breaking changes when upgrading from SecID 6.x to 7.0. They are all one
4
23
  mechanical rename: the **check-digit** concept became **checksum** across the public API —
@@ -25,7 +44,7 @@ deprecation warnings changed.
25
44
  `restore` / `restore!` and the `Checkable` concern name are unchanged.
26
45
 
27
46
  **Bridge:** the old method names, the `InvalidCheckDigitError` constant, and the `:check_digit`
28
- components key all keep working through v7 (the methods warn on use); they are removed in v8.
47
+ components key all keep working through v7 and 8.0.0 (the methods warn on use); they are removed in 8.0.1.
29
48
  **The one exception is the error code** — `:invalid_check_digit` flips hard to `:invalid_checksum`
30
49
  at v7 with no bridge, so an error-code matcher must be updated immediately.
31
50
 
@@ -56,7 +75,7 @@ SecID::ISIN.has_checksum?
56
75
  ```
57
76
 
58
77
  The old names still work through v7 but emit a deprecation warning on every call and are removed
59
- in v8. See step 6 to silence them if you cannot migrate every call site yet.
78
+ in 8.0.1. See step 6 to silence them on older releases if you cannot migrate every call site yet.
60
79
 
61
80
  ### 3. Rename the rescued error class
62
81
 
@@ -70,7 +89,7 @@ rescue SecID::InvalidChecksumError => e
70
89
 
71
90
  `SecID::InvalidCheckDigitError` remains as a constant alias of `SecID::InvalidChecksumError`
72
91
  through v7 (it is the *same class object*, so `rescue` under either name catches the same error),
73
- and is removed in v8.
92
+ and is removed in 8.0.1.
74
93
 
75
94
  The constant alias emits **no** deprecation warning at runtime (it is a plain constant, not a
76
95
  warned method), so `-W` output won't reveal your rescue sites — find them statically:
@@ -100,15 +119,15 @@ SecID.explain('US5949181040', types: [:isin])[:candidates].first[:errors]
100
119
  If you use the opt-in ActiveModel/Rails validator with `details: true`, the surfaced reason
101
120
  follows the same flip: an invalid checksum now reports `:invalid_checksum`.
102
121
 
103
- ### 5. Migrate pattern matches and `to_h` readers before v8
122
+ ### 5. Migrate pattern matches and `to_h` readers before 8.0.1
104
123
 
105
124
  `components` (and therefore `to_h` and `deconstruct_keys`) carries **both** `:checksum` and the
106
125
  deprecated `:check_digit` key through v7, so existing pattern matches keep working. The
107
- `:check_digit` key is removed in v8 — migrate to `:checksum` before then.
126
+ `:check_digit` key is removed in 8.0.1. Migrate to `:checksum` before then.
108
127
 
109
128
  ```ruby
110
129
  # Both work through v7, binding the same value:
111
- isin => { check_digit: } # deprecated, removed in v8
130
+ isin => { check_digit: } # deprecated, removed in 8.0.1
112
131
  isin => { checksum: } # canonical
113
132
 
114
133
  isin.to_h[:components]
data/README.md CHANGED
@@ -52,6 +52,8 @@ A Ruby toolkit for securities identifiers: validate, parse, normalize, detect, c
52
52
 
53
53
  Ruby 3.3+ is required.
54
54
 
55
+ Version 8.0.1 removes the deprecated check-digit aliases retained in 8.0.0. This patch release contains a breaking API change; see the [migration guide](MIGRATION.md#upgrading-to-secid-801).
56
+
55
57
  ## Installation
56
58
 
57
59
  Add this line to your application's Gemfile:
data/lib/sec_id/base.rb CHANGED
@@ -95,14 +95,6 @@ module SecID
95
95
 
96
96
  @has_checksum = ancestors.include?(SecID::Checkable)
97
97
  end
98
-
99
- # @deprecated Use {.has_checksum?}. Kept as a v7 bridge; removed in v8.
100
- #
101
- # @return [Boolean]
102
- def has_check_digit?
103
- SecID::Deprecation.warn(old: 'has_check_digit?', new: 'has_checksum?')
104
- has_checksum?
105
- end
106
98
  end
107
99
 
108
100
  # @api private
@@ -142,7 +134,7 @@ module SecID
142
134
  full_id: full_id,
143
135
  normalized: valid? ? normalized : nil,
144
136
  valid: valid?,
145
- components: components_with_deprecation_bridge
137
+ components: components
146
138
  }
147
139
  end
148
140
 
@@ -165,7 +157,7 @@ module SecID
165
157
  # in SecID::ISIN[country_code:, nsin:] then [country_code, nsin]
166
158
  # in nil then :invalid
167
159
  # end #=> ['US', '594918104']
168
- def deconstruct_keys(_keys) = components_with_deprecation_bridge
160
+ def deconstruct_keys(_keys) = components
169
161
 
170
162
  protected
171
163
 
@@ -176,17 +168,6 @@ module SecID
176
168
 
177
169
  private
178
170
 
179
- # Mirrors the canonical `:checksum` components key onto the deprecated `:check_digit`
180
- # key for the v7 bridge, when a checksum is present. The mirror reads `:checksum`, so the
181
- # deprecated `check_digit` reader never fires internally. Removed in v8 (revert `to_h` and
182
- # `deconstruct_keys` to call `components` directly).
183
- #
184
- # @return [Hash] the parsed components, with `:check_digit` added when `:checksum` is present
185
- def components_with_deprecation_bridge
186
- parsed = components
187
- parsed.key?(:checksum) ? parsed.merge(check_digit: parsed[:checksum]) : parsed
188
- end
189
-
190
171
  # @return [Hash]
191
172
  def components
192
173
  {}
@@ -87,16 +87,6 @@ module SecID
87
87
  def checksum(id)
88
88
  new(id).calculate_checksum
89
89
  end
90
-
91
- # @deprecated Use {.checksum}. Kept as a v7 bridge; removed in v8.
92
- #
93
- # @param id [String] the identifier to calculate the checksum for
94
- # @return [Integer, String] the calculated checksum
95
- # @raise [InvalidFormatError] if the identifier format is invalid
96
- def check_digit(id)
97
- SecID::Deprecation.warn(old: 'check_digit', new: 'checksum')
98
- checksum(id)
99
- end
100
90
  end
101
91
 
102
92
  # Validates format and checksum.
@@ -138,23 +128,6 @@ module SecID
138
128
  "#{identifier}#{checksum&.to_s&.rjust(checksum_width, '0')}"
139
129
  end
140
130
 
141
- # @deprecated Use {#checksum}. Kept as a v7 bridge; removed in v8.
142
- #
143
- # @return [Integer, String]
144
- def check_digit
145
- SecID::Deprecation.warn(old: 'check_digit', new: 'checksum')
146
- checksum
147
- end
148
-
149
- # @deprecated Use {#calculate_checksum}. Kept as a v7 bridge; removed in v8.
150
- #
151
- # @return [Integer, String]
152
- # @raise [InvalidFormatError] if the identifier format is invalid
153
- def calculate_check_digit
154
- SecID::Deprecation.warn(old: 'calculate_check_digit', new: 'calculate_checksum')
155
- calculate_checksum
156
- end
157
-
158
131
  private
159
132
 
160
133
  # CUSIP/CEI double the rightmost body character; FIGI starts one position left.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SecID
4
4
  # Current gem version.
5
- VERSION = '8.0.0'
5
+ VERSION = '8.0.1'
6
6
  end
data/lib/sec_id.rb CHANGED
@@ -17,10 +17,6 @@ module SecID
17
17
  # Raised when the checksum does not match the calculated value.
18
18
  class InvalidChecksumError < Error; end
19
19
 
20
- # @deprecated Use {InvalidChecksumError}. Kept as a v7 bridge (same class object,
21
- # so `rescue` under either name keeps working); removed in v8.
22
- InvalidCheckDigitError = InvalidChecksumError
23
-
24
20
  # Raised for type-specific structural errors (invalid prefix, category, group, BBAN, or date).
25
21
  class InvalidStructureError < Error; end
26
22
 
@@ -233,7 +229,6 @@ module SecID
233
229
  end
234
230
  end
235
231
 
236
- require 'sec_id/deprecation'
237
232
  require 'sec_id/deep_freeze'
238
233
  require 'sec_id/errors'
239
234
  require 'sec_id/concerns/normalizable'
data/sig/sec_id/base.rbs CHANGED
@@ -47,9 +47,6 @@ module SecID
47
47
  # module-level `SecID.suggest` can call it on any registered class object.
48
48
  def self.suggest: (SecID::input str) -> Array[Suggestion]
49
49
 
50
- # @deprecated v7 bridge alias for `has_checksum?`; removed in v8.
51
- def self.has_check_digit?: () -> bool
52
-
53
50
  def self.inherited: (singleton(Base) subclass) -> void
54
51
 
55
52
  def initialize: (SecID::input _sec_id_number) -> void
@@ -75,7 +72,6 @@ module SecID
75
72
 
76
73
  private
77
74
 
78
- def components_with_deprecation_bridge: () -> Hash[Symbol, untyped]
79
75
  def components: () -> Hash[Symbol, untyped]
80
76
  def parse: (SecID::input sec_id_number) -> (::MatchData | ::Hash[Symbol, untyped])
81
77
 
data/sig/sec_id/cei.rbs CHANGED
@@ -17,10 +17,6 @@ module SecID
17
17
  def initialize: (SecID::input cei) -> void
18
18
  def calculate_checksum: () -> Integer
19
19
  def self.checksum: (SecID::input id) -> Integer
20
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
21
- def calculate_check_digit: () -> Integer
22
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
23
- def self.check_digit: (SecID::input id) -> Integer
24
20
  private def self.generate_body: (Random random) -> String
25
21
 
26
22
  private
@@ -17,8 +17,6 @@ module SecID
17
17
  def restore!: (SecID::input id_without_checksum) -> Base
18
18
  def checksum: (SecID::input id) -> (Integer | String)
19
19
 
20
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
21
- def check_digit: (SecID::input id) -> (Integer | String)
22
20
  end
23
21
 
24
22
  def valid?: () -> bool
@@ -27,12 +25,6 @@ module SecID
27
25
  def calculate_checksum: () -> (Integer | String)
28
26
  def to_s: () -> String
29
27
 
30
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
31
- def check_digit: () -> (Integer | String)?
32
-
33
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
34
- def calculate_check_digit: () -> (Integer | String)
35
-
36
28
  private
37
29
 
38
30
  # Readers are nilable before validation. The callers validate first; local
data/sig/sec_id/cusip.rbs CHANGED
@@ -18,10 +18,6 @@ module SecID
18
18
  def to_pretty_s: () -> String?
19
19
  def calculate_checksum: () -> Integer
20
20
  def self.checksum: (SecID::input id) -> Integer
21
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
22
- def calculate_check_digit: () -> Integer
23
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
24
- def self.check_digit: (SecID::input id) -> Integer
25
21
  private def self.generate_body: (Random random) -> String
26
22
  def to_isin: (String country_code) -> ISIN
27
23
  def cins?: () -> bool
data/sig/sec_id/dti.rbs CHANGED
@@ -17,10 +17,6 @@ module SecID
17
17
  def initialize: (SecID::input dti) -> void
18
18
  def calculate_checksum: () -> String
19
19
  def self.checksum: (SecID::input id) -> String
20
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
21
- def calculate_check_digit: () -> String
22
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
23
- def self.check_digit: (SecID::input id) -> String
24
20
  private def self.generate_body: (Random random) -> String
25
21
 
26
22
  private
data/sig/sec_id/figi.rbs CHANGED
@@ -19,10 +19,6 @@ module SecID
19
19
  def to_pretty_s: () -> String?
20
20
  def calculate_checksum: () -> Integer
21
21
  def self.checksum: (SecID::input id) -> Integer
22
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
23
- def calculate_check_digit: () -> Integer
24
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
25
- def self.check_digit: (SecID::input id) -> Integer
26
22
  private def self.generate_body: (Random random) -> String
27
23
 
28
24
  private
data/sig/sec_id/iban.rbs CHANGED
@@ -28,10 +28,6 @@ module SecID
28
28
  def restore: () -> String
29
29
  def calculate_checksum: () -> Integer
30
30
  def self.checksum: (SecID::input id) -> Integer
31
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
32
- def calculate_check_digit: () -> Integer
33
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
34
- def self.check_digit: (SecID::input id) -> Integer
35
31
  private def self.generate_body: (Random random) -> String
36
32
  def valid_bban_format?: () -> bool
37
33
  def country_rule: () -> rule?
data/sig/sec_id/isin.rbs CHANGED
@@ -21,10 +21,6 @@ module SecID
21
21
  def to_pretty_s: () -> String?
22
22
  def calculate_checksum: () -> Integer
23
23
  def self.checksum: (SecID::input id) -> Integer
24
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
25
- def calculate_check_digit: () -> Integer
26
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
27
- def self.check_digit: (SecID::input id) -> Integer
28
24
  private def self.generate_body: (Random random) -> String
29
25
  def to_cusip: () -> CUSIP
30
26
  def cgs?: () -> bool
data/sig/sec_id/lei.rbs CHANGED
@@ -22,10 +22,6 @@ module SecID
22
22
  def to_pretty_s: () -> String?
23
23
  def calculate_checksum: () -> Integer
24
24
  def self.checksum: (SecID::input id) -> Integer
25
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
26
- def calculate_check_digit: () -> Integer
27
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
28
- def self.check_digit: (SecID::input id) -> Integer
29
25
  private def self.generate_body: (Random random) -> String
30
26
 
31
27
  private
data/sig/sec_id/sedol.rbs CHANGED
@@ -21,10 +21,6 @@ module SecID
21
21
  def to_isin: (?String country_code) -> ISIN
22
22
  def calculate_checksum: () -> Integer
23
23
  def self.checksum: (SecID::input id) -> Integer
24
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
25
- def calculate_check_digit: () -> Integer
26
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
27
- def self.check_digit: (SecID::input id) -> Integer
28
24
  private def self.generate_body: (Random random) -> String
29
25
 
30
26
  private
data/sig/sec_id/upi.rbs CHANGED
@@ -16,10 +16,6 @@ module SecID
16
16
  def initialize: (SecID::input upi) -> void
17
17
  def calculate_checksum: () -> String
18
18
  def self.checksum: (SecID::input id) -> String
19
- # @deprecated v7 bridge alias for `calculate_checksum`; removed in v8.
20
- def calculate_check_digit: () -> String
21
- # @deprecated v7 bridge alias for `checksum`; removed in v8.
22
- def self.check_digit: (SecID::input id) -> String
23
19
  private def self.generate_body: (Random random) -> String
24
20
 
25
21
  private
data/sig/sec_id.rbs CHANGED
@@ -11,9 +11,6 @@ module SecID
11
11
  class InvalidChecksumError < Error
12
12
  end
13
13
 
14
- # @deprecated v7 bridge constant alias for `InvalidChecksumError` (same class object); removed in v8.
15
- InvalidCheckDigitError: singleton(InvalidChecksumError)
16
-
17
14
  # Raised for type-specific structural errors.
18
15
  class InvalidStructureError < Error
19
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sec_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Svyatov
@@ -46,7 +46,6 @@ files:
46
46
  - lib/sec_id/concerns/validatable.rb
47
47
  - lib/sec_id/cusip.rb
48
48
  - lib/sec_id/deep_freeze.rb
49
- - lib/sec_id/deprecation.rb
50
49
  - lib/sec_id/detector.rb
51
50
  - lib/sec_id/dti.rb
52
51
  - lib/sec_id/errors.rb
@@ -85,7 +84,6 @@ files:
85
84
  - sig/sec_id/concerns/validatable.rbs
86
85
  - sig/sec_id/cusip.rbs
87
86
  - sig/sec_id/deep_freeze.rbs
88
- - sig/sec_id/deprecation.rbs
89
87
  - sig/sec_id/detector.rbs
90
88
  - sig/sec_id/dti.rbs
91
89
  - sig/sec_id/errors.rbs
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SecID
4
- # Emits standardized, silenceable deprecation warnings for the v7 → v8 rename
5
- # bridge. Stateless: warns on every call with no per-call-site dedup, so the
6
- # migration signal is never suppressed by default.
7
- #
8
- # The warning is written via {Kernel#warn} at Ruby's default verbosity — it is
9
- # visible unless the process runs with `-W0` / `$VERBOSE = nil`. No `category:`
10
- # is passed, because `Warning[:deprecated]` defaults to `false` and would hide
11
- # the bridge warning the rename relies on.
12
- module Deprecation
13
- # Emits a standardized deprecation warning for a renamed API name.
14
- #
15
- # @param old [String] the deprecated name
16
- # @param new [String] the canonical replacement name
17
- # @param removed_in [String] the version that removes the deprecated name
18
- # @return [void]
19
- def self.warn(old:, new:, removed_in: 'v8')
20
- Kernel.warn(
21
- "SecID: `#{old}` is deprecated and will be removed in #{removed_in}; use `#{new}` instead.",
22
- uplevel: 2
23
- )
24
- end
25
- end
26
- end
@@ -1,6 +0,0 @@
1
- module SecID
2
- # Emits standardized, silenceable deprecation warnings for the v7 → v8 rename bridge.
3
- module Deprecation
4
- def self.warn: (old: String, new: String, ?removed_in: String) -> void
5
- end
6
- end