fix rubocop Style/EmptyLinesAroundClassBody cop
This commit is contained in:
parent
b1c0dc2428
commit
b9a757e045
|
@ -110,12 +110,6 @@ Style/ElseAlignment:
|
|||
Style/EmptyElse:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 40
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
Style/EmptyLinesAroundClassBody:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
Style/EmptyLinesAroundMethodBody:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
module Zip
|
||||
class Deflater < Compressor #:nodoc:all
|
||||
|
||||
def initialize(output_stream, level = Zip.default_compression, encrypter = NullEncrypter.new)
|
||||
super()
|
||||
@output_stream = output_stream
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
module Zip
|
||||
class DOSTime < Time #:nodoc:all
|
||||
|
||||
#MS-DOS File Date and Time format as used in Interrupt 21H Function 57H:
|
||||
|
||||
# Register CX, the Time:
|
||||
|
|
|
@ -198,7 +198,6 @@ module Zip
|
|||
rescue Error
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
public
|
||||
|
@ -686,7 +685,6 @@ module Zip
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ module Zip
|
|||
# interface for accessing the filesystem, ie. the File and Dir classes.
|
||||
|
||||
class File < CentralDirectory
|
||||
|
||||
CREATE = 1
|
||||
SPLIT_SIGNATURE = 0x08074b50
|
||||
ZIP64_EOCD_SIGNATURE = 0x06064b50
|
||||
|
@ -426,7 +425,6 @@ module Zip
|
|||
temp_file.binmode
|
||||
temp_file
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -65,14 +65,11 @@ module Zip
|
|||
# The individual methods are not documented due to their
|
||||
# similarity with the methods in File
|
||||
class ZipFsFile
|
||||
|
||||
attr_writer :dir
|
||||
# protected :dir
|
||||
|
||||
class ZipFsStat
|
||||
|
||||
class << self
|
||||
|
||||
def delegate_to_fs_file(*methods)
|
||||
methods.each do |method|
|
||||
self.class_eval <<-end_eval, __FILE__, __LINE__ + 1
|
||||
|
@ -82,7 +79,6 @@ module Zip
|
|||
end_eval
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def initialize(zipFsFile, entryName)
|
||||
|
@ -430,7 +426,6 @@ module Zip
|
|||
# The individual methods are not documented due to their
|
||||
# similarity with the methods in Dir
|
||||
class ZipFsDir
|
||||
|
||||
def initialize(mappedZip)
|
||||
@mappedZip = mappedZip
|
||||
end
|
||||
|
@ -504,7 +499,6 @@ module Zip
|
|||
def chroot(*_args)
|
||||
raise NotImplementedError, "The chroot() function is not implemented"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class ZipFsDirIterator # :nodoc:all
|
||||
|
|
|
@ -181,7 +181,6 @@ module Zip
|
|||
@compressor << data
|
||||
self
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
module Zip
|
||||
class PassThruDecompressor < Decompressor #:nodoc:all
|
||||
|
||||
def initialize(input_stream, chars_to_read)
|
||||
super(input_stream)
|
||||
@chars_to_read = chars_to_read
|
||||
|
|
|
@ -11,7 +11,6 @@ require 'zip'
|
|||
# zf = ZipFileGenerator.new(directoryToZip, outputFile)
|
||||
# zf.write()
|
||||
class ZipFileGenerator
|
||||
|
||||
# Initialize with the directory to zip and the location of the output archive.
|
||||
def initialize(inputDir, outputFile)
|
||||
@inputDir = inputDir
|
||||
|
@ -46,5 +45,4 @@ class ZipFileGenerator
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -12,7 +12,6 @@ require 'zip'
|
|||
a = Qt::Application.new(ARGV)
|
||||
|
||||
class ZipDialog < ZipDialogUI
|
||||
|
||||
def initialize
|
||||
super()
|
||||
connect(child('add_button'), SIGNAL('clicked()'),
|
||||
|
|
|
@ -57,5 +57,4 @@ class BasicZipFileTest < MiniTest::Test
|
|||
fileAndEntryName)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ZipCentralDirectoryEntryTest < MiniTest::Test
|
||||
|
||||
def test_read_from_stream
|
||||
File.open("test/data/testDirectory.bin", "rb") do |file|
|
||||
entry = ::Zip::Entry.read_c_dir_entry(file)
|
||||
|
@ -67,5 +66,4 @@ class ZipCentralDirectoryEntryTest < MiniTest::Test
|
|||
fail "ZipError expected"
|
||||
rescue ::Zip::Error
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ZipCentralDirectoryTest < MiniTest::Test
|
||||
|
||||
def teardown
|
||||
::Zip.reset!
|
||||
end
|
||||
|
|
|
@ -160,5 +160,4 @@ class ZipEntryTest < MiniTest::Test
|
|||
|
||||
assert_match(/mimetypeapplication\/epub\+zip/, first_100_bytes)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ErrorsTest < MiniTest::Test
|
||||
|
||||
def test_rescue_legacy_zip_error
|
||||
raise ::Zip::Error
|
||||
rescue ::Zip::ZipError
|
||||
|
@ -32,5 +31,4 @@ class ErrorsTest < MiniTest::Test
|
|||
raise ::Zip::InternalError
|
||||
rescue ::Zip::ZipInternalError
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -73,5 +73,4 @@ class ZipExtraFieldTest < MiniTest::Test
|
|||
extra1.create("IUnix")
|
||||
assert_equal(extra1, extra3)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -80,5 +80,4 @@ class ZipFileExtractTest < MiniTest::Test
|
|||
end
|
||||
assert(!File.exist?(outFile))
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,7 +2,6 @@ require 'test_helper'
|
|||
require 'zip/filesystem'
|
||||
|
||||
class ZipFsDirIteratorTest < MiniTest::Test
|
||||
|
||||
FILENAME_ARRAY = %w(f1 f2 f3 f4 f5 f6)
|
||||
|
||||
def setup
|
||||
|
@ -57,5 +56,4 @@ class ZipFsDirIteratorTest < MiniTest::Test
|
|||
@dirIt.seek(pos)
|
||||
assert_equal(valAtPos, @dirIt.read)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -118,5 +118,4 @@ class ZipFsDirectoryTest < MiniTest::Test
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -85,5 +85,4 @@ class ZipFsFileMutatingTest < MiniTest::Test
|
|||
assert(zf.file.exists?("dir1/dir11/"))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -502,5 +502,4 @@ class ZipFsFileNonmutatingTest < MiniTest::Test
|
|||
assert_equal(orig_file, zip_file)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,7 +2,6 @@ require 'test_helper'
|
|||
require 'zip/filesystem'
|
||||
|
||||
class ZipFsFileStatTest < MiniTest::Test
|
||||
|
||||
def setup
|
||||
@zip_file = ::Zip::File.new("test/data/zipWithDirs.zip")
|
||||
end
|
||||
|
@ -62,5 +61,4 @@ class ZipFsFileStatTest < MiniTest::Test
|
|||
def test_blksize
|
||||
assert_nil(@zip_file.file.stat("file1").blksize)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -52,7 +52,6 @@ class TestFiles
|
|||
end
|
||||
Dir.mkdir(name)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -166,5 +166,4 @@ class ZipInputStreamTest < MiniTest::Test
|
|||
assert_equal("$VERBOSE =", zis.read(10))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ZipLocalEntryTest < MiniTest::Test
|
||||
|
||||
CEH_FILE = 'test/data/generated/centralEntryHeader.bin'
|
||||
LEH_FILE = 'test/data/generated/localEntryHeader.bin'
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ZipUnicodeFileNamesAndComments < MiniTest::Test
|
||||
|
||||
FILENAME = File.join(File.dirname(__FILE__), "test1.zip")
|
||||
|
||||
def test_unicode_file_name
|
||||
|
@ -48,5 +47,4 @@ class ZipUnicodeFileNamesAndComments < MiniTest::Test
|
|||
end
|
||||
::File.unlink(FILENAME)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -46,7 +46,6 @@ if ENV['FULL_ZIP64_TEST']
|
|||
# but some OSes (*cough* OSX) still bundle a 5.xx release
|
||||
assert system("unzip -t #{test_filename}"), "third-party zip validation failed"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -11,5 +11,4 @@ class Zip64SupportTest < MiniTest::Test
|
|||
assert(test_rb.size == 482)
|
||||
assert(test_rb.compressed_size == 229)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue