lib/app_info/dsym.rb in app-info-3.0.0.beta3 vs lib/app_info/dsym.rb in app-info-3.0.0.beta4
- old
+ new
@@ -10,20 +10,23 @@
# @return [Symbol] {Manufacturer}
def manufacturer
Manufacturer::APPLE
end
+ # @return [nil]
def each_file(&block)
files.each { |file| block.call(file) }
end
+ alias each_objects each_file
# @return [Array<DebugInfo>] dsym_files files by alphabetical order
def files
@files ||= Dir.children(contents).sort.each_with_object([]) do |file, obj|
obj << DebugInfo.new(::File.join(contents, file))
end
end
+ alias objects files
def clear!
return unless @contents
FileUtils.rm_rf(@contents)
@@ -50,9 +53,10 @@
unless file_path.start_with?(dsym_filename)
file_path = file_path.split('/')[1..-1].join('/')
end
dest_path = ::File.join(base_path, file_path)
+ FileUtils.mkdir_p(::File.dirname(dest_path))
entry.extract(dest_path) unless ::File.exist?(dest_path)
end
end
}.call
end