rubocop-rubycw 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/lib/rubocop/rubycw/inject.rb +2 -2
- data/lib/rubocop/rubycw/version.rb +1 -1
- data/lib/rubocop/rubycw/warning_capturer.rb +7 -2
- data/rubocop-rubycw.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 979e01a9b40b87393441a06a1c664f1ae89a09872fb4dcf067154201a1805559
|
4
|
+
data.tar.gz: 6cc2b141cd593ef75a81790cc5038f1b79e5d3305461a5d6b7d1505025e36226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8f915423ace490c3a5537cc5fef4a4df02ca2c990387248a08dfeab217f478bad71e141c7d1aa69f058c93e50d6cf5b1a1d78d26f89ce0a35f1a2b046f13bbf
|
7
|
+
data.tar.gz: 40f956aaa1ef3f9cfbbf89f2d7ae182e9f3ac9a50b0c655b0f2f7c298c1f627aca3318e882a71fb4459c23b15cb4aa8ee3e24410ad7625bfc3f106566905c3f0
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ You can get Ruby's warning as a RuboCop offense by rubocop-rubycw.
|
|
6
6
|
|
7
7
|
## Requirements
|
8
8
|
|
9
|
-
* Ruby 2.
|
9
|
+
* Ruby 2.4 or greater.
|
10
10
|
* But I highly recommend to use Ruby 2.6 or greater.
|
11
11
|
Because it is about 10x slower if it works on Ruby 2.5 or lower.
|
12
12
|
|
@@ -42,5 +42,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
45
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop
|
46
|
-
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop/rubocop-rubycw.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# The original code is from https://github.com/rubocop
|
4
|
-
# See https://github.com/rubocop
|
3
|
+
# The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
+
# See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
|
5
5
|
module RuboCop
|
6
6
|
module Rubycw
|
7
7
|
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
@@ -5,11 +5,16 @@ module RuboCop
|
|
5
5
|
module WarningCapturer
|
6
6
|
if defined?(RubyVM::AbstractSyntaxTree)
|
7
7
|
module ::Warning
|
8
|
-
def self.warn(*message)
|
8
|
+
def self.warn(*message, **kwargs)
|
9
9
|
if WarningCapturer.warnings
|
10
10
|
WarningCapturer.warnings.concat message
|
11
11
|
else
|
12
|
-
|
12
|
+
if RUBY_VERSION >= '3'
|
13
|
+
# kwargs is available since Ruby 3
|
14
|
+
super(*message, **kwargs)
|
15
|
+
else
|
16
|
+
super(*message)
|
17
|
+
end
|
13
18
|
end
|
14
19
|
end
|
15
20
|
end
|
data/rubocop-rubycw.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = %q{Integrate RuboCop and ruby -cw}
|
10
10
|
spec.description = %q{Integrate RuboCop and ruby -cw}
|
11
|
-
spec.homepage = "https://github.com/rubocop
|
11
|
+
spec.homepage = "https://github.com/rubocop/rubocop-rubycw"
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rubycw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -50,12 +50,12 @@ files:
|
|
50
50
|
- lib/rubocop/rubycw/version.rb
|
51
51
|
- lib/rubocop/rubycw/warning_capturer.rb
|
52
52
|
- rubocop-rubycw.gemspec
|
53
|
-
homepage: https://github.com/rubocop
|
53
|
+
homepage: https://github.com/rubocop/rubocop-rubycw
|
54
54
|
licenses:
|
55
55
|
- MIT
|
56
56
|
metadata:
|
57
|
-
homepage_uri: https://github.com/rubocop
|
58
|
-
source_code_uri: https://github.com/rubocop
|
57
|
+
homepage_uri: https://github.com/rubocop/rubocop-rubycw
|
58
|
+
source_code_uri: https://github.com/rubocop/rubocop-rubycw
|
59
59
|
post_install_message:
|
60
60
|
rdoc_options: []
|
61
61
|
require_paths:
|