itunes_store_transporter 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,45 @@
1
+ no_error_number: |
2
+ [2000-01-01 00:00:00] <main> INFO: Transporter is doing something fun
3
+ [2000-01-01 00:00:00] <main> INFO: Transporter is still doing some fun stuff
4
+ [2000-01-01 00:00:00] <main> ERROR: "An error occurred while doing fun stuff" at Location1 (Class)
5
+ [2000-01-01 00:00:00] <Some Class> ERROR: "An exception has occurred: network timeout" at Location2 (Class)
6
+ [2000-01-01 00:00:00] <main> DBG-X: About to exit
7
+
8
+ Package Summary:
9
+ 2 package(s) were not uploaded because they had problems:
10
+ /home/sshaw/123123123.itmsp - Error Messages:
11
+ An error has occurred during the upload.
12
+ ERROR: An error occurred while doing fun stuff
13
+ ERROR: An exception has occurred: network timeout
14
+ [2000-01-01 00:00:00] <main> DBG-X: Returning 1
15
+
16
+ with_error_number: |
17
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-4000: "This is error 4000" at Location1 (Class)
18
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-5000: "This is error 5000" at Location1 (Class)
19
+ [2000-01-01 00:00:00] <main> INFO: Transporter is doing something fun
20
+ [2000-01-01 00:00:00] <main> INFO: Transporter is still doing some fun stuff
21
+ [2000-01-01 00:00:00] <main> INFO: I'm outta here
22
+
23
+ Package Summary:
24
+ 2 package(s) were not uploaded because they had problems:
25
+ /home/sshaw/123123123.itmsp - Error Messages:
26
+ ERROR ITMS-4000 "This is error 4000"
27
+ ERROR ITMS-5000 "This is error 5000"
28
+
29
+ single_warning: |
30
+ [2000-01-01 00:00:00] <main> INFO: Transporter is doing something fun
31
+ [2000-01-01 00:00:00] <main> WARN: WARNING ITMS-4010: "You've been warned!" at Location1 (Class)
32
+ [2000-01-01 00:00:00] <main> INFO: I'm outta here
33
+
34
+ Package Summary:
35
+ 1 package(s) were successfully uploaded
36
+
37
+ duplicate_errors: |
38
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-4000: "Error 1" at Location1 (Class)
39
+ [2000-01-01 00:00:00] <main> INFO: Transporter is doing something fun
40
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-5000: "Error 2" at Location2 (Class)
41
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-4000: "Error 1" at Location1 (Class)
42
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-5000: "Error 2" at Location2 (Class)
43
+ [2000-01-01 00:00:00] <main> INFO: Transporter is doing something fun
44
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-7000: "Error 3" at Location3 (ClassX)
45
+ [2000-01-01 00:00:00] <main> INFO: I'm outta here
@@ -0,0 +1,5 @@
1
+ two: |
2
+ Provider listing:
3
+ - Long Name - - Short Name -
4
+ 1 Some Great User luser
5
+ 2 Skye's Taco Eating Service Inc. conmuchacebolla
@@ -0,0 +1,29 @@
1
+ vendor_id_123123: |
2
+ Vendor identifier: 123123
3
+ Apple identifier: 123123
4
+ iTunesConnect Status: Not ready for sale
5
+
6
+ -------------------------Status Info-------------------------
7
+ Upload created: 2000-01-01 00:00:00
8
+ Upload state: Uploaded
9
+ Upload state id: 1
10
+ Content state: Irie
11
+ Content state id: 2
12
+
13
+ vendor_id_789789: |
14
+ Vendor identifier: 789789
15
+
16
+ -------------------------Status Info-------------------------
17
+ Upload created: 2000-01-01 00:00:00
18
+ Upload state: Uploaded
19
+ Upload state id: 1
20
+ Content state: Irie
21
+ Content state id: 2
22
+
23
+ -------------------------Status Info #2-------------------------
24
+ Upload created: 2000-01-02 00:00:00
25
+ Upload state: Some Failure
26
+ Upload state id: 2
27
+ Content state: Still Irie
28
+ Content state id: 3
29
+
@@ -0,0 +1,20 @@
1
+ info: |
2
+ [2000-01-01 00:00:00] <main> DEBUG: Doing some fun things
3
+ [2000-01-01 00:00:00] <main> DBG-X: parameter X = 999999999
4
+ [2000-01-01 00:00:00] <main> DBG-X: parameter FilesToUpload = [metadata.xml, 123123123.mov]
5
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
6
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
7
+ [2000-01-01 00:00:00] <main> DBG-X: parameter X = 999999999
8
+ [2000-01-01 00:00:00] <main> DBG-X: parameter FilesToUpload = [metadata.xml, 123123123.mov]
9
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
10
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
11
+
12
+ errors: |
13
+ [2000-01-01 00:00:00] <main> ERROR: Apple's web service operation was not successful
14
+ [2000-01-01 00:00:00] <main> ERROR: Unable to authenticate the package: 123123123.itmsp
15
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-9000: "Your audio of screwed up!"
16
+ [2000-01-01 00:00:00] <main> DEBUG: Yup, yer audio is shot
17
+ [2000-01-01 00:00:00] <main> ERROR: ERROR ITMS-4009: "Chapter timecode is just plain wrong"
18
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
19
+ [2000-01-01 00:00:00] <main> INFO: Doing something that are so fun I should tell you
20
+
@@ -0,0 +1,5 @@
1
+ success: |
2
+ Package Summary:
3
+
4
+ 1 package was uploaded successfully:
5
+ /home/sshaw/123123123.itmsp
@@ -1,8 +1,8 @@
1
1
  require "spec_helper"
2
2
  require "rbconfig"
3
3
 
4
- describe ITunes::Store::Transporter::Shell do
5
- it "yields stdout and stderr as they become available" do
4
+ describe ITunes::Store::Transporter::Shell do
5
+ it "yields stdout and stderr as they become available" do
6
6
  ruby = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])
7
7
  temp = Tempfile.new ""
8
8
  # sleep else poll() (select) can favor the 1st FD in the read array, causing the
@@ -24,27 +24,34 @@ describe ITunes::Store::Transporter::Shell do
24
24
 
25
25
  output = []
26
26
  expect = [ [ :stdout, "OUT 1" ],
27
- [ :stderr, "ERR 1" ],
28
- [ :stdout, "OUT 2" ],
27
+ [ :stderr, "ERR 1" ],
28
+ [ :stdout, "OUT 2" ],
29
29
  [ :stderr, "ERR 2" ] ]
30
-
31
- described_class.new(ruby).exec([temp.path]) do |line, stream|
30
+
31
+ described_class.new(ruby).exec([temp.path]) do |line, stream|
32
32
  output << [ stream, line.chomp! ]
33
33
  end
34
34
 
35
35
  output.should == expect
36
36
  end
37
37
 
38
- context "when on Windows" do
38
+ describe "#exec" do
39
+ it "requires a block" do
40
+ lambda { described_class.new.exec([]) }.should raise_exception(ArgumentError, "block required")
41
+ end
42
+ end
43
+
44
+ context "when on Windows" do
39
45
  before(:all) { ENV["PROGRAMFILES"] = "C:\\" }
40
- it "selects the Windows executable" do
46
+
47
+ it "selects the Windows executable" do
41
48
  described_class.stub(:windows? => true)
42
49
  described_class.new.path.should match /#{described_class::WINDOWS_EXE}\Z/
43
50
  end
44
51
  end
45
52
 
46
- context "when on anything but Windows" do
47
- it "selects the right executable" do
53
+ context "when on anything but Windows" do
54
+ it "selects the right executable" do
48
55
  described_class.stub(:windows? => false)
49
56
  described_class.new.path.should match /#{described_class::EXE_NAME}\Z/
50
57
  end
@@ -6,17 +6,17 @@ require "itunes/store/transporter"
6
6
 
7
7
  module SpecHelper
8
8
  def create_options(options = {})
9
- { :username => "uzer",
9
+ { :username => "uzer",
10
10
  :password => "_Gcod3" }.merge(options)
11
11
  end
12
-
12
+
13
13
  # TODO: options for package contents?
14
14
  def create_package(options = {})
15
15
  Dir.mktmpdir ["",".itmsp"]
16
16
  end
17
17
 
18
- def expect_shell_args(*expected)
19
- ITunes::Store::Transporter::Shell.any_instance.stub(:exec) { |*arg| arg.first.should include(*expected) }
18
+ def expect_shell_args(*expected)
19
+ ITunes::Store::Transporter::Shell.any_instance.should_receive(:exec) { |*arg| arg.first.should include(*expected); 0 }
20
20
  end
21
21
 
22
22
  def fixture(path)
@@ -27,7 +27,7 @@ module SpecHelper
27
27
  def mock_output(options = {})
28
28
  outputs = []
29
29
  exitcode = options[:exit] || 0
30
-
30
+
31
31
  # Load a fixture for the given stream
32
32
  [:stderr, :stdout].each do |fd|
33
33
  fixture = options[fd]
@@ -35,29 +35,28 @@ module SpecHelper
35
35
  lines = Array === fixture ? fixture : Fixture.for(fixture)
36
36
  outputs << [ lines, fd ]
37
37
  end
38
-
39
- ITunes::Store::Transporter::Shell.any_instance.stub(:exec) do |*options|
40
- block = options.pop
38
+
39
+ ITunes::Store::Transporter::Shell.any_instance.should_receive(:exec) do |*options, &block|
41
40
  outputs.each do |lines, fd|
42
41
  lines.each { |line| block.call(line, fd) }
43
42
  end
44
43
  exitcode
45
44
  end
46
45
  end
47
-
46
+
48
47
  module Fixture
49
48
  class << self
50
- def for(path)
49
+ def for(path)
51
50
  type, name = path.split ".", 2
52
51
  raise "Unknown fixture '#{path}'" unless fixtures[type].include?(name)
53
52
  fixtures[type][name].split("\n")
54
53
  end
55
-
54
+
56
55
  private
57
56
  def fixtures
58
57
  @fixtures ||= load_fixtures
59
58
  end
60
-
59
+
61
60
  def load_fixtures
62
61
  init = Hash.new { |h, k| h[k] = {} }
63
62
  Dir[File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "*.yml")].inject(init) do |fixtures, path|
@@ -67,9 +66,9 @@ module SpecHelper
67
66
  end
68
67
  end
69
68
  end
70
- end
71
- end
69
+ end
70
+ end
72
71
 
73
- RSpec.configure do |config|
72
+ RSpec.configure do |config|
74
73
  config.include(SpecHelper)
75
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itunes_store_transporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-10 00:00:00.000000000Z
12
+ date: 2012-09-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: childprocess
16
- requirement: &70193863731280 !ruby/object:Gem::Requirement
16
+ requirement: &70153694946460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.3.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70193863731280
24
+ version_requirements: *70153694946460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: optout
27
- requirement: &70193863730780 !ruby/object:Gem::Requirement
27
+ requirement: &70153694945700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.0.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70193863730780
35
+ version_requirements: *70153694945700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70193863730320 !ruby/object:Gem::Requirement
38
+ requirement: &70153694938340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,18 +43,21 @@ dependencies:
43
43
  version: 0.9.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70193863730320
46
+ version_requirements: *70153694938340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70193863729860 !ruby/object:Gem::Requirement
49
+ requirement: &70153694937480 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 2.8.0
54
+ version: '2.9'
55
+ - - <
56
+ - !ruby/object:Gem::Version
57
+ version: '3'
55
58
  type: :development
56
59
  prerelease: false
57
- version_requirements: *70193863729860
60
+ version_requirements: *70153694937480
58
61
  description: ! " iTunes::Store::Transporter is a wrapper around Apple's iTMSTransporter
59
62
  program. It allows you to upload packages to the \n Apple Store, validate them,
60
63
  retrieve status information, lookup metadata, and more!\n"
@@ -64,6 +67,7 @@ executables:
64
67
  extensions: []
65
68
  extra_rdoc_files:
66
69
  - README.rdoc
70
+ - Changes
67
71
  files:
68
72
  - lib/itunes/store/transporter/command/lookup.rb
69
73
  - lib/itunes/store/transporter/command/option.rb
@@ -79,13 +83,19 @@ files:
79
83
  - lib/itunes/store/transporter/shell.rb
80
84
  - lib/itunes/store/transporter/version.rb
81
85
  - lib/itunes/store/transporter.rb
82
- - README.rdoc
83
86
  - spec/command_spec.rb
84
87
  - spec/errors_spec.rb
88
+ - spec/fixtures/errors_and_warnings.yml
89
+ - spec/fixtures/providers.yml
90
+ - spec/fixtures/status.yml
91
+ - spec/fixtures/stderr.yml
92
+ - spec/fixtures/stdout.yml
85
93
  - spec/output_parser_spec.rb
86
94
  - spec/shell_spec.rb
87
95
  - spec/spec_helper.rb
88
96
  - spec/transporter_spec.rb
97
+ - README.rdoc
98
+ - Changes
89
99
  - bin/itms
90
100
  homepage: http://github.com/sshaw/itunes_store_transporter
91
101
  licenses:
@@ -116,6 +126,11 @@ summary: Upload and manage your assets in the iTunes Store using the iTunes Stor
116
126
  test_files:
117
127
  - spec/command_spec.rb
118
128
  - spec/errors_spec.rb
129
+ - spec/fixtures/errors_and_warnings.yml
130
+ - spec/fixtures/providers.yml
131
+ - spec/fixtures/status.yml
132
+ - spec/fixtures/stderr.yml
133
+ - spec/fixtures/stdout.yml
119
134
  - spec/output_parser_spec.rb
120
135
  - spec/shell_spec.rb
121
136
  - spec/spec_helper.rb