From 8b258ca18a70d4832cac9dd9db22f585dcb39705 Mon Sep 17 00:00:00 2001 From: Robert Mosolgo Date: Thu, 15 Mar 2018 10:59:08 -0400 Subject: [PATCH] Support rubocop 0.53 --- lib/rubocop/cop/graphql/overfetch.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rubocop/cop/graphql/overfetch.rb b/lib/rubocop/cop/graphql/overfetch.rb index a7cab8a..15469aa 100644 --- a/lib/rubocop/cop/graphql/overfetch.rb +++ b/lib/rubocop/cop/graphql/overfetch.rb @@ -9,6 +9,11 @@ module RuboCop module GraphQL # Public: Rubocop for catching overfetched fields in ERB templates. class Overfetch < Cop + if defined?(RangeHelp) + # rubocop 0.53 moved the #source_range method into this module + include RangeHelp + end + def_node_search :send_methods, "({send csend block_pass} ...)" def investigate(processed_source)