Commit 72d41fc4f8e4af72704456842f4647fc0868da57

Anton Maminov 2021-01-07T13:26:06

fix rubocop warnings

diff --git a/.rubocop.yml b/.rubocop.yml
index e75ab57..7bef84d 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,4 +1,7 @@
-Metrics/LineLength:
+AllCops:
+  NewCops: enable
+
+Layout/LineLength:
   Max: 120
 
 Metrics/AbcSize:
diff --git a/.ruby-version b/.ruby-version
deleted file mode 100644
index 57cf282..0000000
--- a/.ruby-version
+++ /dev/null
@@ -1 +0,0 @@
-2.6.5
diff --git a/lib/mpd_client.rb b/lib/mpd_client.rb
index 0cf86d5..82b9655 100644
--- a/lib/mpd_client.rb
+++ b/lib/mpd_client.rb
@@ -251,10 +251,10 @@ module MPD
       @mutex.synchronize do
         write_command(command, *args)
 
-        if !@command_list.nil?
-          @command_list << retval
-        else
+        if @command_list.nil?
           eval retval
+        else
+          @command_list << retval
         end
       end
     end
diff --git a/mpd_client.gemspec b/mpd_client.gemspec
index b38d65d..7cee0d3 100644
--- a/mpd_client.gemspec
+++ b/mpd_client.gemspec
@@ -14,10 +14,11 @@ Gem::Specification.new do |gem|
   gem.files         = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
   gem.executables   = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
   gem.test_files    = gem.files.grep(%r{^(test|spec|features)/})
+  gem.required_ruby_version = '>= 2.6.0'
   gem.name          = 'mpd_client'
   gem.require_paths = ['lib']
   gem.version       = MPD::Client::VERSION
   gem.license       = 'MIT'
 
-  gem.add_development_dependency 'bundler', '~> 1.16'
+  gem.add_development_dependency 'bundler'
 end