diff --git a/.rubocop.yml b/.rubocop.yml index 7c546f08a..6b00d273d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,6 +10,7 @@ AllCops: - 'bin/rake' - 'bin/spring' - 'db/schema.rb' + - 'vendor/**/*' Rails: Enabled: true diff --git a/Gemfile.lock b/Gemfile.lock index 11abf63ff..f51d867be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -409,7 +409,7 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.61.1) + rubocop (0.62.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) @@ -486,7 +486,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.5) - unicode-display_width (1.4.0) + unicode-display_width (1.4.1) unicorn (5.3.1) kgio (~> 2.6) raindrops (~> 0.7) diff --git a/lib/import/base_factory.rb b/lib/import/base_factory.rb index 0b77ce75c..c7afc4a8d 100644 --- a/lib/import/base_factory.rb +++ b/lib/import/base_factory.rb @@ -1,7 +1,5 @@ module Import module BaseFactory - - # rubocop:disable Style/ModuleFunction extend self def import_action(records, *args) diff --git a/lib/import/otrs.rb b/lib/import/otrs.rb index d058e3ea6..2d75aaca2 100644 --- a/lib/import/otrs.rb +++ b/lib/import/otrs.rb @@ -27,8 +27,6 @@ module Import extend Import::OTRS::ImportStats extend Import::OTRS::Async extend Import::OTRS::Diff - - # rubocop:disable Style/ModuleFunction extend self def start diff --git a/lib/import/otrs/article/attachment_factory.rb b/lib/import/otrs/article/attachment_factory.rb index bdcf57540..968bdecbe 100644 --- a/lib/import/otrs/article/attachment_factory.rb +++ b/lib/import/otrs/article/attachment_factory.rb @@ -3,8 +3,6 @@ module Import class Article module AttachmentFactory extend Import::Helper - - # rubocop:disable Style/ModuleFunction extend self def import(args) diff --git a/lib/import/otrs/diff.rb b/lib/import/otrs/diff.rb index 882d91ac1..c26c8fcf7 100644 --- a/lib/import/otrs/diff.rb +++ b/lib/import/otrs/diff.rb @@ -1,7 +1,6 @@ module Import module OTRS module Diff - # rubocop:disable Style/ModuleFunction extend self def diff_worker diff --git a/lib/import/otrs/dynamic_field_factory.rb b/lib/import/otrs/dynamic_field_factory.rb index b4df8bdc5..3b9ef5c53 100644 --- a/lib/import/otrs/dynamic_field_factory.rb +++ b/lib/import/otrs/dynamic_field_factory.rb @@ -3,8 +3,6 @@ module Import module DynamicFieldFactory extend Import::Factory extend Import::Helper - - # rubocop:disable Style/ModuleFunction extend self def skip?(record, *_args) diff --git a/lib/import/otrs/helper.rb b/lib/import/otrs/helper.rb index cf53ffff2..687ba770e 100644 --- a/lib/import/otrs/helper.rb +++ b/lib/import/otrs/helper.rb @@ -1,7 +1,6 @@ module Import module OTRS module Helper - # rubocop:disable Style/ModuleFunction extend self private diff --git a/lib/import/otrs/history_factory.rb b/lib/import/otrs/history_factory.rb index f75c22b26..81f6c9483 100644 --- a/lib/import/otrs/history_factory.rb +++ b/lib/import/otrs/history_factory.rb @@ -2,8 +2,6 @@ module Import module OTRS module HistoryFactory extend Import::Factory - - # rubocop:disable Style/ModuleFunction extend self def skip?(record, *_args) diff --git a/lib/import/otrs/import_stats.rb b/lib/import/otrs/import_stats.rb index e783b5a0f..dccdf11ed 100644 --- a/lib/import/otrs/import_stats.rb +++ b/lib/import/otrs/import_stats.rb @@ -1,7 +1,6 @@ module Import module OTRS module ImportStats - # rubocop:disable Style/ModuleFunction extend self def current_state diff --git a/lib/import/otrs/requester.rb b/lib/import/otrs/requester.rb index 3c7eae7ab..d9f6415cd 100644 --- a/lib/import/otrs/requester.rb +++ b/lib/import/otrs/requester.rb @@ -5,8 +5,6 @@ module Import # @return [Number] the sleep time between the request retries module Requester extend Import::Helper - - # rubocop:disable Style/ModuleFunction extend self attr_accessor :retry_sleep diff --git a/lib/import/otrs/sys_config_factory.rb b/lib/import/otrs/sys_config_factory.rb index 43c7ba114..34b92933d 100644 --- a/lib/import/otrs/sys_config_factory.rb +++ b/lib/import/otrs/sys_config_factory.rb @@ -1,8 +1,6 @@ module Import module OTRS module SysConfigFactory - - # rubocop:disable Style/ModuleFunction extend self def import(settings, *_args) diff --git a/lib/password_hash.rb b/lib/password_hash.rb index 4c94a08c6..5e5f230ba 100644 --- a/lib/password_hash.rb +++ b/lib/password_hash.rb @@ -3,7 +3,7 @@ module PasswordHash include ApplicationLib - extend self # rubocop:disable Style/ModuleFunction + extend self def crypt(password) argon2.create(password)