spaceship 0.27.1 → 0.27.2

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: 5c9ef6a75127c3aa135a43eb82d21c9e3100f624
4
- data.tar.gz: a99ba681d2af1dd4633d9ca701fc4e189baaa503
3
+ metadata.gz: eb86ecbc3bf6e9f2e5b650b7d9a72a24470d70d1
4
+ data.tar.gz: be4aea0f365fd23ca90d35dce63b846f6adf5f1f
5
5
  SHA512:
6
- metadata.gz: 670b44192db63d26d1728a3611975c9b9353569e45e2ac789948a621742b31b2ce018c87982eeccc01e36c6ce75df5f958e82ddc1dcc799b511ed2ea8e69b303
7
- data.tar.gz: e28161306a75b2a610d5e9e4edea2b9d6ef5107c9e25b8fb0dcaa5af67cf9afb9dc40102fa222767716e2126310e8633bcbbcfbe67047129bc7640611e2dae26
6
+ metadata.gz: 5ddcb9b20fdd00e0bad724294baff273dd23dabe63b6cfe4beb6fa2818919536478e61794b5d603e26f4a2e8c076e6d3f36ffdfd4e468d4ee8701393676e86ab
7
+ data.tar.gz: 72431d334d296d2f1c202da2f2fdd8bb196aa9014b9cc29f559be1b690f7ac31c806eed5399ae48f73db307d5f8cce7728a7a2210f3d5768617996a65acf5997
data/README.md CHANGED
@@ -134,12 +134,6 @@ Copy everything from `---\n` to your CI server and provide it as environment var
134
134
 
135
135
  Most [fastlane tools](https://fastlane.tools) already use `spaceship`, like `sigh`, `cert`, `produce`, `pilot` and `boarding`.
136
136
 
137
- ### Full Documentation
138
-
139
- The detailed documentation of all available classes is available on [RubyDoc](http://www.rubydoc.info/github/fastlane/spaceship/frames).
140
-
141
- You can find the log file here `/tmp/spaceship[time]_[pid].log`.
142
-
143
137
  # Technical Details
144
138
 
145
139
  ## HTTP Client
@@ -28,7 +28,7 @@ module Spaceship
28
28
  lookup(keys)
29
29
  end
30
30
 
31
- alias_method :[], :get
31
+ alias [] get
32
32
 
33
33
  def set(keys, value)
34
34
  raise "'keys' must be an array, got #{keys.class} instead" unless keys.kind_of?(Array)
@@ -313,7 +313,9 @@ module Spaceship
313
313
  # to "buffer error (Zlib::BufError)" from deep in the Ruby HTTP stack. Setting this header requests that
314
314
  # the content be served only as plain-text, which seems to work around their problem, while not affecting
315
315
  # other clients.
316
- headers = {'Accept-Encoding' => 'identity'}
316
+ #
317
+ # https://github.com/fastlane/fastlane/issues/4610
318
+ headers = { 'Accept-Encoding' => 'identity' }
317
319
  # We need a service key from a JS file to properly auth
318
320
  js = request(:get, "https://itunesconnect.apple.com/itc/static-resources/controllers/login_cntrl.js", nil, headers)
319
321
  @service_key ||= js.body.match(/itcServiceKey = '(.*)'/)[1]
@@ -429,7 +431,7 @@ module Spaceship
429
431
  end
430
432
 
431
433
  if content.nil?
432
- raise UnexpectedResponse.new(response.body)
434
+ raise UnexpectedResponse, response.body
433
435
  else
434
436
  store_csrf_tokens(response)
435
437
  content
@@ -10,6 +10,7 @@ module Spaceship
10
10
  def content_type(path)
11
11
  path = path.downcase
12
12
  return 'image/jpeg' if path.end_with?('.jpg')
13
+ return 'image/jpeg' if path.end_with?('.jpeg')
13
14
  return 'image/png' if path.end_with?('.png')
14
15
  return 'application/json' if path.end_with?('.geojson')
15
16
  return 'video/quicktime' if path.end_with?('.mov')
@@ -47,8 +47,14 @@ module Spaceship
47
47
 
48
48
  # @return (Array) A list of all available teams
49
49
  def teams
50
+ return @teams if @teams
50
51
  req = request(:post, "https://developerservices2.apple.com/services/QH65B2/listTeams.action")
51
- parse_response(req, 'teams')
52
+ @teams = parse_response(req, 'teams').sort_by do |team|
53
+ [
54
+ team['name'],
55
+ team['teamId']
56
+ ]
57
+ end
52
58
  end
53
59
 
54
60
  # @return (String) The currently selected Team ID
@@ -46,7 +46,12 @@ module Spaceship
46
46
  def teams
47
47
  return @teams if @teams
48
48
  r = request(:get, "ra/user/detail")
49
- @teams = parse_response(r, 'data')['associatedAccounts']
49
+ @teams = parse_response(r, 'data')['associatedAccounts'].sort_by do |team|
50
+ [
51
+ team['contentProvider']['name'],
52
+ team['contentProvider']['contentProviderId']
53
+ ]
54
+ end
50
55
  end
51
56
 
52
57
  # @return (String) The currently selected Team ID
@@ -123,6 +128,7 @@ module Spaceship
123
128
 
124
129
  # rubocop:disable Metrics/CyclomaticComplexity
125
130
  # rubocop:disable Metrics/PerceivedComplexity
131
+ # rubocop:disable Metrics/AbcSize
126
132
  def handle_itc_response(raw)
127
133
  return unless raw
128
134
  return unless raw.kind_of? Hash
@@ -182,6 +188,7 @@ module Spaceship
182
188
  end
183
189
  # rubocop:enable Metrics/CyclomaticComplexity
184
190
  # rubocop:enable Metrics/PerceivedComplexity
191
+ # rubocop:enable Metrics/AbcSize
185
192
 
186
193
  #####################################################
187
194
  # @!group Applications
@@ -290,7 +297,7 @@ module Spaceship
290
297
  app_version_data(app_id, version_platform: version_platform, version_id: version_id)
291
298
  end
292
299
 
293
- def app_version_data(app_id, version_platform: nil, version_id:nil)
300
+ def app_version_data(app_id, version_platform: nil, version_id: nil)
294
301
  raise "app_id is required" unless app_id
295
302
  raise "version_platform is required" unless version_platform
296
303
  raise "version_id is required" unless version_id
@@ -35,6 +35,8 @@ module Spaceship
35
35
  result = choose(*available)
36
36
  device_id = result.match(/.*\t.*\t\((.*)\)/)[1]
37
37
  select_device(r, device_id)
38
+ elsif r.body.kind_of?(Hash) && r.body["phoneNumberVerification"].kind_of?(Hash)
39
+ raise "spaceship currently doesn't support the push based 2 step verification, please switch to SMS based 2 factor auth in the mean-time"
38
40
  else
39
41
  raise "Invalid 2 step response #{r.body}"
40
42
  end
@@ -1,3 +1,4 @@
1
1
  module Spaceship
2
- VERSION = "0.27.1".freeze
2
+ VERSION = "0.27.2".freeze
3
+ DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
3
4
  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.27.1
4
+ version: 0.27.2
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: 2016-05-16 00:00:00.000000000 Z
12
+ date: 2016-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager
@@ -305,8 +305,7 @@ dependencies:
305
305
  - - "~>"
306
306
  - !ruby/object:Gem::Version
307
307
  version: 0.38.0
308
- description: Because you would rather spend your time building stuff than fighting
309
- provisioning
308
+ description: Ruby library to access the Apple Dev Center and iTunes Connect
310
309
  email:
311
310
  - spaceship@krausefx.com
312
311
  - stefan@natchev.com
@@ -392,9 +391,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
391
  version: '0'
393
392
  requirements: []
394
393
  rubyforge_project:
395
- rubygems_version: 2.4.5.1
394
+ rubygems_version: 2.4.8
396
395
  signing_key:
397
396
  specification_version: 4
398
- summary: Because you would rather spend your time building stuff than fighting provisioning
397
+ summary: Ruby library to access the Apple Dev Center and iTunes Connect
399
398
  test_files: []
400
399
  has_rdoc: