itunes_store_transporter 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +11 -0
- data/bin/itms +13 -7
- data/lib/itunes/store/transporter.rb +5 -216
- data/lib/itunes/store/transporter/command.rb +1 -1
- data/lib/itunes/store/transporter/command/lookup.rb +1 -1
- data/lib/itunes/store/transporter/command/option.rb +1 -1
- data/lib/itunes/store/transporter/command/providers.rb +1 -1
- data/lib/itunes/store/transporter/command/schema.rb +1 -1
- data/lib/itunes/store/transporter/command/status.rb +1 -1
- data/lib/itunes/store/transporter/command/upload.rb +1 -1
- data/lib/itunes/store/transporter/command/verify.rb +1 -1
- data/lib/itunes/store/transporter/command/version.rb +1 -1
- data/lib/itunes/store/transporter/errors.rb +1 -1
- data/lib/itunes/store/transporter/itms_transporter.rb +218 -0
- data/lib/itunes/store/transporter/output_parser.rb +1 -1
- data/lib/itunes/store/transporter/shell.rb +1 -1
- data/lib/itunes/store/transporter/version.rb +2 -2
- data/spec/transporter_spec.rb +1 -1
- metadata +25 -33
- checksums.yaml +0 -7
data/Changes
CHANGED
@@ -1,5 +1,16 @@
|
|
1
|
+
v0.1.1 2013-08-14
|
2
|
+
--------------------
|
3
|
+
Changes:
|
4
|
+
* Added post_install_message letting Windows users know they need to modify iTMSTransporter.CMD
|
5
|
+
* Transporter is now a module, new() returns an instance of ITMSTransporter
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
* `itms lookup` asset option was deemed invalid
|
9
|
+
* `itms lookup` fix XPath asset lookup
|
10
|
+
|
1
11
|
v0.1.0 2013-04-23
|
2
12
|
--------------------
|
13
|
+
Changes:
|
3
14
|
* `itms lookup` now saves metadata in an .itmsp directory as metadata.xml
|
4
15
|
|
5
16
|
Enhancements:
|
data/bin/itms
CHANGED
@@ -48,8 +48,9 @@ module Command
|
|
48
48
|
|
49
49
|
class Lookup < Base
|
50
50
|
def initialize(options)
|
51
|
-
super
|
52
51
|
@assets = options.delete(:assets)
|
52
|
+
# Must call *after* we delete the assets option
|
53
|
+
super
|
53
54
|
@assets = @assets.split(",").map { |x| x.split(":").grep(/\w/) } if String === @assets
|
54
55
|
@package = "#{options[:apple_id] || options[:vendor_id]}.itmsp"
|
55
56
|
Dir.mkdir(@package)
|
@@ -74,9 +75,9 @@ module Command
|
|
74
75
|
uri = URI.parse(asset[:url])
|
75
76
|
|
76
77
|
Net::HTTP.start(uri.host, uri.port) do |http|
|
77
|
-
File.open("#@package/#{asset[:filename]}", "
|
78
|
-
http.request_get(uri.
|
79
|
-
raise res.message unless Net::HTTPSuccess === res
|
78
|
+
File.open("#@package/#{asset[:filename]}", "wb") do |io|
|
79
|
+
http.request_get(uri.to_s) do |res|
|
80
|
+
raise "HTTP response #{res.message} (#{res.code})" unless Net::HTTPSuccess === res
|
80
81
|
res.read_body do |data|
|
81
82
|
io.write data
|
82
83
|
end
|
@@ -93,7 +94,7 @@ module Command
|
|
93
94
|
asset_info = lambda do |xpath|
|
94
95
|
doc.get_elements(xpath).map do |e|
|
95
96
|
file = {}
|
96
|
-
file[:url] = e.get_text("
|
97
|
+
file[:url] = e.get_text(".//*[ @key = 'proxy-encode-url' ]").to_s
|
97
98
|
type = e.attribute("type")
|
98
99
|
file[:type] = type.value if type
|
99
100
|
file[:filename] = e.get_text(".//data_file[ @role = 'source' ]/file_name").to_s
|
@@ -103,6 +104,7 @@ module Command
|
|
103
104
|
end
|
104
105
|
|
105
106
|
files = []
|
107
|
+
warned = false
|
106
108
|
if @assets == true
|
107
109
|
files = asset_info["//asset[ .//*[ @key = 'proxy-encode-url' ]]"]
|
108
110
|
else
|
@@ -112,9 +114,13 @@ module Command
|
|
112
114
|
|
113
115
|
xpath = "//asset[ @type = '#{type}'"
|
114
116
|
if regions.any?
|
117
|
+
if !warned && RUBY_VERSION.start_with?("1.8")
|
118
|
+
warn "WARNING: you're using Ruby 1.8, which has known problems looking up assets by region, expect problems!"
|
119
|
+
warned = true
|
120
|
+
end
|
115
121
|
xpath << " and (%s)" % regions.map { |code| ".//territory = '#{code}'" }.join(" or ")
|
116
122
|
end
|
117
|
-
xpath << "and .//*[ @key = 'proxy-encode-url' ]]"
|
123
|
+
xpath << " and .//*[ @key = 'proxy-encode-url' ]]"
|
118
124
|
|
119
125
|
info = asset_info[xpath]
|
120
126
|
unknown = regions - info.map { |file| file[:territories] }.flatten
|
@@ -238,7 +244,7 @@ class Email
|
|
238
244
|
end
|
239
245
|
end
|
240
246
|
|
241
|
-
COMMANDS = ITunes::Store::Transporter.instance_methods(false).map(&:to_s)
|
247
|
+
COMMANDS = ITunes::Store::Transporter::ITMSTransporter.instance_methods(false).map(&:to_s)
|
242
248
|
CONFIG_FILE_NAME = ".itms"
|
243
249
|
|
244
250
|
def home
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "itunes/store/transporter/itms_transporter"
|
1
2
|
require "itunes/store/transporter/command/lookup"
|
2
3
|
require "itunes/store/transporter/command/providers"
|
3
4
|
require "itunes/store/transporter/command/schema"
|
@@ -7,217 +8,10 @@ require "itunes/store/transporter/command/verify"
|
|
7
8
|
require "itunes/store/transporter/command/version"
|
8
9
|
|
9
10
|
module ITunes
|
10
|
-
module Store
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
class Transporter
|
15
|
-
|
16
|
-
##
|
17
|
-
# === Arguments
|
18
|
-
#
|
19
|
-
# [options (Hash)] Transporter options
|
20
|
-
#
|
21
|
-
# === Options
|
22
|
-
#
|
23
|
-
# 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.
|
24
|
-
#
|
25
|
-
# See specific methods for a list of options.
|
26
|
-
#
|
27
|
-
# [:username (String)] Your username
|
28
|
-
# [:password (String)] Your password
|
29
|
-
# [:shortname (String)] Your shortname. Optional, not every iTunes account has one
|
30
|
-
# [:path (String)] The path to the +iTMSTransporter+. Optional.
|
31
|
-
# [:print_stdout (Boolean)] Print +iTMSTransporter+'s stdout to your stdout. Defaults to +false+.
|
32
|
-
# [:print_stderr (Boolean)] Print +iTMSTransporter+'s stderr to your stderr. Defaults to +false+.
|
33
|
-
#
|
34
|
-
|
35
|
-
def initialize(options = nil)
|
36
|
-
@defaults = create_options(options)
|
37
|
-
@config = {
|
38
|
-
:path => @defaults.delete(:path),
|
39
|
-
:print_stdout => @defaults.delete(:print_stdout),
|
40
|
-
:print_stderr => @defaults.delete(:print_stderr),
|
41
|
-
}
|
42
|
-
end
|
43
|
-
|
44
|
-
##
|
45
|
-
# :method: lookup
|
46
|
-
# :call-seq:
|
47
|
-
# lookup(options = {})
|
48
|
-
#
|
49
|
-
# Retrieve the metadata for a previously delivered package.
|
50
|
-
#
|
51
|
-
# === Arguments
|
52
|
-
#
|
53
|
-
# [options (Hash)] Transporter options
|
54
|
-
#
|
55
|
-
# ==== Options
|
56
|
-
#
|
57
|
-
# You must use either the +:apple_id+ or +:vendor_id+ option to identify the package
|
58
|
-
#
|
59
|
-
# === Errors
|
60
|
-
#
|
61
|
-
# TransporterError, OptionError, ExecutionError
|
62
|
-
#
|
63
|
-
# === Returns
|
64
|
-
#
|
65
|
-
# [String] The metadata
|
66
|
-
|
67
|
-
##
|
68
|
-
# :method: providers
|
69
|
-
# :call-seq:
|
70
|
-
# providers(options = {})
|
71
|
-
#
|
72
|
-
# List of Providers for whom your account is authorzed to deliver for.
|
73
|
-
#
|
74
|
-
# === Arguments
|
75
|
-
#
|
76
|
-
# [options (Hash)] Transporter options
|
77
|
-
#
|
78
|
-
# === Errors
|
79
|
-
#
|
80
|
-
# TransporterError, OptionError, ExecutionError
|
81
|
-
#
|
82
|
-
# === Returns
|
83
|
-
#
|
84
|
-
# [Array] Each element is a +Hash+ with two keys: +:shortname+ and +:longname+ representing the given provider's long and short names
|
85
|
-
|
86
|
-
##
|
87
|
-
# :method: schema
|
88
|
-
# :call-seq:
|
89
|
-
# schema(options = {})
|
90
|
-
#
|
91
|
-
# Download a RelaxNG schema file for a particular metadata specification.
|
92
|
-
#
|
93
|
-
# === Arguments
|
94
|
-
#
|
95
|
-
# [options (Hash)] Transporter options
|
96
|
-
#
|
97
|
-
# === Options
|
98
|
-
#
|
99
|
-
# [:type (String)] transitional or strict
|
100
|
-
# [:version (String)] The schema version you'd like to download. This is typically in the form of +schemaVERSION+. E.g., +film4.8+
|
101
|
-
#
|
102
|
-
# === Errors
|
103
|
-
#
|
104
|
-
# TransporterError, OptionError, ExecutionError
|
105
|
-
#
|
106
|
-
# === Returns
|
107
|
-
#
|
108
|
-
# [String] The schema
|
109
|
-
|
110
|
-
##
|
111
|
-
# :method: status
|
112
|
-
# :call-seq:
|
113
|
-
# status(options = {})
|
114
|
-
#
|
115
|
-
# Retrieve the status of a previously uploaded package.
|
116
|
-
#
|
117
|
-
# === Arguments
|
118
|
-
#
|
119
|
-
# [options (Hash)] Transporter options
|
120
|
-
#
|
121
|
-
# === Options
|
122
|
-
#
|
123
|
-
# [:vendor_id (String)] ID of the package you want status info on
|
124
|
-
#
|
125
|
-
# === Errors
|
126
|
-
#
|
127
|
-
# TransporterError, OptionError, ExecutionError
|
128
|
-
#
|
129
|
-
# === Returns
|
130
|
-
#
|
131
|
-
# [Hash] Descibes various facets of the package's status.
|
132
|
-
|
133
|
-
##
|
134
|
-
# :method: upload
|
135
|
-
# :call-seq:
|
136
|
-
# upload(package, options = {})
|
137
|
-
#
|
138
|
-
# Upload a package to the iTunes Store.
|
139
|
-
#
|
140
|
-
# === Arguments
|
141
|
-
#
|
142
|
-
# [package (String)] The path to the package directory to upload. Package names must end in +.itmsp+.
|
143
|
-
# [options (Hash)] Transporter options
|
144
|
-
#
|
145
|
-
# === Options
|
146
|
-
#
|
147
|
-
# [: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.
|
148
|
-
# [:rate (Integer)] Target bitrate in Kbps. Optional, only used with +Aspera+ and +Signiant+
|
149
|
-
# [:success (String)] A directory to move the package to if the upload succeeds
|
150
|
-
# [:failure (String)] A directory to move the package to if the upload fails
|
151
|
-
# [:delete (Boolean)] Delete the package if the upload succeeds. Defaults to +false+.
|
152
|
-
# [:log_history (String)] Write an +iTMSTransporter+ log to this directory. Off by default.
|
153
|
-
#
|
154
|
-
# === Errors
|
155
|
-
#
|
156
|
-
# TransporterError, OptionError, ExecutionError
|
157
|
-
#
|
158
|
-
# === Returns
|
159
|
-
#
|
160
|
-
# +true+ if the upload was successful.
|
161
|
-
|
162
|
-
##
|
163
|
-
# :method: verify
|
164
|
-
# :call-seq:
|
165
|
-
# verify(package, options = {})
|
166
|
-
#
|
167
|
-
# Validate the contents of a package's metadata and assets.
|
168
|
-
#
|
169
|
-
# If verification fails an ExecutionError containing the errors will be raised.
|
170
|
-
# Each error message is an instance of TransporterMessage.
|
171
|
-
#
|
172
|
-
# === Arguments
|
173
|
-
#
|
174
|
-
# [package (String)] The path to the package directory to verify. Package names must end in +.itmsp+.
|
175
|
-
# [options (Hash)] Verify options
|
176
|
-
#
|
177
|
-
# === Options
|
178
|
-
#
|
179
|
-
# [:verify_assets (Boolean)] If false the assets will not be verified. Defaults to +true+.
|
180
|
-
#
|
181
|
-
# === Errors
|
182
|
-
#
|
183
|
-
# TransporterError, OptionError, ExecutionError
|
184
|
-
#
|
185
|
-
# === Returns
|
186
|
-
#
|
187
|
-
# +true+ if the package was verified.
|
188
|
-
|
189
|
-
##
|
190
|
-
# :method: version
|
191
|
-
# :call-seq:
|
192
|
-
# version
|
193
|
-
#
|
194
|
-
# Return the underlying +iTMSTransporter+ version.
|
195
|
-
#
|
196
|
-
# === Returns
|
197
|
-
#
|
198
|
-
# [String] The version number
|
199
|
-
|
200
|
-
%w|upload verify|.each do |command|
|
201
|
-
define_method(command) do |package, *options|
|
202
|
-
cmd_options = create_options(options.first)
|
203
|
-
cmd_options[:package] = package
|
204
|
-
run_command(command, cmd_options)
|
205
|
-
end
|
206
|
-
end
|
207
|
-
|
208
|
-
%w|lookup providers schema status version|.each do |command|
|
209
|
-
define_method(command) { |*options| run_command(command, options.shift) }
|
210
|
-
end
|
211
|
-
|
212
|
-
private
|
213
|
-
def run_command(name, options)
|
214
|
-
Command.const_get(name.capitalize).new(@config, @defaults).run(create_options(options))
|
215
|
-
end
|
216
|
-
|
217
|
-
def create_options(options)
|
218
|
-
options ||= {}
|
219
|
-
raise ArgumentError, "options must be a Hash" unless Hash === options
|
220
|
-
options.dup
|
11
|
+
module Store
|
12
|
+
module Transporter
|
13
|
+
def self.new(options = nil)
|
14
|
+
ITMSTransporter.new(options)
|
221
15
|
end
|
222
16
|
end
|
223
17
|
end
|
@@ -228,8 +22,3 @@ unless ENV["ITUNES_STORE_TRANSPORTER_NO_SYNTAX_SUGAR"].to_i > 0
|
|
228
22
|
ITunes
|
229
23
|
end
|
230
24
|
end
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
@@ -0,0 +1,218 @@
|
|
1
|
+
module ITunes
|
2
|
+
module Store
|
3
|
+
module Transporter
|
4
|
+
##
|
5
|
+
# Upload and manage your assets in the iTunes Store using the iTunes Store's Transporter (+iTMSTransporter+).
|
6
|
+
class ITMSTransporter
|
7
|
+
|
8
|
+
##
|
9
|
+
# === Arguments
|
10
|
+
#
|
11
|
+
# [options (Hash)] Transporter options
|
12
|
+
#
|
13
|
+
# === Options
|
14
|
+
#
|
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.
|
18
|
+
#
|
19
|
+
# [:username (String)] Your username
|
20
|
+
# [:password (String)] Your password
|
21
|
+
# [:shortname (String)] Your shortname. Optional, not every iTunes account has one
|
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+.
|
25
|
+
#
|
26
|
+
|
27
|
+
def initialize(options = nil)
|
28
|
+
@defaults = create_options(options)
|
29
|
+
@config = {
|
30
|
+
:path => @defaults.delete(:path),
|
31
|
+
:print_stdout => @defaults.delete(:print_stdout),
|
32
|
+
:print_stderr => @defaults.delete(:print_stderr),
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# :method: lookup
|
38
|
+
# :call-seq:
|
39
|
+
# lookup(options = {})
|
40
|
+
#
|
41
|
+
# Retrieve the metadata for a previously delivered package.
|
42
|
+
#
|
43
|
+
# === Arguments
|
44
|
+
#
|
45
|
+
# [options (Hash)] Transporter options
|
46
|
+
#
|
47
|
+
# ==== Options
|
48
|
+
#
|
49
|
+
# You must use either the +:apple_id+ or +:vendor_id+ option to identify the package
|
50
|
+
#
|
51
|
+
# === Errors
|
52
|
+
#
|
53
|
+
# TransporterError, OptionError, ExecutionError
|
54
|
+
#
|
55
|
+
# === Returns
|
56
|
+
#
|
57
|
+
# [String] The metadata
|
58
|
+
|
59
|
+
##
|
60
|
+
# :method: providers
|
61
|
+
# :call-seq:
|
62
|
+
# providers(options = {})
|
63
|
+
#
|
64
|
+
# List of Providers for whom your account is authorzed to deliver for.
|
65
|
+
#
|
66
|
+
# === Arguments
|
67
|
+
#
|
68
|
+
# [options (Hash)] Transporter options
|
69
|
+
#
|
70
|
+
# === Errors
|
71
|
+
#
|
72
|
+
# TransporterError, OptionError, ExecutionError
|
73
|
+
#
|
74
|
+
# === Returns
|
75
|
+
#
|
76
|
+
# [Array] Each element is a +Hash+ with two keys: +:shortname+ and +:longname+ representing the given provider's long and short names
|
77
|
+
|
78
|
+
##
|
79
|
+
# :method: schema
|
80
|
+
# :call-seq:
|
81
|
+
# schema(options = {})
|
82
|
+
#
|
83
|
+
# Download a RelaxNG schema file for a particular metadata specification.
|
84
|
+
#
|
85
|
+
# === Arguments
|
86
|
+
#
|
87
|
+
# [options (Hash)] Transporter options
|
88
|
+
#
|
89
|
+
# === Options
|
90
|
+
#
|
91
|
+
# [:type (String)] transitional or strict
|
92
|
+
# [:version (String)] The schema version you'd like to download. This is typically in the form of +schemaVERSION+. E.g., +film4.8+
|
93
|
+
#
|
94
|
+
# === Errors
|
95
|
+
#
|
96
|
+
# TransporterError, OptionError, ExecutionError
|
97
|
+
#
|
98
|
+
# === Returns
|
99
|
+
#
|
100
|
+
# [String] The schema
|
101
|
+
|
102
|
+
##
|
103
|
+
# :method: status
|
104
|
+
# :call-seq:
|
105
|
+
# status(options = {})
|
106
|
+
#
|
107
|
+
# Retrieve the status of a previously uploaded package.
|
108
|
+
#
|
109
|
+
# === Arguments
|
110
|
+
#
|
111
|
+
# [options (Hash)] Transporter options
|
112
|
+
#
|
113
|
+
# === Options
|
114
|
+
#
|
115
|
+
# [:vendor_id (String)] ID of the package you want status info on
|
116
|
+
#
|
117
|
+
# === Errors
|
118
|
+
#
|
119
|
+
# TransporterError, OptionError, ExecutionError
|
120
|
+
#
|
121
|
+
# === Returns
|
122
|
+
#
|
123
|
+
# [Hash] Descibes various facets of the package's status.
|
124
|
+
|
125
|
+
##
|
126
|
+
# :method: upload
|
127
|
+
# :call-seq:
|
128
|
+
# upload(package, options = {})
|
129
|
+
#
|
130
|
+
# Upload a package to the iTunes Store.
|
131
|
+
#
|
132
|
+
# === Arguments
|
133
|
+
#
|
134
|
+
# [package (String)] The path to the package directory to upload. Package names must end in +.itmsp+.
|
135
|
+
# [options (Hash)] Transporter options
|
136
|
+
#
|
137
|
+
# === Options
|
138
|
+
#
|
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+
|
141
|
+
# [:success (String)] A directory to move the package to if the upload succeeds
|
142
|
+
# [:failure (String)] A directory to move the package to if the upload fails
|
143
|
+
# [:delete (Boolean)] Delete the package if the upload succeeds. Defaults to +false+.
|
144
|
+
# [:log_history (String)] Write an +iTMSTransporter+ log to this directory. Off by default.
|
145
|
+
#
|
146
|
+
# === Errors
|
147
|
+
#
|
148
|
+
# TransporterError, OptionError, ExecutionError
|
149
|
+
#
|
150
|
+
# === Returns
|
151
|
+
#
|
152
|
+
# +true+ if the upload was successful.
|
153
|
+
|
154
|
+
##
|
155
|
+
# :method: verify
|
156
|
+
# :call-seq:
|
157
|
+
# verify(package, options = {})
|
158
|
+
#
|
159
|
+
# Validate the contents of a package's metadata and assets.
|
160
|
+
#
|
161
|
+
# If verification fails an ExecutionError containing the errors will be raised.
|
162
|
+
# Each error message is an instance of TransporterMessage.
|
163
|
+
#
|
164
|
+
# === Arguments
|
165
|
+
#
|
166
|
+
# [package (String)] The path to the package directory to verify. Package names must end in +.itmsp+.
|
167
|
+
# [options (Hash)] Verify options
|
168
|
+
#
|
169
|
+
# === Options
|
170
|
+
#
|
171
|
+
# [:verify_assets (Boolean)] If false the assets will not be verified. Defaults to +true+.
|
172
|
+
#
|
173
|
+
# === Errors
|
174
|
+
#
|
175
|
+
# TransporterError, OptionError, ExecutionError
|
176
|
+
#
|
177
|
+
# === Returns
|
178
|
+
#
|
179
|
+
# +true+ if the package was verified.
|
180
|
+
|
181
|
+
##
|
182
|
+
# :method: version
|
183
|
+
# :call-seq:
|
184
|
+
# version
|
185
|
+
#
|
186
|
+
# Return the underlying +iTMSTransporter+ version.
|
187
|
+
#
|
188
|
+
# === Returns
|
189
|
+
#
|
190
|
+
# [String] The version number
|
191
|
+
|
192
|
+
%w|upload verify|.each do |command|
|
193
|
+
define_method(command) do |package, *options|
|
194
|
+
cmd_options = create_options(options.first)
|
195
|
+
cmd_options[:package] = package
|
196
|
+
run_command(command, cmd_options)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
%w|lookup providers schema status version|.each do |command|
|
201
|
+
define_method(command) { |*options| run_command(command, options.shift) }
|
202
|
+
end
|
203
|
+
|
204
|
+
private
|
205
|
+
def run_command(name, options)
|
206
|
+
Command.const_get(name.capitalize).new(@config, @defaults).run(create_options(options))
|
207
|
+
end
|
208
|
+
|
209
|
+
def create_options(options)
|
210
|
+
options ||= {}
|
211
|
+
raise ArgumentError, "options must be a Hash" unless Hash === options
|
212
|
+
options.dup
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
data/spec/transporter_spec.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,53 @@
|
|
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.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Skye Shaw
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-08-14 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: childprocess
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70194171326300 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 0.3.2
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
|
-
version_requirements:
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.2
|
24
|
+
version_requirements: *70194171326300
|
27
25
|
- !ruby/object:Gem::Dependency
|
28
26
|
name: optout
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70194171325780 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
30
29
|
requirements:
|
31
30
|
- - ~>
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: 0.0.2
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.2
|
35
|
+
version_requirements: *70194171325780
|
41
36
|
- !ruby/object:Gem::Dependency
|
42
37
|
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70194171325120 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
44
40
|
requirements:
|
45
41
|
- - ~>
|
46
42
|
- !ruby/object:Gem::Version
|
47
43
|
version: 0.9.2
|
48
44
|
type: :development
|
49
45
|
prerelease: false
|
50
|
-
version_requirements:
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.9.2
|
46
|
+
version_requirements: *70194171325120
|
55
47
|
- !ruby/object:Gem::Dependency
|
56
48
|
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70194171324440 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -64,14 +57,7 @@ dependencies:
|
|
64
57
|
version: '3'
|
65
58
|
type: :development
|
66
59
|
prerelease: false
|
67
|
-
version_requirements:
|
68
|
-
requirements:
|
69
|
-
- - ~>
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '2.9'
|
72
|
-
- - <
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '3'
|
60
|
+
version_requirements: *70194171324440
|
75
61
|
description: ! " iTunes::Store::Transporter is a wrapper around Apple's iTMSTransporter
|
76
62
|
program. It allows you to upload packages to the \n Apple Store, validate them,
|
77
63
|
retrieve status information, lookup metadata, and more!\n"
|
@@ -93,6 +79,7 @@ files:
|
|
93
79
|
- lib/itunes/store/transporter/command/version.rb
|
94
80
|
- lib/itunes/store/transporter/command.rb
|
95
81
|
- lib/itunes/store/transporter/errors.rb
|
82
|
+
- lib/itunes/store/transporter/itms_transporter.rb
|
96
83
|
- lib/itunes/store/transporter/output_parser.rb
|
97
84
|
- lib/itunes/store/transporter/shell.rb
|
98
85
|
- lib/itunes/store/transporter/version.rb
|
@@ -114,26 +101,31 @@ files:
|
|
114
101
|
homepage: http://github.com/sshaw/itunes_store_transporter
|
115
102
|
licenses:
|
116
103
|
- MIT
|
117
|
-
|
118
|
-
|
104
|
+
post_install_message: ! "\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n
|
105
|
+
\ !! ATTENTION WINDOWS USERS !!\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n
|
106
|
+
\ \n You must make a small change to the iTMSTransporter.CMD batch file, otherwise
|
107
|
+
\n this library will not function correctly. \n \n For details see: http://github.com/sshaw/itunes_store_transporter#running-on-windows
|
108
|
+
\ \n\n"
|
119
109
|
rdoc_options: []
|
120
110
|
require_paths:
|
121
111
|
- lib
|
122
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
123
114
|
requirements:
|
124
115
|
- - ! '>='
|
125
116
|
- !ruby/object:Gem::Version
|
126
117
|
version: '0'
|
127
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
128
120
|
requirements:
|
129
121
|
- - ! '>='
|
130
122
|
- !ruby/object:Gem::Version
|
131
123
|
version: '0'
|
132
124
|
requirements: []
|
133
125
|
rubyforge_project:
|
134
|
-
rubygems_version:
|
126
|
+
rubygems_version: 1.8.10
|
135
127
|
signing_key:
|
136
|
-
specification_version:
|
128
|
+
specification_version: 3
|
137
129
|
summary: Upload and manage your assets in the iTunes Store using the iTunes Store's
|
138
130
|
Transporter (iTMSTransporter).
|
139
131
|
test_files:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 03bfd32d4a15484365dbcb15dbd92ef31f26245b
|
4
|
-
data.tar.gz: 664a9e8ec021008970be52d5b25589e88f492726
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 53aacb46d02bc9303bd96521cbb0d0600fe6b065bb32cdf70d638c3d3f71466a9a2cc8dd0e9ddeb4b8a84dc0c14e3b7d14022775e33acf2fdaebb64992d1838c
|
7
|
-
data.tar.gz: 47a88fa62dd96a654f9086f35d41b9e8972eed344abae81db17878451e84bf4d0f6e18ae6076d149efeeb6765f6852b0f5569e2c2121f7fc04880beb582baa58
|