spaceship 0.19.3 → 0.19.4

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: eef0b3daccd7d674a5e4262b3e53ac22b217c45a
4
- data.tar.gz: 3f880a9b11397d309969408d2c3cf3204692d446
3
+ metadata.gz: 4693da7e9b3b4cee2808c01b9aca5756699271ac
4
+ data.tar.gz: e0cf96db5506284940c11e489da1a43f1a1a6607
5
5
  SHA512:
6
- metadata.gz: b793b4ec731b8f47a32cb97b44d8ee316424d2fcd55a642ebea0cb3275ca355eeac2acbc21afa799f0f0c42f647882de347ad8f2ba2cd270c825aae54576d2fe
7
- data.tar.gz: 12f2544aecadb004e3ceb516c2a68ca420ebac1acb90589a5c22d691ccc4c8fc55fcd9910ee5403cfb815db12c2796e492f99f0a1dc6f8d4430683ffed19dd23
6
+ metadata.gz: dd750685e85559d693d15373cb2f7944353c42a793b8be318ef9b5714ce04e9a8e1e2f95904978baccde06e29e22faf681e848f16cd0ac69ded0a17002676230
7
+ data.tar.gz: 8a53dbea6ef84b06fba11c3b6caaa0b6fa0ab5dadec16768b76713902a9705a060af3e7639121ef1a30dd2641ab6f236350c616b6d8eeb637f52462dadb8b4af
data/README.md CHANGED
@@ -186,6 +186,9 @@ The initial release was sponsored by [ZeroPush](https://zeropush.com).
186
186
 
187
187
  ##### [Like this tool? Be the first to know about updates and new fastlane tools](https://tinyletter.com/krausefx)
188
188
 
189
+ # Code of Conduct
190
+ Help us keep `fastlane` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/code-of-conduct).
191
+
189
192
  # License
190
193
  This project is licensed under the terms of the MIT license. See the LICENSE file.
191
194
 
@@ -147,9 +147,8 @@ module Spaceship
147
147
  end
148
148
 
149
149
  # Find the device by UDID, raise an exception if it already exists
150
- if self.find_by_udid(udid, mac: mac)
151
- raise "The device UDID '#{udid}' already exists on this team."
152
- end
150
+ existing = self.find_by_udid(udid, mac: mac)
151
+ return existing if existing
153
152
 
154
153
  # It is valid to have the same name for multiple devices
155
154
 
@@ -377,6 +377,14 @@ module Spaceship
377
377
  end
378
378
 
379
379
  def delete_provisioning_profile!(profile_id, mac: false)
380
+ if csrf_tokens.count == 0
381
+ r = request(:post, "account/#{platform_slug(mac)}/profile/getProvisioningProfile.action", {
382
+ teamId: team_id,
383
+ provisioningProfileId: profile_id
384
+ })
385
+ parse_response(r)
386
+ end
387
+
380
388
  r = request(:post, "account/#{platform_slug(mac)}/profile/deleteProvisioningProfile.action", {
381
389
  teamId: team_id,
382
390
  provisioningProfileId: profile_id
@@ -62,7 +62,7 @@ module Spaceship
62
62
  # User Selection
63
63
  loop do
64
64
  # Multiple teams, user has to select
65
- puts "Multiple teams found, please enter the number of the team you want to use: "
65
+ puts "Multiple teams found on the Developer Portal, please enter the number of the team you want to use: "
66
66
  teams.each_with_index do |team, i|
67
67
  puts "#{i + 1}) #{team['teamId']} \"#{team['name']}\" (#{team['type']})"
68
68
  end
@@ -118,7 +118,8 @@ module Spaceship
118
118
  parameters = {
119
119
  app_id: self.build_train.application.apple_id,
120
120
  train: self.build_train.version_string,
121
- build_number: self.build_version
121
+ build_number: self.build_version,
122
+ platform: self.platform
122
123
  }.merge({
123
124
  whats_new: whats_new,
124
125
  description: description,
@@ -92,11 +92,11 @@ module Spaceship
92
92
  train["#{testing_type}Testing"]['value'] = false
93
93
  train["#{testing_type}Testing"]['value'] = new_value if train['versionString'] == version_string
94
94
 
95
- # also update the builds
95
+ # find correct build
96
+ train['builds'].select! { |b| !b["#{testing_type}Testing"].nil? && !build.nil? && b['buildVersion'] == build.build_version }
97
+
98
+ # also update the build if it was found
96
99
  train['builds'].each do |b|
97
- next if b["#{testing_type}Testing"].nil?
98
- next if build.nil?
99
- next if b["buildVersion"] != build.build_version
100
100
  b["#{testing_type}Testing"]['value'] = false
101
101
  b["#{testing_type}Testing"]['value'] = new_value if b['trainVersion'] == version_string
102
102
  end
@@ -76,10 +76,10 @@ module Spaceship
76
76
 
77
77
  # @return (Spaceship::Tunes::Tester) Returns the tester matching the parameter
78
78
  # as either the Tester id or email
79
- # @param identifier (String) (required): Value used to filter the tester
79
+ # @param identifier (String) (required): Value used to filter the tester, case insensitive
80
80
  def find(identifier)
81
81
  all.find do |tester|
82
- (tester.tester_id == identifier.to_s or tester.email == identifier)
82
+ (tester.tester_id.to_s.casecmp(identifier.to_s).zero? or tester.email.to_s.casecmp(identifier.to_s).zero?)
83
83
  end
84
84
  end
85
85
 
@@ -111,10 +111,10 @@ module Spaceship
111
111
  # @return (Spaceship::Tunes::Tester) Returns the tester matching the parameter
112
112
  # as either the Tester id or email
113
113
  # @param app_id (String) (required): The app id to filter the testers
114
- # @param identifier (String) (required): Value used to filter the tester
114
+ # @param identifier (String) (required): Value used to filter the tester, case insensitive
115
115
  def find_by_app(app_id, identifier)
116
116
  all_by_app(app_id).find do |tester|
117
- (tester.tester_id == identifier.to_s or tester.email == identifier)
117
+ (tester.tester_id.to_s.casecmp(identifier.to_s).zero? or tester.email.to_s.casecmp(identifier.to_s).zero?)
118
118
  end
119
119
  end
120
120
 
@@ -90,7 +90,7 @@ module Spaceship
90
90
 
91
91
  # user didn't specify a team... #thisiswhywecanthavenicethings
92
92
  loop do
93
- puts "Multiple teams found, please enter the number of the team you want to use: "
93
+ puts "Multiple iTunes Connect teams found, please enter the number of the team you want to use: "
94
94
  teams.each_with_index do |team, i|
95
95
  puts "#{i + 1}) \"#{team['contentProvider']['name']}\" (#{team['contentProvider']['contentProviderId']})"
96
96
  end
@@ -528,7 +528,7 @@ module Spaceship
528
528
 
529
529
  def remove_testflight_build_from_review!(app_id: nil, train: nil, build_number: nil)
530
530
  r = request(:post) do |req|
531
- req.url "ra/apps/#{app_id}/trains/#{train}/builds/#{build_number}/reject"
531
+ req.url "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/reject"
532
532
  req.body = {}.to_json
533
533
  req.headers['Content-Type'] = 'application/json'
534
534
  end
@@ -542,8 +542,9 @@ module Spaceship
542
542
  # optional:
543
543
  whats_new: nil,
544
544
  description: nil,
545
- feedback_email: nil)
546
- url = "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/testInformation"
545
+ feedback_email: nil,
546
+ platform: 'ios')
547
+ url = "ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/testInformation"
547
548
  r = request(:get) do |req|
548
549
  req.url url
549
550
  req.headers['Content-Type'] = 'application/json'
@@ -606,7 +607,7 @@ module Spaceship
606
607
  build_info['testInfo']['reviewPassword']['value'] = review_password
607
608
 
608
609
  r = request(:post) do |req| # same URL, but a POST request
609
- req.url "ra/apps/#{app_id}/trains/#{train}/builds/#{build_number}/submit/start"
610
+ req.url "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/submit/start"
610
611
 
611
612
  req.body = build_info.to_json
612
613
  req.headers['Content-Type'] = 'application/json'
@@ -623,7 +624,7 @@ module Spaceship
623
624
 
624
625
  def get_build_info_for_review(app_id: nil, train: nil, build_number: nil)
625
626
  r = request(:get) do |req|
626
- req.url "ra/apps/#{app_id}/trains/#{train}/builds/#{build_number}/submit/start"
627
+ req.url "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/submit/start"
627
628
  req.headers['Content-Type'] = 'application/json'
628
629
  end
629
630
  handle_itc_response(r.body)
@@ -640,7 +641,7 @@ module Spaceship
640
641
  encryption_info['encryptionUpdated']['value'] = encryption
641
642
 
642
643
  r = request(:post) do |req|
643
- req.url "ra/apps/#{app_id}/trains/#{train}/builds/#{build_number}/submit/complete"
644
+ req.url "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/submit/complete"
644
645
  req.body = encryption_info.to_json
645
646
  req.headers['Content-Type'] = 'application/json'
646
647
  end
@@ -1,3 +1,3 @@
1
1
  module Spaceship
2
- VERSION = "0.19.3"
2
+ VERSION = "0.19.4"
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.19.3
4
+ version: 0.19.4
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-01-22 00:00:00.000000000 Z
12
+ date: 2016-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
328
328
  version: '0'
329
329
  requirements: []
330
330
  rubyforge_project:
331
- rubygems_version: 2.4.6
331
+ rubygems_version: 2.4.0
332
332
  signing_key:
333
333
  specification_version: 4
334
334
  summary: Because you would rather spend your time building stuff than fighting provisioning