warning 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +6 -0
  3. data/README.rdoc +1 -0
  4. data/lib/warning.rb +6 -5
  5. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ea693f6c3250c25b7ba2859e7c8ea5d945e8c0560aa3c564fda63da2d52e567
4
- data.tar.gz: 3417d55cd4807d454d37afc6360864d9d87b29874b8e87d8082b413d209a4b4e
3
+ metadata.gz: 2af0fa1becb10a11e209630c73fdb0f1184352cdb174edbf2ce8eabeff2d1763
4
+ data.tar.gz: 51b04db9d1bcdfd9432c7501d3cfe15043bad6556940aea4214154791cee3964
5
5
  SHA512:
6
- metadata.gz: 379377da9ef4d3ac871eb4bdbf08dcc245ccb94d7f987ef04f3f60944f4e1d0784aeee60bb560cbd4d744b92e675803fcd6955c354553649bd72e8d0e3dda1a2
7
- data.tar.gz: 691e2c43099ddad0631752b66d7c401025a59a1b81de0fc1eca92627e5efd9b6d561b571b434526a325cab2f30bc9f4c7d2f625d62ec303905b19115ecf85148
6
+ metadata.gz: bc4fe66b7efc5066225ad74b947bc7d32113651112a88ff12a9d8888dea60ed7b22ba54bc6cc156eb19f85f8cfe0c3199cbb7e041af44c54db08a9fda4fb4738
7
+ data.tar.gz: dc243ded2132d05c9e926a59577c978a10169253419ba6e1aa1cfbc9c96a2628b1360991dac9dce7ab4ac11e29683e129a52eb9859b9a61eb07f9492f8ae089a
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.4.0 (2024-05-24)
2
+
3
+ * Add support for :ignored_block as regexp argument to Warning.ignore (jeremyevans)
4
+
5
+ * Support new warning format in Ruby 3.4 (jeremyevans)
6
+
1
7
  === 1.3.0 (2022-07-14)
2
8
 
3
9
  * Allow Warning.clear to take a block, and restore current state after block (splattael) (#18, #20)
data/README.rdoc CHANGED
@@ -31,6 +31,7 @@ appropriate regexp. The supported symbols are:
31
31
  * :ambiguous_slash
32
32
  * :bignum
33
33
  * :fixnum
34
+ * :ignored_block
34
35
  * :keyword_separation
35
36
  * :method_redefined
36
37
  * :mismatched_indentations
data/lib/warning.rb CHANGED
@@ -4,18 +4,19 @@ module Warning
4
4
  module Processor
5
5
  # Map of symbols to regexps for warning messages to ignore.
6
6
  IGNORE_MAP = {
7
- ambiguous_slash: /: warning: ambiguous first argument; put parentheses or a space even after `\/' operator\n\z|: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `\/' operator\n\z/,
8
- arg_prefix: /: warning: `[&\*]' interpreted as argument prefix\n\z/,
7
+ ambiguous_slash: /: warning: ambiguous first argument; put parentheses or a space even after [`']\/' operator\n\z|: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after [`']\/' operator\n\z/,
8
+ arg_prefix: /: warning: [`'][&\*]' interpreted as argument prefix\n\z/,
9
9
  bignum: /: warning: constant ::Bignum is deprecated\n\z/,
10
10
  fixnum: /: warning: constant ::Fixnum is deprecated\n\z/,
11
+ ignored_block: /: warning: the block passed to '.+' defined at .+:\d+ may be ignored\n\z/,
11
12
  method_redefined: /: warning: method redefined; discarding old .+\n\z|: warning: previous definition of .+ was here\n\z/,
12
- missing_gvar: /: warning: global variable `\$.+' not initialized\n\z/,
13
+ missing_gvar: /: warning: global variable [`']\$.+' not initialized\n\z/,
13
14
  missing_ivar: /: warning: instance variable @.+ not initialized\n\z/,
14
15
  not_reached: /: warning: statement not reached\n\z/,
15
16
  shadow: /: warning: shadowing outer local variable - \w+\n\z/,
16
17
  unused_var: /: warning: assigned but unused variable - \w+\n\z/,
17
18
  useless_operator: /: warning: possibly useless use of [><!=]+ in void context\n\z/,
18
- keyword_separation: /: warning: (?:Using the last argument (?:for `.+' )?as keyword parameters is deprecated; maybe \*\* should be added to the call|Passing the keyword argument (?:for `.+' )?as the last hash parameter is deprecated|Splitting the last argument (?:for `.+' )?into positional and keyword parameters is deprecated|The called method (?:`.+' )?is defined here)\n\z/,
19
+ keyword_separation: /: warning: (?:Using the last argument (?:for [`'].+' )?as keyword parameters is deprecated; maybe \*\* should be added to the call|Passing the keyword argument (?:for [`'].+' )?as the last hash parameter is deprecated|Splitting the last argument (?:for [`'].+' )?into positional and keyword parameters is deprecated|The called method (?:[`'].+' )?is defined here)\n\z/,
19
20
  safe: /: warning: (?:rb_safe_level_2_warning|rb_safe_level|rb_set_safe_level_force|rb_set_safe_level|rb_secure|rb_insecure_operation|rb_check_safe_obj|\$SAFE) will (?:be removed|become a normal global variable) in Ruby 3\.0\n\z/,
20
21
  taint: /: warning: (?:rb_error_untrusted|rb_check_trusted|Pathname#taint|Pathname#untaint|rb_env_path_tainted|Object#tainted\?|Object#taint|Object#untaint|Object#untrusted\?|Object#untrust|Object#trust|rb_obj_infect|rb_tainted_str_new|rb_tainted_str_new_cstr) is deprecated and will be removed in Ruby 3\.2\.?\n\z/,
21
22
  mismatched_indentations: /: warning: mismatched indentations at '.+' with '.+' at \d+\n\z/,
@@ -166,7 +167,7 @@ module Warning
166
167
  # /instance variable @\w+ not initialized/ => proc do |warning|
167
168
  # LOGGER.warning(warning)
168
169
  # end,
169
- # /global variable `\$\w+' not initialized/ => proc do |warning|
170
+ # /global variable [`']\$\w+' not initialized/ => proc do |warning|
170
171
  # LOGGER.error(warning)
171
172
  # end
172
173
  # )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warning
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-14 00:00:00.000000000 Z
11
+ date: 2024-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest-global_expectations
@@ -50,7 +50,7 @@ metadata:
50
50
  changelog_uri: https://github.com/jeremyevans/ruby-warning/blob/master/CHANGELOG
51
51
  documentation_uri: https://github.com/jeremyevans/ruby-warning/blob/master/README.rdoc
52
52
  source_code_uri: https://github.com/jeremyevans/ruby-warning
53
- post_install_message:
53
+ post_install_message:
54
54
  rdoc_options:
55
55
  - "--quiet"
56
56
  - "--line-numbers"
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.3.7
76
- signing_key:
75
+ rubygems_version: 3.5.9
76
+ signing_key:
77
77
  specification_version: 4
78
78
  summary: Add custom processing for warnings
79
79
  test_files: []