spaceship 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab8b3adebbb73b111b8bad0668236cab5d4b0ca7
4
- data.tar.gz: 3b35956a3ad1b66ea6147d5f6dccf547c37fec29
3
+ metadata.gz: 10196335fa16147c3c68c05ce2a1dedd5abb4855
4
+ data.tar.gz: 29d7946d869af47eb0742691a9a6525862736728
5
5
  SHA512:
6
- metadata.gz: c9f454b4da98d9c04c2704810ffdf18bf3ef49926ac415732a84f243a788ec293a6d871ffb29dd488362c31e08f1f632bcb69a132aeda995e778c59087829a4f
7
- data.tar.gz: d0cff9a916e11b95263a8a26f7d8e9c52857e465370dd80ed847d3b910f7530d878cba37aefa20ff2df65f546dbbda6443a6da45d28427eef4d112d77f6ddeec
6
+ metadata.gz: 0583ef2ef07a5d4a0aa6428350e7d4f4478f8b49e723cc9a7063edbf9c58ceac60b4ecf4272988db2b7840444a93510d6df3fbfb47df0588aad33c6eb315c4bb
7
+ data.tar.gz: f5a1b4f14bcd488cfe7ef18db714f40a1f23cfda3e09aa7110ec3bcd09fedb26d105f9733048a7abe39a04e46841eb4c409e95a0c027313882e4f2209ddea6b0
data/README.md CHANGED
@@ -17,7 +17,8 @@
17
17
  <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
18
18
  <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
19
19
  <a href="https://github.com/fastlane/gym">gym</a> &bull;
20
- <a href="https://github.com/fastlane/scan">scan</a>
20
+ <a href="https://github.com/fastlane/scan">scan</a> &bull;
21
+ <a href="https://github.com/fastlane/match">match</a>
21
22
  </p>
22
23
  -------
23
24
 
@@ -37,6 +37,13 @@ module Spaceship
37
37
  appIdKey: api_key
38
38
  })
39
39
 
40
+ if (response.body || "").include?("Your Apple ID or password was entered incorrectly")
41
+ # User Credentials are wrong
42
+ raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."
43
+ elsif (response.body || "").include?("Verify your identity")
44
+ raise "spaceship / fastlane doesn't support 2 step enabled accounts yet. Please temporary disable 2 step verification until spaceship was updated."
45
+ end
46
+
40
47
  case response.status
41
48
  when 302
42
49
  return response
@@ -44,15 +51,6 @@ module Spaceship
44
51
  raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."
45
52
  else
46
53
  # Something went wrong. Was it invalid credentials or server issue
47
- if (response.body || "").include?("Your Apple ID or password was entered incorrectly")
48
- # User Credentials are wrong
49
- raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."
50
- elsif (response.body || "").include?("Verify your identity")
51
- raise "spaceship / fastlane doesn't support 2 step enabled accounts yet. Please temporary disable 2 step verification until spaceship was updated."
52
- else
53
- info = [response.body, response['Set-Cookie']]
54
- raise UnexpectedResponse.new, info.join("\n")
55
- end
56
54
  info = [response.body, response['Set-Cookie']]
57
55
  raise UnexpectedResponse.new, info.join("\n")
58
56
  end
@@ -206,7 +206,21 @@ module Spaceship
206
206
  Tunes::ProcessingBuild.factory(attrs)
207
207
  end
208
208
 
209
- builds.delete_if { |a| a.state == "ITC.apps.betaProcessingStatus.InvalidBinary" }
209
+ builds.delete_if { |a| a.state.include?("invalidBinary") }
210
+
211
+ builds
212
+ end
213
+
214
+ # @return [Array]A list of binaries which are in the invalid state
215
+ def invalid_builds
216
+ data = client.build_trains(apple_id, 'internal') # we need to fetch all trains here to get the builds
217
+
218
+ builds = data.fetch('processingBuilds', []).collect do |attrs|
219
+ attrs.merge!(build_train: self)
220
+ Tunes::ProcessingBuild.factory(attrs)
221
+ end
222
+
223
+ builds.delete_if { |a| !a.state.include?("invalidBinary") }
210
224
 
211
225
  builds
212
226
  end
@@ -70,6 +70,11 @@ module Spaceship
70
70
  attrs.merge!(build_train: self)
71
71
  Tunes::Build.factory(attrs)
72
72
  end
73
+
74
+ # since buildsInProcessing appears empty, fallback to also including processing state from @builds
75
+ @builds.each do |build|
76
+ @processing_builds << build if build.processing == true && build.valid == true
77
+ end
73
78
  end
74
79
 
75
80
  # @return (Spaceship::Tunes::Build) The latest build for this train, sorted by upload time.
@@ -15,7 +15,7 @@ module Spaceship
15
15
  attr_accessor :upload_date
16
16
 
17
17
  attr_mapping(
18
- 'state' => :state,
18
+ 'processingState' => :state,
19
19
  'uploadDate' => :upload_date
20
20
  )
21
21
 
@@ -1,3 +1,3 @@
1
1
  module Spaceship
2
- VERSION = "0.16.0"
2
+ VERSION = "0.17.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-09 00:00:00.000000000 Z
12
+ date: 2015-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager