fix rubocop Style/SpaceAfterComma cop

This commit is contained in:
Pavel.Lobashov 2015-03-22 19:41:47 +03:00
parent 707bd44e66
commit d2b4a528de
4 changed files with 6 additions and 11 deletions

View File

@ -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:

View File

@ -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

View File

@ -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)

View File

@ -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 }