fix fpm for ruby 1.9
This commit is contained in:
parent
864f733c99
commit
922751497f
|
|
@ -94,7 +94,7 @@ class FPM::Builder
|
|||
# TODO: [Jay] make this better.
|
||||
private
|
||||
def package_class_for(type)
|
||||
type = FPM::Target::constants.find { |c| c.downcase == type }
|
||||
type = FPM::Target::constants.find { |c| c.downcase.to_s == type }
|
||||
if !type
|
||||
raise ArgumentError, "unknown package type #{type.inspect}"
|
||||
end
|
||||
|
|
@ -105,7 +105,7 @@ class FPM::Builder
|
|||
# TODO: [Jay] make this better.
|
||||
private
|
||||
def source_class_for(type)
|
||||
type = FPM::Source::constants.find { |c| c.downcase == type }
|
||||
type = FPM::Source::constants.find { |c| c.downcase.to_s == type }
|
||||
if !type
|
||||
raise ArgumentError, "unknown package type #{type.inspect}"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class FPM::Source
|
|||
private
|
||||
def tar(output, paths, chdir=".")
|
||||
dirs = []
|
||||
paths = [ paths ] if paths.is_a? String
|
||||
paths.each do |path|
|
||||
while path != "/" and path != "."
|
||||
dirs << path if !dirs.include?(path)
|
||||
|
|
|
|||
Loading…
Reference in New Issue