From 25d5f74f3ef54aba3baa43c4adcd323f2cb0fdc6 Mon Sep 17 00:00:00 2001 From: Markus Reiter <me@reitermark.us> Date: Fri, 23 Sep 2016 17:36:27 +0200 Subject: [PATCH] Fix Style/ModuleFunction. --- Library/.rubocop_todo.yml | 2 -- Library/Homebrew/utils/github.rb | 3 ++- Library/Homebrew/utils/json.rb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Library/.rubocop_todo.yml b/Library/.rubocop_todo.yml index 4819be65a2..b5b1cd28e6 100644 --- a/Library/.rubocop_todo.yml +++ b/Library/.rubocop_todo.yml @@ -187,8 +187,6 @@ Style/ModuleFunction: - 'Homebrew/os/mac.rb' - 'Homebrew/os/mac/xcode.rb' - 'Homebrew/os/mac/xquartz.rb' - - 'Homebrew/utils/github.rb' - - 'Homebrew/utils/json.rb' # Offense count: 8 Style/MultilineBlockChain: diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 654272363e..b7ec538f9f 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -2,7 +2,8 @@ require "uri" require "tempfile" module GitHub - extend self + module_function + ISSUES_URI = URI.parse("https://api.github.com/search/issues") Error = Class.new(RuntimeError) diff --git a/Library/Homebrew/utils/json.rb b/Library/Homebrew/utils/json.rb index 8a8cb6847f..19d32a1e18 100644 --- a/Library/Homebrew/utils/json.rb +++ b/Library/Homebrew/utils/json.rb @@ -2,7 +2,7 @@ require "vendor/okjson" module Utils module JSON - extend self + module_function Error = Class.new(StandardError) -- GitLab