fix rubocop Style/LineEndConcatenation cop

This commit is contained in:
Pavel Lobashov 2015-03-23 19:03:28 +03:00
parent edf3126599
commit d5f79822c1
5 changed files with 9 additions and 14 deletions

View File

@ -170,11 +170,6 @@ Style/Lambda:
Style/LeadingCommentSpace: Style/LeadingCommentSpace:
Enabled: false Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
Style/LineEndConcatenation:
Enabled: false
# Offense count: 7 # Offense count: 7
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/MethodCallParentheses: Style/MethodCallParentheses:

View File

@ -514,7 +514,7 @@ module Zip
when 'file' when 'file'
if name_is_directory? if name_is_directory?
raise ArgumentError, raise ArgumentError,
"entry name '#{newEntry}' indicates directory entry, but " + "entry name '#{newEntry}' indicates directory entry, but " \
"'#{src_path}' is not a directory" "'#{src_path}' is not a directory"
end end
:file :file
@ -524,7 +524,7 @@ module Zip
when 'link' when 'link'
if name_is_directory? if name_is_directory?
raise ArgumentError, raise ArgumentError,
"entry name '#{newEntry}' indicates directory entry, but " + "entry name '#{newEntry}' indicates directory entry, but " \
"'#{src_path}' is not a directory" "'#{src_path}' is not a directory"
end end
:symlink :symlink
@ -597,7 +597,7 @@ module Zip
::FileUtils.rm_f dest_path ::FileUtils.rm_f dest_path
else else
raise ::Zip::DestinationFileExistsError, raise ::Zip::DestinationFileExistsError,
"Cannot create directory '#{dest_path}'. " + "Cannot create directory '#{dest_path}'. " \
'A file already exists with that name' 'A file already exists with that name'
end end
end end
@ -622,12 +622,12 @@ module Zip
return return
else else
raise ::Zip::DestinationFileExistsError, raise ::Zip::DestinationFileExistsError,
"Cannot create symlink '#{dest_path}'. " + "Cannot create symlink '#{dest_path}'. " \
'A symlink already exists with that name' 'A symlink already exists with that name'
end end
else else
raise ::Zip::DestinationFileExistsError, raise ::Zip::DestinationFileExistsError,
"Cannot create symlink '#{dest_path}'. " + "Cannot create symlink '#{dest_path}'. " \
'A file already exists with that name' 'A file already exists with that name'
end end
end end

View File

@ -379,7 +379,7 @@ module Zip
srcPathIsDirectory = ::File.directory?(srcPath) srcPathIsDirectory = ::File.directory?(srcPath)
if newEntry.is_directory && !srcPathIsDirectory if newEntry.is_directory && !srcPathIsDirectory
raise ArgumentError, raise ArgumentError,
"entry name '#{newEntry}' indicates directory entry, but " + "entry name '#{newEntry}' indicates directory entry, but " \
"'#{srcPath}' is not a directory" "'#{srcPath}' is not a directory"
elsif !newEntry.is_directory && srcPathIsDirectory elsif !newEntry.is_directory && srcPathIsDirectory
newEntry.name += '/' newEntry.name += '/'

View File

@ -132,7 +132,7 @@ module Zip
&& @current_entry.compressed_size == 0 \ && @current_entry.compressed_size == 0 \
&& @current_entry.size == 0 && @current_entry.size == 0
raise GPFBit3Error, raise GPFBit3Error,
'General purpose flag Bit 3 is set so not possible to get proper info from local header.' + \ 'General purpose flag Bit 3 is set so not possible to get proper info from local header.' \
'Please use ::Zip::File instead of ::Zip::InputStream' 'Please use ::Zip::File instead of ::Zip::InputStream'
end end
@decompressor = get_decompressor @decompressor = get_decompressor

View File

@ -108,8 +108,8 @@ class TestZipFile
# http://stahlworks.com/dev/index.php?tool=zipunzip # http://stahlworks.com/dev/index.php?tool=zipunzip
# that works with the above code # that works with the above code
raise $!.to_s + raise $!.to_s +
"\n\nziptest.rb requires the Info-ZIP program 'zip' in the path\n" + "\n\nziptest.rb requires the Info-ZIP program 'zip' in the path\n" \
"to create test data. If you don't have it you can download\n" + "to create test data. If you don't have it you can download\n" \
'the necessary test files at http://sf.net/projects/rubyzip.' 'the necessary test files at http://sf.net/projects/rubyzip.'
end end