Retrieve the metadata for a previously delivered package.
Methods
- H
- M
- N
- R
Class Public methods
new(*config)
Link
Source: show
# File lib/itunes/store/transporter/command/lookup.rb, line 15 def initialize(*config) super # These 2 are mutually exclusive, and one is required. # Optout has no way to denote this options.on *VENDOR_ID options.on *APPLE_ID options.on *DESTINATION end
Instance Public methods
run(options = {})
Link
Source: show
# File lib/itunes/store/transporter/command/lookup.rb, line 24 def run(options = {}) options[:destination] = Dir.mktmpdir super ensure FileUtils.rm_rf(options[:destination]) if options[:destination] end
Instance Protected methods
handle_success(stdout_lines, stderr_lines, options)
Link
Source: show
# File lib/itunes/store/transporter/command/lookup.rb, line 33 def handle_success(stdout_lines, stderr_lines, options) id = options[:apple_id] || options[:vendor_id] path = File.join(options[:destination], "#{id}.itmsp", "metadata.xml") if !File.exists?(path) raise TransporterError, "No metadata file exists at #{path}" end begin metadata = File.read(path) rescue StandardError => e raise TransporterError, "Failed to read metadata file #{path}: #{e}" end metadata end