diff options
| -rw-r--r-- | .rubocop.yml | 2 | ||||
| -rw-r--r-- | .rubocop_todo.yml | 9 | ||||
| -rwxr-xr-x | bin/nickserver | 2 | ||||
| -rw-r--r-- | lib/nickserver/daemon.rb | 2 | ||||
| -rw-r--r-- | test/unit/hkp_test.rb | 2 | 
5 files changed, 5 insertions, 12 deletions
| diff --git a/.rubocop.yml b/.rubocop.yml index 4dd43ac..503bc17 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,3 +6,5 @@ Style/GuardClause:  Style/HashSyntax:    EnforcedStyle: ruby19_no_mixed_keys +Lint/DeprecatedClassMethods: +  Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3bdc98d..6f7fb89 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -18,15 +18,6 @@ Lint/AssignmentInCondition:      - 'Rakefile'      - 'lib/nickserver/daemon.rb' -# Offense count: 5 -# Cop supports --auto-correct. -Lint/DeprecatedClassMethods: -  Exclude: -    - 'Rakefile' -    - 'bin/nickserver' -    - 'lib/nickserver/daemon.rb' -    - 'test/unit/hkp_test.rb' -  # Offense count: 11  # Cop supports --auto-correct.  # Configuration parameters: AlignWith, SupportedStyles, AutoCorrect. diff --git a/bin/nickserver b/bin/nickserver index 062684f..f3795bf 100755 --- a/bin/nickserver +++ b/bin/nickserver @@ -7,7 +7,7 @@  def load_local_gem(dir_path='../..')    base_directory = File.expand_path(dir_path, File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__)    if !$LOAD_PATH.include? "#{base_directory}/lib" -    if File.exists?("#{base_directory}/Gemfile.lock") +    if File.exist?("#{base_directory}/Gemfile.lock")        ENV['BUNDLE_GEMFILE'] ||= "#{base_directory}/Gemfile"        require 'bundler'        Bundler.require(:default) diff --git a/lib/nickserver/daemon.rb b/lib/nickserver/daemon.rb index a7326d9..7d0f02a 100644 --- a/lib/nickserver/daemon.rb +++ b/lib/nickserver/daemon.rb @@ -105,7 +105,7 @@ module Nickserver      def kill_pid        file = Config.pid_file -      if File.exists?(file) +      if File.exist?(file)          pid = pid_from_file(file)          if pid            Process.kill('TERM', pid) diff --git a/test/unit/hkp_test.rb b/test/unit/hkp_test.rb index f23fe72..0ecde2d 100644 --- a/test/unit/hkp_test.rb +++ b/test/unit/hkp_test.rb @@ -98,7 +98,7 @@ class HkpTest < Minitest::Test        stub_config(:hkp_url, hkp_url) do          stub_config(:hkp_ca_file, ca_file) do          #stub_config(:hkp_ca_file, file_path('autistici-ca.pem')) do -          assert File.exists?(Nickserver::Config.hkp_ca_file) +          assert File.exist?(Nickserver::Config.hkp_ca_file)            uid = 'elijah@riseup.net'            test_em_callback "Nickserver::HKP::FetchKeyInfo.new.search '#{uid}'" do |keys|              assert_equal 1, keys.size | 
