spaceship 0.31.7 → 0.31.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 293ec17256da9ad97ac287851b6ce5a37649d5b6
4
- data.tar.gz: 776113953f98a7d6da446f5411e11be1d3d83bfc
3
+ metadata.gz: f34363edf546d130d7ab1c2d98cb1bcd9d57a358
4
+ data.tar.gz: 7839f0cfd68685a391b87faa16dd2e781f258dee
5
5
  SHA512:
6
- metadata.gz: d24cfbed3e14bb9e6a3b51793632dc58d67fd09969ec5bd82f1bb08f98e5fa34b2e97839e0d8be23a88af2a87649e8cf7e09d86d53ace6dbb3375a2e75b7a75c
7
- data.tar.gz: 23b14134b3397e463170b2d37234bfb2b1184c06802a81f7326e60fd0326c5aacdfcd6f07826fecdc77579fee9c84edc20b57f443fa1405f2480cf0163480297
6
+ metadata.gz: 6e5b05cae3b0e1cbc8d97bdc48979cef96bb5ab39e3c5f1d56a924be78fd65a6cfa898be2ccffb052eb1ace9dfdeec6eb124eb38ce92d9052d525f7f05849972
7
+ data.tar.gz: b34093969e1884de121c5e645bbd0d10757afabecfb9b718a20d7c3cd80a72a147b3c1df92ed8fe5aae8fc75ed34b9fa961b345566a28ae1b1e9c36c62602071
data/lib/spaceship.rb CHANGED
@@ -13,6 +13,8 @@ require 'spaceship/tunes/spaceship'
13
13
 
14
14
  # To support legacy code
15
15
  module Spaceship
16
+ ROOT = Pathname.new(File.expand_path('../..', __FILE__))
17
+
16
18
  # Dev Portal
17
19
  Certificate = Spaceship::Portal::Certificate
18
20
  ProvisioningProfile = Spaceship::Portal::ProvisioningProfile
@@ -349,6 +349,7 @@ module Spaceship
349
349
 
350
350
  def do_login(user, password)
351
351
  @loggedin = false
352
+ @requested_csrf_token = nil
352
353
  ret = send_login_request(user, password) # different in subclasses
353
354
  @loggedin = true
354
355
  ret
@@ -412,15 +412,20 @@ module Spaceship
412
412
  # as we always want to request something at least once
413
413
  return unless @requested_csrf_token.nil?
414
414
 
415
+ # Update 23rd August 2016
416
+ # Instead of calling `Certificate::Production.all` we call `App.all`
417
+ # We've had issues when we only requested certificates, instead of apps, we don't know why
418
+ # Source: https://github.com/fastlane/fastlane/issues/5827
419
+
415
420
  # If we directly create a new resource (e.g. app) without querying anything before
416
421
  # we don't have a valid csrf token, that's why we have to do at least one request
417
- Certificate::Production.all
422
+ App.all
418
423
 
419
424
  # Update 18th August 2016
420
425
  # For some reason, we have to query the resource twice to actually get a valid csrf_token
421
426
  # I couldn't find out why, the first response does have a valid Set-Cookie header
422
427
  # But it still needs this second request
423
- Certificate::Production.all
428
+ App.all
424
429
 
425
430
  @requested_csrf_token = true if csrf_tokens.count > 0
426
431
  end
@@ -29,22 +29,13 @@ module Spaceship
29
29
 
30
30
  private
31
31
 
32
- # Path to the gem to fetch resoures
33
- def spaceship_gem_path
34
- if Gem::Specification.find_all_by_name('spaceship').any?
35
- return Gem::Specification.find_by_name('spaceship').gem_dir
36
- else
37
- return './'
38
- end
39
- end
40
-
41
32
  # Get the mapping JSON parsed
42
33
  def mapping
43
- @languages ||= JSON.parse(File.read(File.join(spaceship_gem_path, "lib", "assets", "languageMapping.json")))
34
+ @languages ||= JSON.parse(File.read(File.join(Spaceship::ROOT, "lib", "assets", "languageMapping.json")))
44
35
  end
45
36
 
46
37
  def readable_mapping
47
- @readable ||= JSON.parse(File.read(File.join(spaceship_gem_path, "lib", "assets", "languageMappingReadable.json")))
38
+ @readable ||= JSON.parse(File.read(File.join(Spaceship::ROOT, "lib", "assets", "languageMappingReadable.json")))
48
39
  end
49
40
  end
50
41
  end
@@ -1,4 +1,4 @@
1
1
  module Spaceship
2
- VERSION = "0.31.7".freeze
2
+ VERSION = "0.31.8".freeze
3
3
  DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
4
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.31.7
4
+ version: 0.31.8
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-08-22 00:00:00.000000000 Z
12
+ date: 2016-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager
@@ -391,7 +391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
391
391
  version: '0'
392
392
  requirements: []
393
393
  rubyforge_project:
394
- rubygems_version: 2.2.2
394
+ rubygems_version: 2.5.1
395
395
  signing_key:
396
396
  specification_version: 4
397
397
  summary: Ruby library to access the Apple Dev Center and iTunes Connect