Class: ITunes::Store::Transporter

Inherits:
Object
  • Object
show all
Defined in:
lib/itunes/store/transporter.rb,
lib/itunes/store/transporter/shell.rb,
lib/itunes/store/transporter/errors.rb,
lib/itunes/store/transporter/command.rb,
lib/itunes/store/transporter/version.rb,
lib/itunes/store/transporter/output_parser.rb,
lib/itunes/store/transporter/command/upload.rb,
lib/itunes/store/transporter/command/schema.rb,
lib/itunes/store/transporter/command/option.rb,
lib/itunes/store/transporter/command/status.rb,
lib/itunes/store/transporter/command/verify.rb,
lib/itunes/store/transporter/command/lookup.rb,
lib/itunes/store/transporter/command/version.rb,
lib/itunes/store/transporter/command/providers.rb

Overview

Upload and manage your assets in the iTunes Store using the iTunes Store's Transporter (iTMSTransporter).

Defined Under Namespace

Modules: Command Classes: ExecutionError, OptionError, OutputParser, Shell, TransporterError, TransporterMessage

Constant Summary

VERSION =
"0.0.1"

Instance Method Summary (collapse)

Constructor Details

- (Transporter) initialize(options = {})

Options

Options given here will be used as options for all subsequent method calls. Thus you can set method specific options here but, if you call a method that does not accept these options, it will raise an OptionError.

:path

The path to the iTMSTransporter. Optional.

:print_stdout

Print iTMSTransporter's stdout to your stdout. Defaults to false.

:print_stderr

Print iTMSTransporter's stderr to your stderr. Defaults to false.



27
28
29
30
31
32
33
34
# File 'lib/itunes/store/transporter.rb', line 27

def initialize(options = {})
  @defaults = options.dup
  @config = { 
    :path	      => @defaults.delete(:path),
    :print_stdout => @defaults.delete(:print_stdout), 
    :print_stderr => @defaults.delete(:print_stderr), 
  }        
end

Instance Method Details

- (Object) command

:method: version :call-seq:

version

Return the underlying iTMSTransporter version.

Returns

String

The version number



136
137
138
139
140
141
142
# File 'lib/itunes/store/transporter.rb', line 136

%w|upload verify|.each do |command|
  define_method(command) do |package, *options| 
    cmd_options = Hash === options.first ? options.shift.dup : {}
    cmd_options[:package] = package
    run_command(command, cmd_options)
  end
end