Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Commit c472007

Browse files
committed
Use keyword arguments for Cop#add_offense
RuboCop introduced the keyword arguments in 0.51 (rubocop/rubocop#4786) and will remove positional arguments in 0.52 (rubocop/rubocop#4911).
1 parent 7fb0a25 commit c472007

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rubocop/cop/rspec/focused.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def on_block(node)
3131
_receiver, method_name, _object, *metadata = *method
3232

3333
if FOCUSED_METHODS.include?(method_name) || focus_set_to_true?(metadata)
34-
add_offense(node, :expression, MESSAGE)
34+
add_offense(node, location: :expression, message: MESSAGE)
3535
end
3636
end
3737

rubocop-rspec-focused.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
1818
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1919
spec.require_paths = ["lib"]
2020

21-
spec.add_runtime_dependency "rubocop", ">= 0.37"
21+
spec.add_runtime_dependency "rubocop", ">= 0.51"
2222

2323
spec.add_development_dependency "bundler", "~> 1.6"
2424
spec.add_development_dependency "rake", "~> 10.0"

0 commit comments

Comments
 (0)