fix rubocop Style/MultilineBlockLayout cop
This commit is contained in:
parent
930b5ae45b
commit
04f69028f9
|
@ -173,11 +173,6 @@ Style/ModuleFunction:
|
|||
Style/MultilineBlockChain:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
Style/MultilineBlockLayout:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 11
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
|
|
|
@ -70,8 +70,7 @@ part_zips_count = Zip::File.split('large_zip_file.zip', 2097152, false)
|
|||
puts "Zip file splitted in #{part_zips_count} parts"
|
||||
|
||||
# Track splitting an archive
|
||||
Zip::File.split('large_zip_file.zip', 1048576, true, 'part_zip_file') do
|
||||
|part_count, part_index, chunk_bytes, segment_bytes|
|
||||
Zip::File.split('large_zip_file.zip', 1048576, true, 'part_zip_file') do |part_count, part_index, chunk_bytes, segment_bytes|
|
||||
puts "#{part_index} of #{part_count} part splitting: #{(chunk_bytes.to_f / segment_bytes.to_f * 100).to_i}%"
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ class ZipInputStreamTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_openWithBlock
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do
|
||||
|zis|
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do |zis|
|
||||
assert_stream_contents(zis, TestZipFile::TEST_ZIP2)
|
||||
assert_equal(true, zis.eof?)
|
||||
end
|
||||
|
@ -50,8 +49,7 @@ class ZipInputStreamTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_incompleteReads
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do
|
||||
|zis|
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do |zis|
|
||||
entry = zis.get_next_entry # longAscii.txt
|
||||
assert_equal(false, zis.eof?)
|
||||
assert_equal(TestZipFile::TEST_ZIP2.entry_names[0], entry.name)
|
||||
|
@ -114,8 +112,7 @@ class ZipInputStreamTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_rewind
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do
|
||||
|zis|
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do |zis|
|
||||
e = zis.get_next_entry
|
||||
assert_equal(TestZipFile::TEST_ZIP2.entry_names[0], e.name)
|
||||
|
||||
|
@ -145,8 +142,7 @@ class ZipInputStreamTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_mix_read_and_gets
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do
|
||||
|zis|
|
||||
::Zip::InputStream.open(TestZipFile::TEST_ZIP2.zip_name) do |zis|
|
||||
zis.get_next_entry
|
||||
assert_equal('#!/usr/bin/env ruby', zis.gets.chomp)
|
||||
assert_equal(false, zis.eof?)
|
||||
|
|
|
@ -27,8 +27,7 @@ class ZipLocalEntryTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_readDateTime
|
||||
::File.open('test/data/rubycode.zip', 'rb') do
|
||||
|file|
|
||||
::File.open('test/data/rubycode.zip', 'rb') do |file|
|
||||
entry = ::Zip::Entry.read_local_entry(file)
|
||||
assert_equal('zippedruby1.rb', entry.name)
|
||||
assert_equal(::Zip::DOSTime.at(1019261638), entry.time)
|
||||
|
@ -36,8 +35,7 @@ class ZipLocalEntryTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_read_local_entryFromNonZipFile
|
||||
::File.open('test/data/file2.txt') do
|
||||
|file|
|
||||
::File.open('test/data/file2.txt') do |file|
|
||||
assert_equal(nil, ::Zip::Entry.read_local_entry(file))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue