class XcodeResultBundleProcessor::TarballResultsBundle
Public Class Methods
new(path)
click to toggle source
# File lib/xcoderesultbundleprocessor/results_bundle.rb, line 21 def initialize(path) file = File.new(path) zip = Zlib::GzipReader.new(file) @tar = Gem::Package::TarReader.new(zip) end
Public Instance Methods
copy_file(source, destination)
click to toggle source
# File lib/xcoderesultbundleprocessor/results_bundle.rb, line 37 def copy_file(source, destination) @tar.seek("./#{source}") do |source_entry| File.open(destination, 'w') do |destination_file| destination_file.write(source_entry.read) end end end
open_file(path, &block)
click to toggle source
# File lib/xcoderesultbundleprocessor/results_bundle.rb, line 33 def open_file(path, &block) @tar.seek("./#{path}", &block) end
read_plist(path)
click to toggle source
# File lib/xcoderesultbundleprocessor/results_bundle.rb, line 27 def read_plist(path) @tar.seek("./#{path}") do |plist_entry| CFPropertyList.native_types(CFPropertyList::List.new(data: plist_entry.read).value) end end