hoe-halostatue 2.1.0 → 2.1.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: 570731e6de226658f45ba1cc9ad567c6027432da0c12d9117c728daf9a43e439
4
- data.tar.gz: fba129d2f1576bcbedbb7ea378f6cb5b3be3638e5e934ba619dabf6a50042261
3
+ metadata.gz: '09d09b45270163489fd36ade505dcb66cf044390f8d9b63aea69cc49081810c5'
4
+ data.tar.gz: 9d8446c649e176013cb993e7117d4ece92f76b206484a7978db68332d2942182
5
5
  SHA512:
6
- metadata.gz: 7fd7d157a549b89800b00dd3a9668eaede571c3a3ccce22193f6465d3564f21e2201a1f2b84f112a3d298e3c36909e3ecfce16e04d7ac20e607560443a1461e4
7
- data.tar.gz: 429b470526f4a4b777ce7c7893b65943e9dc5a75080ccd0da6931c5f925e942d86810fe010a08b50ec5eb1b02a251f2519b5e071552a856d9ca7276dcb3d694d
6
+ metadata.gz: 947cba8ab26ebdd6aa08056ebd951bdfa8e19fa59c33ac68d9fb2ec4573d04c85f655e9e4aee1ae951461233c42e92f4d227968e80734155e2cb97dc12685287
7
+ data.tar.gz: bee5f811aea36c6123bb017555eb3c752760d7a52a18a78e8035242cfb3fa80d90bf9b6dd9a50aab6c57e9cb59c3b042ebe4782019a2e34af546ede07f55177c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # hoe-halostatue Changelog
2
2
 
3
+ ## 2.1.1 / 2025-06-26
4
+
5
+ - Actually include strict warnings support files.
6
+
3
7
  ## 2.1.0 / 2025-06-18
4
8
 
5
9
  - Add support for enabling "strict warnings" similar to
data/Manifest.txt CHANGED
@@ -8,4 +8,5 @@ README.md
8
8
  Rakefile
9
9
  SECURITY.md
10
10
  lib/hoe/halostatue.rb
11
+ lib/hoe/halostatue/strict_warnings.rb
11
12
  lib/hoe/halostatue/version.rb
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ $VERBOSE = true
4
+ Warning[:deprecated] = true
5
+
6
+ module Hoe::Halostatue::StrictWarnings # :nodoc:
7
+ class << self
8
+ attr_accessor :project_root
9
+ attr_reader :allowed
10
+ attr_reader :suppressed
11
+
12
+ def allowed=(patterns)
13
+ @allowed = Regexp.union(*Array(patterns))
14
+ end
15
+
16
+ def suppressed=(patterns)
17
+ @suppressed = Regex.union(*Array(patterns))
18
+ end
19
+ end
20
+
21
+ WarningError = Class.new(StandardError)
22
+
23
+ def warn(message, ...)
24
+ pattern = Hoe::Halostatue::StrictWarnings.suppressed
25
+ return if pattern&.match?(message)
26
+
27
+ super
28
+
29
+ return unless ENV["STRICT_WARNINGS"] || ENV["CI"]
30
+
31
+ project_root = Hoe::Halostatue::StrictWarnings.project_root
32
+ return if project_root && !message.include?(project_root)
33
+
34
+ pattern = Hoe::Halostatue::StrictWarnings.allowed
35
+ return if pattern&.match?(message)
36
+
37
+ raise WarningError.new(message)
38
+ end
39
+ end
40
+
41
+ Warning.singleton_class.prepend(Hoe::Halostatue::StrictWarnings)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hoe::Halostatue
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe-halostatue
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Ziegler
@@ -133,6 +133,7 @@ files:
133
133
  - Rakefile
134
134
  - SECURITY.md
135
135
  - lib/hoe/halostatue.rb
136
+ - lib/hoe/halostatue/strict_warnings.rb
136
137
  - lib/hoe/halostatue/version.rb
137
138
  homepage: https://github.com/halostatue/halostatue-data/
138
139
  licenses: