structured_warnings 0.4.0 → 0.5.0
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/README.md +4 -19
- data/lib/structured_warnings/kernel.rb +2 -2
- data/lib/structured_warnings/version.rb +1 -1
- data/lib/structured_warnings/warning.rb +2 -4
- data/lib/structured_warnings.rb +0 -3
- metadata +10 -14
- data/lib/warning.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8774c997cadba9d8da089be20d8486231f1b3719cdd0aa3c316950d3e7b8000
|
4
|
+
data.tar.gz: 4fe13678cdbc0151442e8777822090d94204348efa25c479881b5796dff9d0d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51311c54bb3fe552f48d3b5def0c61708da3051a1b76c3888987085531ad9b260dec4d4d3f6d563d9cb7fcf0f81f15044e8c61023331b41fc9471c6bfe91deb7
|
7
|
+
data.tar.gz: 734fa0958d804c8e7ea308c2a0f35b4c9899761e6552f203e51ad5091e6463bcb52bc519e6f0f9e0a93e894d21b6565a96f42e2d6df4e0214eb125ab81f4b0f0
|
data/README.md
CHANGED
@@ -33,24 +33,9 @@ Or install it yourself as:
|
|
33
33
|
|
34
34
|
## Compatibility
|
35
35
|
|
36
|
-
`structured_warnings` aims to work with all Ruby
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
Versions of `structured_warnings` before `v0.3.0` are incompatible with Ruby
|
41
|
-
2.4+. Please upgrade accordingly, if you need Ruby 2.4 compatibility. Please
|
42
|
-
note on the otherhand, that many class names changed in an incompatible way
|
43
|
-
with `structured_warnings` `v0.3.0`. This was done to avoid future name clashes.
|
44
|
-
|
45
|
-
Here's a table which should ease upgrading.
|
46
|
-
|
47
|
-
| v0.2.0 and before | v0.3.0 and after |
|
48
|
-
|------------------------------|--------------------------------------------------|
|
49
|
-
| `Warning` | `StructuredWarnings::Base` |
|
50
|
-
| `StandardWarning` | `StructuredWarnings::StandardWarning` |
|
51
|
-
| `DeprecationWarning` | `StructuredWarnings::DeprecationWarning` |
|
52
|
-
| `DeprecatedMethodWarning` | `StructuredWarnings::DeprecatedMethodWarning` |
|
53
|
-
| `DeprecatedSignatureWarning` | `StructuredWarnings::DeprecatedSignatureWarning` |
|
36
|
+
`structured_warnings` aims to work with all stable, maintained Ruby versions. At
|
37
|
+
the time of this writing this is Ruby 3.2, 3.3, and 3.4. Please file a bug for
|
38
|
+
any incompatibilities.
|
54
39
|
|
55
40
|
|
56
41
|
### Test framework support
|
@@ -169,7 +154,7 @@ give as much feedback to your users as possible.
|
|
169
154
|
* [Implementation Highlights](http://www.nach-vorne.de/2008/2/22/structured_warnings-highlights)
|
170
155
|
* [Project's website](https://github.com/schmidt/structured_warnings/)
|
171
156
|
* [API doc](http://rdoc.info/projects/schmidt/structured_warnings)
|
172
|
-
* [Build status](https://
|
157
|
+
* [Build status](https://github.com/schmidt/structured_warnings/actions)
|
173
158
|
|
174
159
|
|
175
160
|
## Development
|
@@ -36,7 +36,7 @@ module StructuredWarnings::Warning
|
|
36
36
|
#
|
37
37
|
# warn StructuredWarnings::Base.new("The least specific warning you can get")
|
38
38
|
#
|
39
|
-
def warn(*args)
|
39
|
+
def warn(*args, **options)
|
40
40
|
first = args.shift
|
41
41
|
if first.is_a? Class and first <= StructuredWarnings::Base
|
42
42
|
warning = first
|
@@ -52,11 +52,9 @@ module StructuredWarnings::Warning
|
|
52
52
|
|
53
53
|
else
|
54
54
|
warning = StructuredWarnings::BuiltInWarning
|
55
|
-
message = first.to_s.split(':', 4).last
|
55
|
+
message = first.to_s.split(':', 4).last.strip
|
56
56
|
end
|
57
57
|
|
58
|
-
options = args.first.is_a?(Hash) ? args.shift : {}
|
59
|
-
|
60
58
|
# If args is not empty, user passed an incompatible set of arguments.
|
61
59
|
# Maybe somebody else is overriding warn as well and knows, what to do.
|
62
60
|
# Better do nothing in this case. See #5
|
data/lib/structured_warnings.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structured_warnings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregor Schmidt
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -16,28 +15,28 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
18
|
+
version: '2.1'
|
20
19
|
type: :development
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
25
|
+
version: '2.1'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: rake
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
32
|
+
version: '13.0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
39
|
+
version: '13.0'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: minitest
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +57,14 @@ dependencies:
|
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
60
|
+
version: '3.0'
|
62
61
|
type: :development
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
67
|
+
version: '3.0'
|
69
68
|
description: This is an implementation of Daniel Berger's proposal of structured warnings
|
70
69
|
for Ruby.
|
71
70
|
email:
|
@@ -87,12 +86,10 @@ files:
|
|
87
86
|
- lib/structured_warnings/version.rb
|
88
87
|
- lib/structured_warnings/warner.rb
|
89
88
|
- lib/structured_warnings/warning.rb
|
90
|
-
- lib/warning.rb
|
91
89
|
homepage: http://github.com/schmidt/structured_warnings
|
92
90
|
licenses:
|
93
91
|
- MIT
|
94
92
|
metadata: {}
|
95
|
-
post_install_message:
|
96
93
|
rdoc_options: []
|
97
94
|
require_paths:
|
98
95
|
- lib
|
@@ -100,15 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
97
|
requirements:
|
101
98
|
- - ">="
|
102
99
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
100
|
+
version: 3.2.0
|
104
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
102
|
requirements:
|
106
103
|
- - ">="
|
107
104
|
- !ruby/object:Gem::Version
|
108
105
|
version: '0'
|
109
106
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
-
signing_key:
|
107
|
+
rubygems_version: 3.6.2
|
112
108
|
specification_version: 4
|
113
109
|
summary: Provides structured warnings for Ruby, using an exception-like interface
|
114
110
|
and hierarchy
|