From d2b4a528de89d78f718abc810c4ae293eac89578 Mon Sep 17 00:00:00 2001 From: "Pavel.Lobashov" Date: Sun, 22 Mar 2015 19:41:47 +0300 Subject: [PATCH] fix rubocop Style/SpaceAfterComma cop --- .rubocop_rubyzip.yml | 5 ----- lib/zip/extra_field.rb | 2 +- lib/zip/filesystem.rb | 4 ++-- test/filesystem/file_nonmutating_test.rb | 6 +++--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.rubocop_rubyzip.yml b/.rubocop_rubyzip.yml index c5f2df7..5debd94 100644 --- a/.rubocop_rubyzip.yml +++ b/.rubocop_rubyzip.yml @@ -267,11 +267,6 @@ Style/Semicolon: Style/SignalException: Enabled: false -# Offense count: 6 -# Cop supports --auto-correct. -Style/SpaceAfterComma: - Enabled: false - # Offense count: 7 # Cop supports --auto-correct. Style/SpaceAfterMethodName: diff --git a/lib/zip/extra_field.rb b/lib/zip/extra_field.rb index d0a2cd8..1c610d2 100755 --- a/lib/zip/extra_field.rb +++ b/lib/zip/extra_field.rb @@ -61,7 +61,7 @@ module Zip # does not prevent known fields from being read back in def ordered_values result = [] - each { |k,v| k == 'Unknown' ? result.push(v) : result.unshift(v) } + each { |k, v| k == 'Unknown' ? result.push(v) : result.unshift(v) } result end diff --git a/lib/zip/filesystem.rb b/lib/zip/filesystem.rb index eaae41e..05cb9fd 100755 --- a/lib/zip/filesystem.rb +++ b/lib/zip/filesystem.rb @@ -479,8 +479,8 @@ module Zip entries end - def glob(*args,&block) - @mappedZip.glob(*args,&block) + def glob(*args, &block) + @mappedZip.glob(*args, &block) end def foreach(aDirectoryName) diff --git a/test/filesystem/file_nonmutating_test.rb b/test/filesystem/file_nonmutating_test.rb index e27f010..de0159e 100644 --- a/test/filesystem/file_nonmutating_test.rb +++ b/test/filesystem/file_nonmutating_test.rb @@ -236,7 +236,7 @@ class ZipFsFileNonmutatingTest < MiniTest::Test end def test_chown - assert_equal(2, @zip_file.file.chown(1,2, 'dir1', 'file1')) + assert_equal(2, @zip_file.file.chown(1, 2, 'dir1', 'file1')) assert_equal(1, @zip_file.file.stat('dir1').uid) assert_equal(2, @zip_file.file.stat('dir1').gid) assert_equal(2, @zip_file.file.chown(nil, nil, 'dir1', 'file1')) @@ -435,9 +435,9 @@ class ZipFsFileNonmutatingTest < MiniTest::Test { 'globTest/foo.txt' => ['globTest/foo.txt'], '*/foo.txt' => ['globTest/foo.txt'], - '**/foo.txt' => ['globTest/foo.txt','globTest/foo/bar/baz/foo.txt'], + '**/foo.txt' => ['globTest/foo.txt', 'globTest/foo/bar/baz/foo.txt'], '*/foo/**/*.txt' => ['globTest/foo/bar/baz/foo.txt'] - }.each do |spec,expected_results| + }.each do |spec, expected_results| results = zf.glob(spec) assert results.all?{|entry| entry.is_a? ::Zip::Entry }