spaceship 0.11.5 → 0.12.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: 7892cbc5a93927bef1d796eb45fc84c1017dc1dc
4
- data.tar.gz: df314307a70c527c622414cdcde805c0ab3c273f
3
+ metadata.gz: 670f72d1e7ae70ae541f9ae634424634443ff713
4
+ data.tar.gz: f8765c6809ac1dcff37c4a06626fb69c5ca52610
5
5
  SHA512:
6
- metadata.gz: 347d01092e1fcd5c0f5ac9de94bb2da604224fb022a7840ff8f7c0549ac547f75a6e07b7a85dc9bcfe0a6ba9fcdbba8c2e10e73a7933df3e0d4080ba80c6e9d2
7
- data.tar.gz: e545770c5d1e129f3b85ebf6240ffa2b1730c106b4143a0700ce4f4828d5ee9e59fc5dd0e261e720edc5a9e6584f68eee8d735fc1ae44b43456d522fd657bfba
6
+ metadata.gz: e5bc13664c313a4986914cf8e0a85ba7182f01af2e7d2c356aec9dfcd786666373e6c9ae94475490aa1e134fe8041ba6c0eb56a1ffc7305b3c10563fcb80e146
7
+ data.tar.gz: 97ddde568c7581746280014c888e89f6b5ca413f4aac6241de674ec1cfd300fb3085dd7053cffebf94f27517e8e700098cab63278bb21d54547b1d9e83a766d8
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  module Spaceship
2
4
  # a wrapper around the concept of file required to make uploads to DU
3
5
  class UploadFile
@@ -112,6 +112,21 @@ module Spaceship
112
112
  self.internal_expiry_date ||= 0
113
113
  end
114
114
 
115
+ def update_build_information!(whats_new: nil,
116
+ description: nil,
117
+ feedback_email: nil)
118
+ parameters = {
119
+ app_id: self.build_train.application.apple_id,
120
+ train: self.build_train.version_string,
121
+ build_number: self.build_version
122
+ }.merge({
123
+ whats_new: whats_new,
124
+ description: description,
125
+ feedback_email: feedback_email
126
+ })
127
+ client.update_build_information!(parameters)
128
+ end
129
+
115
130
  # This will submit this build for TestFlight beta review
116
131
  # @param metadata [Hash] A hash containing the following information (keys must be symbols):
117
132
  # {
@@ -464,6 +464,37 @@ module Spaceship
464
464
  handle_itc_response(r.body)
465
465
  end
466
466
 
467
+ def update_build_information!(app_id: nil,
468
+ train: nil,
469
+ build_number: nil,
470
+
471
+ # optional:
472
+ whats_new: nil,
473
+ description: nil,
474
+ feedback_email: nil)
475
+ url = "ra/apps/#{app_id}/platforms/ios/trains/#{train}/builds/#{build_number}/testInformation"
476
+ r = request(:get) do |req|
477
+ req.url url
478
+ req.headers['Content-Type'] = 'application/json'
479
+ end
480
+ handle_itc_response(r.body)
481
+
482
+ build_info = r.body['data']
483
+ build_info["details"].each do |current|
484
+ current["whatsNew"]["value"] = whats_new if whats_new
485
+ current["description"]["value"] = description if description
486
+ current["feedbackEmail"]["value"] = feedback_email if feedback_email
487
+ end
488
+
489
+ # Now send everything back to iTC
490
+ r = request(:post) do |req| # same URL, but a POST request
491
+ req.url url
492
+ req.body = build_info.to_json
493
+ req.headers['Content-Type'] = 'application/json'
494
+ end
495
+ handle_itc_response(r.body)
496
+ end
497
+
467
498
  # rubocop:disable Metrics/AbcSize
468
499
  def submit_testflight_build_for_review!( # Required:
469
500
  app_id: nil,
@@ -1,3 +1,3 @@
1
1
  module Spaceship
2
- VERSION = "0.11.5"
2
+ VERSION = "0.12.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.11.5
4
+ version: 0.12.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-10-09 00:00:00.000000000 Z
12
+ date: 2015-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager