itunes_store_transporter 0.1.2beta → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +12 -3
- data/README.rdoc +14 -4
- data/lib/itunes/store/transporter/command/status.rb +6 -6
- data/lib/itunes/store/transporter/command/upload.rb +2 -1
- data/lib/itunes/store/transporter/itms_transporter.rb +55 -55
- data/lib/itunes/store/transporter/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7127018124d73b10742187cbd8ca283b2d70fe6
|
4
|
+
data.tar.gz: 9967d8bab13f0c965e383522491227cf7bfac5e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edef7e176540218a6b572e27c8f1a23dba40f51e2fbc7cc637f00db563033293fd38ad957957d386e08acdce8c14960078493fc85e4c89a7522e811d9a4972a3
|
7
|
+
data.tar.gz: caac988d22b3d8dc46ba05d7692c86eeb97790bda4f546a7f0562eeaec897f6746341e0e6e3cbb56fff046331e6da26256045cb0ff072edd4f927f5d2a1678e3
|
data/Changes
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
v0.1.2 2015-03-07
|
2
|
+
--------------------
|
3
|
+
Changes:
|
4
|
+
* Only parse errors from the main iTMSTransporter thread
|
5
|
+
|
6
|
+
Enhancements:
|
7
|
+
* Look for the iTMSTransporter at known locations on OS X
|
8
|
+
* Add the :streams (-numStreams) option to upload
|
9
|
+
|
1
10
|
v0.1.1 2013-08-14
|
2
11
|
--------------------
|
3
|
-
Changes:
|
4
|
-
* Added post_install_message letting Windows users know they need to modify iTMSTransporter.CMD
|
12
|
+
Changes:
|
13
|
+
* Added post_install_message letting Windows users know they need to modify iTMSTransporter.CMD
|
5
14
|
* Transporter is now a module, new() returns an instance of ITMSTransporter
|
6
15
|
|
7
16
|
Bug fixes:
|
@@ -22,7 +31,7 @@ Enhancements:
|
|
22
31
|
* `itms` added --no-config option
|
23
32
|
* `itms` allow boolean options to be set to false via --no-XXXX, e.g., --no-print-stderr
|
24
33
|
|
25
|
-
Bug Fixes:
|
34
|
+
Bug Fixes:
|
26
35
|
* `itms status` passed the wrong arguments to the underlying method
|
27
36
|
* `itms` failed when the config file was empty
|
28
37
|
* Verify command :verify_assets => true would disable asset verification
|
data/README.rdoc
CHANGED
@@ -74,10 +74,20 @@ This can be fixed by modifying +iTMSTransporter.CMD+ (note that the following do
|
|
74
74
|
|
75
75
|
=== Using itms
|
76
76
|
|
77
|
-
<code>itms COMMAND [OPTIONS]</code>
|
77
|
+
<code>itms COMMAND [OPTIONS] [PACKAGE]</code>
|
78
78
|
|
79
|
-
* +COMMAND+ - The command
|
80
|
-
* +OPTIONS+ - These are quivalent to the given +COMMAND+'s options except they must be given in long option format. For example <code>:apple_id => "X123"</code> would be <code>--apple-id=X123</code>. Boolean options can be negated with the <code>--no-</code> prefix.
|
79
|
+
* +COMMAND+ - The command to run, which can be any one of {the <code>iTunes::Store::Transporter</code> methods}[http://ruby-doc.org/gems/docs/i/itunes_store_transporter-0.1.1/ITunes/Store/Transporter/ITMSTransporter.html]
|
80
|
+
* +OPTIONS+ - These are quivalent to the given +COMMAND+'s options except they must be given in a strict long option format. For example <code>:apple_id => "X123"</code> would be <code>--apple-id=X123</code>. Boolean options can be negated with the <code>--no-</code> prefix. For more info see {each command's options}[http://ruby-doc.org/gems/docs/i/itunes_store_transporter-0.1.1/ITunes/Store/Transporter/ITMSTransporter.html].
|
81
|
+
* +PACKAGE+ - The package or directory to operate on, if required by the command
|
82
|
+
|
83
|
+
<b>Note that options with a value must contain the equals character</b> (<code>"="</code>).
|
84
|
+
The format is <code>--option=value</code> and not <code>--option value</code>.
|
85
|
+
|
86
|
+
==== Examples
|
87
|
+
|
88
|
+
itms upload --username=sshaw --password=w3cAllYoU --transport=aspera a_package.itmsp
|
89
|
+
itms version
|
90
|
+
itms status --no-print-stderr --vendor-id=X123123 --username=sshaw --password=sekr3t_ --shortname=ss
|
81
91
|
|
82
92
|
==== Username, Password, Short Name
|
83
93
|
|
@@ -95,7 +105,7 @@ For example, to lookup the metadata for package +X123+ and download low-quality
|
|
95
105
|
itms lookup --vendor-id=X123 --assets
|
96
106
|
|
97
107
|
To download a particular asset type just provide its name:
|
98
|
-
|
108
|
+
|
99
109
|
itms lookup --vendor-id=X123 --assets=preview
|
100
110
|
|
101
111
|
If there are multiple territories this will download the preview assets for each of them. To only download assets in a given territory or territories use:
|
@@ -4,18 +4,18 @@ module ITunes
|
|
4
4
|
module Store
|
5
5
|
module Transporter
|
6
6
|
module Command # :nodoc:
|
7
|
-
|
7
|
+
|
8
8
|
##
|
9
9
|
# Retrieve the status of a previously uploaded package
|
10
10
|
#
|
11
11
|
class Status < Mode
|
12
12
|
def initialize(*config)
|
13
|
-
super
|
13
|
+
super
|
14
14
|
options.on *VENDOR_ID
|
15
15
|
end
|
16
16
|
|
17
|
-
protected
|
18
|
-
def handle_success(stdout_lines, stderr_lines, options)
|
17
|
+
protected
|
18
|
+
def handle_success(stdout_lines, stderr_lines, options)
|
19
19
|
status = {}
|
20
20
|
while line = stdout_lines.shift
|
21
21
|
next unless line =~ /\S+/
|
@@ -33,7 +33,7 @@ module ITunes
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
status
|
36
|
-
end
|
36
|
+
end
|
37
37
|
|
38
38
|
def parse_line(line)
|
39
39
|
key, value = line.split(/:\s+/, 2).map(&:strip)
|
@@ -41,7 +41,7 @@ module ITunes
|
|
41
41
|
key.downcase!
|
42
42
|
[key.to_sym, value]
|
43
43
|
end
|
44
|
-
end
|
44
|
+
end
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -17,7 +17,8 @@ module ITunes
|
|
17
17
|
options.on *SUCCESS
|
18
18
|
options.on *FAILURE
|
19
19
|
options.on :delete, "-delete", Optout::Boolean
|
20
|
-
options.on :rate, "-k", Integer # Required if TRANSPORT is Aspera or Signiant
|
20
|
+
options.on :rate, "-k", Integer # Required if TRANSPORT is Aspera or Signiant
|
21
|
+
options.on :streams, "-numStreams", Integer # Only valid if TRANSPORT is Signiant
|
21
22
|
options.on :log_history, "-loghistory", Optout::Dir.exists
|
22
23
|
end
|
23
24
|
end
|
@@ -1,46 +1,46 @@
|
|
1
1
|
module ITunes
|
2
|
-
module Store
|
2
|
+
module Store
|
3
3
|
module Transporter
|
4
4
|
##
|
5
5
|
# Upload and manage your assets in the iTunes Store using the iTunes Store's Transporter (+iTMSTransporter+).
|
6
6
|
class ITMSTransporter
|
7
|
-
|
7
|
+
|
8
8
|
##
|
9
|
-
# === Arguments
|
9
|
+
# === Arguments
|
10
10
|
#
|
11
11
|
# [options (Hash)] Transporter options
|
12
12
|
#
|
13
13
|
# === Options
|
14
|
-
#
|
14
|
+
#
|
15
15
|
# 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.
|
16
|
-
#
|
17
|
-
# See specific methods for a list of options.
|
16
|
+
#
|
17
|
+
# See specific methods for a list of options.
|
18
18
|
#
|
19
19
|
# [:username (String)] Your username
|
20
20
|
# [:password (String)] Your password
|
21
21
|
# [:shortname (String)] Your shortname. Optional, not every iTunes account has one
|
22
22
|
# [:path (String)] The path to the +iTMSTransporter+. Optional.
|
23
|
-
# [:print_stdout (Boolean)] Print +iTMSTransporter+'s stdout to your stdout. Defaults to +false+.
|
24
|
-
# [:print_stderr (Boolean)] Print +iTMSTransporter+'s stderr to your stderr. Defaults to +false+.
|
23
|
+
# [:print_stdout (Boolean)] Print +iTMSTransporter+'s stdout to your stdout. Defaults to +false+.
|
24
|
+
# [:print_stderr (Boolean)] Print +iTMSTransporter+'s stderr to your stderr. Defaults to +false+.
|
25
25
|
#
|
26
26
|
|
27
27
|
def initialize(options = nil)
|
28
28
|
@defaults = create_options(options)
|
29
|
-
@config = {
|
29
|
+
@config = {
|
30
30
|
:path => @defaults.delete(:path),
|
31
|
-
:print_stdout => @defaults.delete(:print_stdout),
|
32
|
-
:print_stderr => @defaults.delete(:print_stderr),
|
33
|
-
}
|
31
|
+
:print_stdout => @defaults.delete(:print_stdout),
|
32
|
+
:print_stderr => @defaults.delete(:print_stderr),
|
33
|
+
}
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
##
|
37
37
|
# :method: lookup
|
38
|
-
# :call-seq:
|
38
|
+
# :call-seq:
|
39
39
|
# lookup(options = {})
|
40
|
-
#
|
41
|
-
# Retrieve the metadata for a previously delivered package.
|
42
40
|
#
|
43
|
-
#
|
41
|
+
# Retrieve the metadata for a previously delivered package.
|
42
|
+
#
|
43
|
+
# === Arguments
|
44
44
|
#
|
45
45
|
# [options (Hash)] Transporter options
|
46
46
|
#
|
@@ -55,15 +55,15 @@ module ITunes
|
|
55
55
|
# === Returns
|
56
56
|
#
|
57
57
|
# [String] The metadata
|
58
|
-
|
58
|
+
|
59
59
|
##
|
60
60
|
# :method: providers
|
61
|
-
# :call-seq:
|
61
|
+
# :call-seq:
|
62
62
|
# providers(options = {})
|
63
63
|
#
|
64
64
|
# List of Providers for whom your account is authorzed to deliver for.
|
65
65
|
#
|
66
|
-
# === Arguments
|
66
|
+
# === Arguments
|
67
67
|
#
|
68
68
|
# [options (Hash)] Transporter options
|
69
69
|
#
|
@@ -74,15 +74,15 @@ module ITunes
|
|
74
74
|
# === Returns
|
75
75
|
#
|
76
76
|
# [Array] Each element is a +Hash+ with two keys: +:shortname+ and +:longname+ representing the given provider's long and short names
|
77
|
-
|
77
|
+
|
78
78
|
##
|
79
79
|
# :method: schema
|
80
|
-
# :call-seq:
|
80
|
+
# :call-seq:
|
81
81
|
# schema(options = {})
|
82
82
|
#
|
83
83
|
# Download a RelaxNG schema file for a particular metadata specification.
|
84
|
-
#
|
85
|
-
# === Arguments
|
84
|
+
#
|
85
|
+
# === Arguments
|
86
86
|
#
|
87
87
|
# [options (Hash)] Transporter options
|
88
88
|
#
|
@@ -93,24 +93,24 @@ module ITunes
|
|
93
93
|
#
|
94
94
|
# === Errors
|
95
95
|
#
|
96
|
-
# TransporterError, OptionError, ExecutionError
|
96
|
+
# TransporterError, OptionError, ExecutionError
|
97
97
|
#
|
98
98
|
# === Returns
|
99
99
|
#
|
100
100
|
# [String] The schema
|
101
|
-
|
101
|
+
|
102
102
|
##
|
103
103
|
# :method: status
|
104
|
-
# :call-seq:
|
104
|
+
# :call-seq:
|
105
105
|
# status(options = {})
|
106
106
|
#
|
107
107
|
# Retrieve the status of a previously uploaded package.
|
108
|
-
#
|
109
|
-
# === Arguments
|
108
|
+
#
|
109
|
+
# === Arguments
|
110
110
|
#
|
111
111
|
# [options (Hash)] Transporter options
|
112
112
|
#
|
113
|
-
# === Options
|
113
|
+
# === Options
|
114
114
|
#
|
115
115
|
# [:vendor_id (String)] ID of the package you want status info on
|
116
116
|
#
|
@@ -121,44 +121,45 @@ module ITunes
|
|
121
121
|
# === Returns
|
122
122
|
#
|
123
123
|
# [Hash] Descibes various facets of the package's status.
|
124
|
-
|
124
|
+
|
125
125
|
##
|
126
126
|
# :method: upload
|
127
|
-
# :call-seq:
|
127
|
+
# :call-seq:
|
128
128
|
# upload(package, options = {})
|
129
129
|
#
|
130
130
|
# Upload a package to the iTunes Store.
|
131
131
|
#
|
132
132
|
# === Arguments
|
133
|
-
#
|
133
|
+
#
|
134
134
|
# [package (String)] The path to the package directory to upload. Package names must end in +.itmsp+.
|
135
135
|
# [options (Hash)] Transporter options
|
136
|
-
#
|
136
|
+
#
|
137
137
|
# === Options
|
138
138
|
#
|
139
139
|
# [:transport (String)] The method/protocol used to upload your package. Optional. Can be one of: <code>"Aspera"</code>, <code>"Signiant"</code>, or <code>"DEV"</code>. By default +iTMSTransporter+ automatically selects the transport.
|
140
|
-
# [:rate (Integer)] Target bitrate in Kbps. Optional, only used with +Aspera+ and +Signiant+
|
140
|
+
# [:rate (Integer)] Target bitrate in Kbps. Optional, only used with +Aspera+ and +Signiant+
|
141
141
|
# [:success (String)] A directory to move the package to if the upload succeeds
|
142
142
|
# [:failure (String)] A directory to move the package to if the upload fails
|
143
143
|
# [:delete (Boolean)] Delete the package if the upload succeeds. Defaults to +false+.
|
144
144
|
# [:log_history (String)] Write an +iTMSTransporter+ log to this directory. Off by default.
|
145
|
+
# [:streams (Integer)] Number of data streams to use. Optional, only used with +Signiant+
|
145
146
|
#
|
146
147
|
# === Errors
|
147
148
|
#
|
148
149
|
# TransporterError, OptionError, ExecutionError
|
149
150
|
#
|
150
151
|
# === Returns
|
151
|
-
#
|
152
|
+
#
|
152
153
|
# +true+ if the upload was successful.
|
153
|
-
|
154
|
+
|
154
155
|
##
|
155
|
-
# :method: verify
|
156
|
-
# :call-seq:
|
156
|
+
# :method: verify
|
157
|
+
# :call-seq:
|
157
158
|
# verify(package, options = {})
|
158
|
-
#
|
159
|
-
# Validate the contents of a package's metadata and assets.
|
160
159
|
#
|
161
|
-
#
|
160
|
+
# Validate the contents of a package's metadata and assets.
|
161
|
+
#
|
162
|
+
# If verification fails an ExecutionError containing the errors will be raised.
|
162
163
|
# Each error message is an instance of TransporterMessage.
|
163
164
|
#
|
164
165
|
# === Arguments
|
@@ -175,12 +176,12 @@ module ITunes
|
|
175
176
|
# TransporterError, OptionError, ExecutionError
|
176
177
|
#
|
177
178
|
# === Returns
|
178
|
-
#
|
179
|
+
#
|
179
180
|
# +true+ if the package was verified.
|
180
|
-
|
181
|
+
|
181
182
|
##
|
182
183
|
# :method: version
|
183
|
-
# :call-seq:
|
184
|
+
# :call-seq:
|
184
185
|
# version
|
185
186
|
#
|
186
187
|
# Return the underlying +iTMSTransporter+ version.
|
@@ -188,31 +189,30 @@ module ITunes
|
|
188
189
|
# === Returns
|
189
190
|
#
|
190
191
|
# [String] The version number
|
191
|
-
|
192
|
+
|
192
193
|
%w|upload verify|.each do |command|
|
193
|
-
define_method(command) do |package, *options|
|
194
|
+
define_method(command) do |package, *options|
|
194
195
|
cmd_options = create_options(options.first)
|
195
196
|
cmd_options[:package] = package
|
196
197
|
run_command(command, cmd_options)
|
197
198
|
end
|
198
199
|
end
|
199
|
-
|
200
|
+
|
200
201
|
%w|lookup providers schema status version|.each do |command|
|
201
202
|
define_method(command) { |*options| run_command(command, options.shift) }
|
202
|
-
end
|
203
|
-
|
204
|
-
private
|
205
|
-
def run_command(name, options)
|
203
|
+
end
|
204
|
+
|
205
|
+
private
|
206
|
+
def run_command(name, options)
|
206
207
|
Command.const_get(name.capitalize).new(@config, @defaults).run(create_options(options))
|
207
208
|
end
|
208
|
-
|
209
|
+
|
209
210
|
def create_options(options)
|
210
211
|
options ||= {}
|
211
212
|
raise ArgumentError, "options must be a Hash" unless Hash === options
|
212
213
|
options.dup
|
213
214
|
end
|
214
|
-
end
|
215
|
+
end
|
215
216
|
end
|
216
217
|
end
|
217
218
|
end
|
218
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itunes_store_transporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skye Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -131,12 +131,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - "
|
134
|
+
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.4.5
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Upload and manage your assets in the iTunes Store using the iTunes Store's
|