Class: ITunes::Store::Transporter
- Inherits:
-
Object
- Object
- ITunes::Store::Transporter
- 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/lookup.rb,
lib/itunes/store/transporter/command/option.rb,
lib/itunes/store/transporter/command/schema.rb,
lib/itunes/store/transporter/command/status.rb,
lib/itunes/store/transporter/command/upload.rb,
lib/itunes/store/transporter/command/verify.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 collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
-
#command ⇒ Object
:method: version :call-seq: version.
-
#initialize(options = nil) ⇒ Transporter
constructor
Arguments .
Constructor Details
#initialize(options = nil) ⇒ Transporter
Arguments
- options (Hash)
-
Transporter options
Options
Options given here will be used as defaults for all subsequent method calls. Thus you can set method specific options here but, if you call a method that does not accept one of these options, an OptionError will be raised.
See specific methods for a list of options.
- :username (String)
-
Your username
- :password (String)
-
Your password
- :shortname (String)
-
Your shortname. Optional, not every iTunes account has one
- :path (String)
-
The path to the
iTMSTransporter
. Optional. - :print_stdout (Boolean)
-
Print
iTMSTransporter
‘s stdout to your stdout. Defaults tofalse
. - :print_stderr (Boolean)
-
Print
iTMSTransporter
‘s stderr to your stderr. Defaults tofalse
.
35 36 37 38 39 40 41 42 |
# File 'lib/itunes/store/transporter.rb', line 35 def initialize( = nil) @defaults = () @config = { :path => @defaults.delete(:path), :print_stdout => @defaults.delete(:print_stdout), :print_stderr => @defaults.delete(:print_stderr), } end |
Instance Method Details
#command ⇒ Object
:method: version :call-seq:
version
Return the underlying iTMSTransporter
version.
Returns
- String
-
The version number
200 201 202 203 204 205 206 |
# File 'lib/itunes/store/transporter.rb', line 200 %w|upload verify|.each do |command| define_method(command) do |package, *| = (.first) [:package] = package run_command(command, ) end end |