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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Manifest.txt +1 -0
- data/lib/hoe/halostatue/strict_warnings.rb +41 -0
- data/lib/hoe/halostatue/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09d09b45270163489fd36ade505dcb66cf044390f8d9b63aea69cc49081810c5'
|
4
|
+
data.tar.gz: 9d8446c649e176013cb993e7117d4ece92f76b206484a7978db68332d2942182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 947cba8ab26ebdd6aa08056ebd951bdfa8e19fa59c33ac68d9fb2ec4573d04c85f655e9e4aee1ae951461233c42e92f4d227968e80734155e2cb97dc12685287
|
7
|
+
data.tar.gz: bee5f811aea36c6123bb017555eb3c752760d7a52a18a78e8035242cfb3fa80d90bf9b6dd9a50aab6c57e9cb59c3b042ebe4782019a2e34af546ede07f55177c
|
data/CHANGELOG.md
CHANGED
data/Manifest.txt
CHANGED
@@ -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)
|
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.
|
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:
|