spaceship 0.38.5 → 0.39.0

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: 9e2d0423843f2bf21256f59a2703893b78836bb8
4
- data.tar.gz: 538db633652b1b2bb6adb9018a5800208720eda1
3
+ metadata.gz: 76862f69fcc199bcda08fcab61497db6a41e3873
4
+ data.tar.gz: ce8e7254767f3efd3c1dfe4ff9745c277db99bbf
5
5
  SHA512:
6
- metadata.gz: 25dcdb5312db9d7efd4a886ef26e195cc7214cf2c10b54f5a6031fef186ade6d2638bb7497444384b4e78e794bcbea3e557ca5e59d870dd8fd89656da3067e1d
7
- data.tar.gz: 04565a1c6d91b4560d1963fc9154d891d1b4a724852000126cdc32d0be65b89c16f8bc74902e2ddcba0cad21aa834274ba7b9cac05bbbaaf73d4fbed5a19718e
6
+ metadata.gz: 356d066446fa9befa67bbc553897ce3fabd260a061c1b14ed1246d1edaf7223b700084fa8bcca7b78bc706a65afa03f12e73dcdeda91b1c877d446b7315fd77c
7
+ data.tar.gz: a306ce8b516182d6816b6563fc1c01b148270ee27db80e87fa625c018a369f00902800ebe1dfef7debd9442dec337d4022f8875a59b0e861b2e5d2131e1f3ab4
@@ -185,8 +185,7 @@ module Spaceship
185
185
 
186
186
  # This method can be used by subclasses to do additional initialisation
187
187
  # using the `raw_data`
188
- def setup
189
- end
188
+ def setup; end
190
189
 
191
190
  #####################################################
192
191
  # @!group Storing the `attr_accessor`
@@ -426,9 +426,11 @@ module Spaceship
426
426
  def devices
427
427
  fetch_details
428
428
 
429
- @devices = (self.profile_details["devices"] || []).collect do |device|
430
- Device.set_client(client).factory(device)
431
- end if (@devices || []).empty?
429
+ if (@devices || []).empty?
430
+ @devices = (self.profile_details["devices"] || []).collect do |device|
431
+ Device.set_client(client).factory(device)
432
+ end
433
+ end
432
434
 
433
435
  @devices
434
436
  end
@@ -436,9 +438,11 @@ module Spaceship
436
438
  def certificates
437
439
  fetch_details
438
440
 
439
- @certificates = (profile_details["certificates"] || []).collect do |cert|
440
- Certificate.set_client(client).factory(cert)
441
- end if (@certificates || []).empty?
441
+ if (@certificates || []).empty?
442
+ @certificates = (profile_details["certificates"] || []).collect do |cert|
443
+ Certificate.set_client(client).factory(cert)
444
+ end
445
+ end
442
446
 
443
447
  return @certificates
444
448
  end
@@ -122,8 +122,7 @@ module Spaceship
122
122
  #####################################################
123
123
  # @!group General
124
124
  #####################################################
125
- def setup
126
- end
125
+ def setup; end
127
126
 
128
127
  private
129
128
 
@@ -12,6 +12,8 @@ module Spaceship
12
12
 
13
13
  attr_accessor :url
14
14
 
15
+ attr_accessor :is_imessage
16
+
15
17
  attr_mapping(
16
18
  'assetToken' => :asset_token,
17
19
  'sortOrder' => :sort_order,
@@ -702,7 +702,8 @@ module Spaceship
702
702
  screenshot_data = screenshot["value"]
703
703
  data = {
704
704
  device_type: display_family['name'],
705
- language: row["language"]
705
+ language: row["language"],
706
+ is_imessage: true # to identify imessage screenshots later on (e.g: during download)
706
707
  }.merge(screenshot_data)
707
708
  result << Tunes::AppScreenshot.factory(data)
708
709
  end
@@ -61,9 +61,10 @@ module Spaceship
61
61
 
62
62
  # @return (Spaceship::Tunes::Application) Returns the application matching the parameter
63
63
  # as either the App ID or the bundle identifier
64
- def find(identifier)
64
+ def find(identifier, mac: false)
65
65
  all.find do |app|
66
- (app.apple_id == identifier.to_s or app.bundle_id == identifier)
66
+ (app.apple_id == identifier.to_s || app.bundle_id == identifier) &&
67
+ app.version_sets.any? { |v| v.platform == (mac ? "osx" : "ios") }
67
68
  end
68
69
  end
69
70
 
@@ -79,14 +80,18 @@ module Spaceship
79
80
  # can't be changed after you submit your first build.
80
81
  # @param company_name (String): The company name or developer name to display on the App Store for your apps.
81
82
  # It cannot be changed after you create your first app.
82
- def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil)
83
+ # @param platform (String): Platform one of (ios,osx)
84
+ # should it be an ios or an osx app
85
+
86
+ def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil)
83
87
  client.create_application!(name: name,
84
88
  primary_language: primary_language,
85
89
  version: version,
86
90
  sku: sku,
87
91
  bundle_id: bundle_id,
88
92
  bundle_id_suffix: bundle_id_suffix,
89
- company_name: company_name)
93
+ company_name: company_name,
94
+ platform: platform)
90
95
  end
91
96
  end
92
97
 
@@ -118,11 +118,12 @@ module Spaceship
118
118
 
119
119
  # @param (testing_type) internal or external
120
120
  def update_testing_status!(new_value, testing_type, build = nil)
121
- data = client.build_trains(self.application.apple_id, testing_type, platform: self.application.platform)
122
-
123
121
  build ||= latest_build if testing_type == 'external'
122
+ platform = build ? build.platform : self.application.platform
124
123
  testing_key = "#{testing_type}Testing"
125
124
 
125
+ data = client.build_trains(self.application.apple_id, testing_type, platform: platform)
126
+
126
127
  # Delete the irrelevant trains and update the relevant one to enable testing
127
128
  data['trains'].delete_if do |train|
128
129
  if train['versionString'] != version_string
@@ -264,11 +264,11 @@ module Spaceship
264
264
  # @param sku (String): A unique ID for your app that is not visible on the App Store.
265
265
  # @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
266
266
  # can't be changed after you submit your first build.
267
- def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil)
267
+ def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil)
268
268
  # First, we need to fetch the data from Apple, which we then modify with the user's values
269
269
  primary_language ||= "English"
270
- app_type = 'ios'
271
- r = request(:get, "ra/apps/create/v2/?platformString=#{app_type}")
270
+ platform ||= "ios"
271
+ r = request(:get, "ra/apps/create/v2/?platformString=#{platform}")
272
272
  data = parse_response(r, 'data')
273
273
 
274
274
  # Now fill in the values we have
@@ -281,10 +281,10 @@ module Spaceship
281
281
  data['vendorId'] = { value: sku }
282
282
  data['bundleIdSuffix'] = { value: bundle_id_suffix }
283
283
  data['companyName'] = { value: company_name } if company_name
284
- data['enabledPlatformsForCreation'] = { value: [app_type] }
284
+ data['enabledPlatformsForCreation'] = { value: [platform] }
285
285
 
286
- data['initialPlatform'] = app_type
287
- data['enabledPlatformsForCreation'] = { value: [app_type] }
286
+ data['initialPlatform'] = platform
287
+ data['enabledPlatformsForCreation'] = { value: [platform] }
288
288
 
289
289
  # Now send back the modified hash
290
290
  r = request(:post) do |req|
@@ -1,4 +1,4 @@
1
1
  module Spaceship
2
- VERSION = "0.38.5".freeze
2
+ VERSION = "0.39.0".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.38.5
4
+ version: 0.39.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: 2016-12-05 00:00:00.000000000 Z
12
+ date: 2016-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager
@@ -105,14 +105,14 @@ dependencies:
105
105
  name: fastimage
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.6'
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '1.6'
118
118
  - !ruby/object:Gem::Dependency
@@ -417,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
417
  version: '0'
418
418
  requirements: []
419
419
  rubyforge_project:
420
- rubygems_version: 2.6.6
420
+ rubygems_version: 2.5.1
421
421
  signing_key:
422
422
  specification_version: 4
423
423
  summary: Ruby library to access the Apple Dev Center and iTunes Connect