rubocop-require_tools 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6aad89fc31b6e29a59acf207c01b17ce9c9100a5997f01852eb2e1eae34bbb6a
4
- data.tar.gz: d2c82a9d7073595006896f8a5a7ba753ea1157c7bfc8380c39011e36f01975b3
3
+ metadata.gz: f658c721326cca19adfdc5bb88f598822a32495bd93f10fa57a0a6f942b9c6e6
4
+ data.tar.gz: 2b62cdc0cc7526d6515e9ad2be7b7007deb32b3f262442bac9fefa88e86b81f7
5
5
  SHA512:
6
- metadata.gz: 8c0164d3c342f46b145a37c6a6a05754467291ac42cbf515559c3202cf13a397b1bcb80c39eeaf7470d00dd0f00acecd6370ded22a04e948380174f07191369a
7
- data.tar.gz: 6f1c2a65941b56a6f9a757c66988996331370b5ccdef249a52de7ed466c9ebf9f7cc8b567aed5d86ff01d528caee221100dbbeb4a79b7334b8e7c3272bc8a9b3
6
+ metadata.gz: f44235058b0562548c5930e81976e9d1d0c0740b760b0ea23acab6bcabfe9d54a3ac741feb904df335873485d8e6afa23cf000d849c0639195834aef2f01426f
7
+ data.tar.gz: e0cc840b8ba661f2aeb39b87bb212a19b3020dae0fff1a1da0098ad9ed29c450ff676f1cbd9328dab3a9d182d5b0ce4b8fa6752df1f18aa27b2b9954c7e0f52f
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-require_tools (0.1.0)
5
- rubocop (~> 0.49)
4
+ rubocop-require_tools (0.1.2)
5
+ rubocop (>= 0.49.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -63,6 +63,19 @@ module RuboCop
63
63
  end
64
64
  end
65
65
 
66
+ def add_offense(node, location: nil, message:)
67
+ # Work around breaking API changes between rubocop 0.49.1 and later (...)
68
+ signature_old = %i[node loc message severity]
69
+ param_info = RuboCop::Cop::Cop.instance_method(:add_offense).parameters
70
+ if param_info.map(&:last) == signature_old
71
+ super(node, location || :expression, message)
72
+ elsif location
73
+ super(node, location: location, message: message)
74
+ else
75
+ super(node, message: message)
76
+ end
77
+ end
78
+
66
79
  def_node_matcher :extract_inner_const, <<-PATTERN
67
80
  (const $!nil? _)
68
81
  PATTERN
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module RequireTools
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.1.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-require_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manu Wallner