Module: FPM::Issues::TarWriter

Defined in:
lib/fpm/util/tar_writer.rb

Class Method Summary collapse

Class Method Details

.has_issue_1608?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
# File 'lib/fpm/util/tar_writer.rb', line 9

def self.has_issue_1608?
  name, prefix = nil,nil
  io = StringIO.new
  ::Gem::Package::TarWriter.new(io) do |tw|
    name, prefix = tw.split_name('/123456789'*9 + '/1234567890') # abs name 101 chars long
  end
  return prefix.empty?
end

.has_issues_with_add_symlink?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/fpm/util/tar_writer.rb', line 23

def self.has_issues_with_add_symlink?
  return !::Gem::Package::TarWriter.public_instance_methods.include?(:add_symlink)
end

.has_issues_with_split_name?Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/fpm/util/tar_writer.rb', line 18

def self.has_issues_with_split_name?
  return false unless ::Gem::Package::TarWriter.method_defined?(:split_name)
  return has_issue_1608?
end