fastlane 2.52.0.beta.20170808010002 → 2.52.0.beta.20170809010003

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: 1d7ace69db62724c0fb8039085ced7b2a2a27482
4
- data.tar.gz: dcaa897e1eaeb554b27f71d31ca264ff9456c6dd
3
+ metadata.gz: 84dfac521c24a7dc35841c4d194e9a31ae8db07a
4
+ data.tar.gz: 1e6dc149c74e78056604e463a8c7868308e2857d
5
5
  SHA512:
6
- metadata.gz: 28cf03f2a76e9887d85eba452c63a84d5a924a1fe15d057a7cc48dda2f45c4ceefedfae3baadaad244e54660514b66c64a945e038e7e3a664c573f488267e4bf
7
- data.tar.gz: 20529f24afc12146473f6cada78d052b58882a987819929217e6892a63be143a5871f718905e705430bc14ea11db75f5ab316d9da3f310a44cb57170bdea9f3e
6
+ metadata.gz: 235a44f8ba3596df28e20a411e11f700c068d9b2f99cc63b4e75d5a5c096ff4484029198959ecdffcaabd976fc195e16a57178a9648c2857b32217f9915e1130
7
+ data.tar.gz: 72e318606acf692f108481298541fb07c0d2a756b307a2994c686cfa3c99ab82f84c7ac86defca2088d5159787bbe5665eef22b6a17a6285c6a1c759ba73e9c8
data/README.md CHANGED
@@ -167,7 +167,15 @@ You can easily opt-out of crash reporting by adding `opt_out_crash_reporting` at
167
167
 
168
168
  ## Need Help?
169
169
 
170
- Please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup.
170
+ Before submitting a new GitHub issue, please make sure to
171
+
172
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
173
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
174
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
175
+
176
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
177
+
178
+ **Note**: If you want to report a regression in _fastlane_ (something that has worked before, but broke with a new release), please mark your issue title as such using `[Regression] Your title here`. This enables us to quickly detect and fix regressions.
171
179
 
172
180
  ## Special Thanks
173
181
 
data/cert/README.md CHANGED
@@ -154,7 +154,14 @@ This will result in `sigh` always using the correct signing certificate, which i
154
154
  Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning) to easily preview provisioning profile files and certificates.
155
155
 
156
156
  # Need help?
157
- Please submit an issue on GitHub and provide information about your setup
157
+
158
+ Before submitting a new GitHub issue, please make sure to
159
+
160
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
161
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
162
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
163
+
164
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
158
165
 
159
166
  # Code of Conduct
160
167
  Help us keep `cert` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/deliver/README.md CHANGED
@@ -275,7 +275,14 @@ Apple has a limit of 150 binary uploads per day.
275
275
  Change syntax highlighting to *Ruby*.
276
276
 
277
277
  # Need help?
278
- Please submit an issue on GitHub and provide information about your setup
278
+
279
+ Before submitting a new GitHub issue, please make sure to
280
+
281
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
282
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
283
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
284
+
285
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
279
286
 
280
287
  # Code of Conduct
281
288
  Help us keep `deliver` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/fastlane/README.md CHANGED
@@ -190,7 +190,14 @@ See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-
190
190
  A detailed description about how `fastlane` stores your credentials is available on a [separate repo](https://github.com/fastlane/fastlane/tree/master/credentials_manager).
191
191
 
192
192
  ## Need help?
193
- Please submit an issue on GitHub and provide information about your setup
193
+
194
+ Before submitting a new GitHub issue, please make sure to
195
+
196
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
197
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
198
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
199
+
200
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
194
201
 
195
202
  ## Special Thanks
196
203
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.52.0.beta.20170808010002'.freeze
2
+ VERSION = '2.52.0.beta.20170809010003'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  end
@@ -140,6 +140,7 @@ module FastlaneCore
140
140
 
141
141
  # @return The version of the currently used Xcode installation (e.g. "7.0")
142
142
  def self.xcode_version
143
+ return nil unless self.is_mac?
143
144
  return @xcode_version if @xcode_version
144
145
 
145
146
  begin
@@ -210,8 +210,7 @@ module FastlaneCore
210
210
  '-Xms1024m',
211
211
  '-Djava.awt.headless=true',
212
212
  '-Dsun.net.http.retryPost=false',
213
- "-classpath #{Helper.transporter_java_jar_path.shellescape}",
214
- 'com.apple.transporter.Application',
213
+ java_code_option,
215
214
  '-m upload',
216
215
  "-u #{username.shellescape}",
217
216
  "-p #{password.shellescape}",
@@ -234,8 +233,7 @@ module FastlaneCore
234
233
  '-Xms1024m',
235
234
  '-Djava.awt.headless=true',
236
235
  '-Dsun.net.http.retryPost=false',
237
- "-classpath #{Helper.transporter_java_jar_path.shellescape}",
238
- 'com.apple.transporter.Application',
236
+ java_code_option,
239
237
  '-m lookupMetadata',
240
238
  "-u #{username.shellescape}",
241
239
  "-p #{password.shellescape}",
@@ -246,6 +244,14 @@ module FastlaneCore
246
244
  ].compact.join(' ')
247
245
  end
248
246
 
247
+ def java_code_option
248
+ if Helper.xcode_at_least?(9)
249
+ return "-jar #{Helper.transporter_java_jar_path.shellescape}"
250
+ else
251
+ return "-classpath #{Helper.transporter_java_jar_path.shellescape} com.apple.transporter.Application"
252
+ end
253
+ end
254
+
249
255
  def handle_error(password)
250
256
  unless File.exist?(Helper.transporter_java_jar_path)
251
257
  UI.error("The iTMSTransporter Java app was not found at '#{Helper.transporter_java_jar_path}'.")
data/frameit/README.md CHANGED
@@ -279,7 +279,14 @@ brew install imagemagick
279
279
  - ```rm -rf ~/.frameit```
280
280
 
281
281
  # Need help?
282
- Please submit an issue on GitHub and provide information about your setup
282
+
283
+ Before submitting a new GitHub issue, please make sure to
284
+
285
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
286
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
287
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
288
+
289
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
283
290
 
284
291
  # Code of Conduct
285
292
  Help us keep `frameit` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
@@ -25,7 +25,11 @@ module Frameit
25
25
  next if full_path.include? "_framed.png"
26
26
  next if full_path.include? ".itmsp/" # a package file, we don't want to modify that
27
27
  next if full_path.include? "device_frames/" # these are the device frames the user is using
28
- next if full_path.downcase.include? "watch" # we don't care about watches right now
28
+ device = full_path.rpartition('/').last.partition('-').first # extract device name
29
+ if device.downcase.include? "watch"
30
+ UI.error("Apple Watch screenshots are not framed: '#{full_path}'")
31
+ next # we don't care about watches right now
32
+ end
29
33
 
30
34
  UI.message("Framing screenshot '#{full_path}'")
31
35
 
data/gym/README.md CHANGED
@@ -292,7 +292,14 @@ Note: the [xcbuild-safe.sh script](https://github.com/fastlane/fastlane/tree/mas
292
292
  Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning).
293
293
 
294
294
  # Need help?
295
- Please submit an issue on GitHub and provide information about your setup
295
+
296
+ Before submitting a new GitHub issue, please make sure to
297
+
298
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
299
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
300
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
301
+
302
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
296
303
 
297
304
  # Code of Conduct
298
305
  Help us keep `gym` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
@@ -1,4 +1,4 @@
1
- #!/bin/bash --login
1
+ #!/bin/bash
2
2
  # shellcheck disable=SC2155
3
3
  # shellcheck disable=SC1090
4
4
 
@@ -140,7 +140,7 @@ module Gym
140
140
  end
141
141
 
142
142
  def self.min_xcode8?
143
- Helper.xcode_version.split(".").first.to_i >= 8
143
+ Helper.xcode_at_least?("8.0")
144
144
  end
145
145
 
146
146
  # Is it an iOS device or a Mac?
data/match/README.md CHANGED
@@ -410,7 +410,14 @@ Because of the potentially dangerous nature of In-House profiles please use _mat
410
410
  - [`precheck`](https://github.com/fastlane/fastlane/tree/master/precheck): Check your app using a community driven set of App Store review rules to avoid being rejected
411
411
 
412
412
  # Need help?
413
- Please submit an issue on GitHub and provide information about your setup
413
+
414
+ Before submitting a new GitHub issue, please make sure to
415
+
416
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
417
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
418
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
419
+
420
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
414
421
 
415
422
  # Code of Conduct
416
423
  Help us keep `match` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/pem/README.md CHANGED
@@ -180,7 +180,14 @@ It will show you the ```pem``` files like this:
180
180
 
181
181
 
182
182
  # Need help?
183
- Please submit an issue on GitHub and provide information about your setup
183
+
184
+ Before submitting a new GitHub issue, please make sure to
185
+
186
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
187
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
188
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
189
+
190
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
184
191
 
185
192
  # Code of Conduct
186
193
  Help us keep `pem` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/pilot/README.md CHANGED
@@ -277,7 +277,14 @@ If your password contains special characters, `pilot` may throw a confusing erro
277
277
  `pilot` uses the [CredentialsManager](https://github.com/fastlane/fastlane/tree/master/credentials_manager) from `fastlane`.
278
278
 
279
279
  # Need help?
280
- Please submit an issue on GitHub and provide information about your setup
280
+
281
+ Before submitting a new GitHub issue, please make sure to
282
+
283
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
284
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
285
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
286
+
287
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
281
288
 
282
289
  # Code of Conduct
283
290
  Help us keep `pilot` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
@@ -104,7 +104,8 @@ module Pilot
104
104
  end
105
105
 
106
106
  def find_app_tester(email: nil, app: nil)
107
- current_user = Spaceship::Members.find(Spaceship::Tunes.client.user)
107
+ current_user = find_current_user
108
+
108
109
  if current_user.admin?
109
110
  tester = Spaceship::Tunes::Tester::Internal.find(email)
110
111
  tester ||= Spaceship::Tunes::Tester::External.find(email)
@@ -126,8 +127,19 @@ module Pilot
126
127
  return tester
127
128
  end
128
129
 
130
+ def find_current_user
131
+ current_user_email = Spaceship::Tunes.client.user_email
132
+ current_user_apple_id = Spaceship::Tunes.client.user
133
+
134
+ current_user = Spaceship::Members.find(current_user_email)
135
+ unless current_user
136
+ UI.user_error!("Unable to find a member for AppleID: #{current_user_apple_id}, email: #{current_user_email}")
137
+ end
138
+ return current_user
139
+ end
140
+
129
141
  def create_tester(email: nil, first_name: nil, last_name: nil, app: nil)
130
- current_user = Spaceship::Members.find(Spaceship::Tunes.client.user)
142
+ current_user = find_current_user
131
143
  if current_user.admin?
132
144
  tester = Spaceship::Tunes::Tester::External.create!(email: email,
133
145
  first_name: first_name,
data/precheck/README.md CHANGED
@@ -158,7 +158,14 @@ end
158
158
  ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
159
159
 
160
160
  # Need help?
161
- Please submit an issue on GitHub and provide information about your setup
161
+
162
+ Before submitting a new GitHub issue, please make sure to
163
+
164
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
165
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
166
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
167
+
168
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
162
169
 
163
170
  # Want to improve precheck's rules?
164
171
  Please submit an issue on GitHub and provide information about your App Store rejection! Make sure you scrub out any personally identifiable information since this will be public.
data/produce/README.md CHANGED
@@ -250,7 +250,14 @@ You'll still have to fill out the remaining information (like screenshots, app d
250
250
  ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
251
251
 
252
252
  # Need help?
253
- Please submit an issue on GitHub and provide information about your setup
253
+
254
+ Before submitting a new GitHub issue, please make sure to
255
+
256
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
257
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
258
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
259
+
260
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
254
261
 
255
262
  # Code of Conduct
256
263
  Help us keep `produce` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/scan/README.md CHANGED
@@ -211,7 +211,14 @@ For more information visit the [fastlane GitHub page](https://github.com/fastlan
211
211
  ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
212
212
 
213
213
  # Need help?
214
- Please submit an issue on GitHub and provide information about your setup
214
+
215
+ Before submitting a new GitHub issue, please make sure to
216
+
217
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
218
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
219
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
220
+
221
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
215
222
 
216
223
  # Code of Conduct
217
224
  Help us keep `scan` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
@@ -186,7 +186,7 @@ module Scan
186
186
  end
187
187
 
188
188
  def self.min_xcode8?
189
- Helper.xcode_version.split(".").first.to_i >= 8
189
+ Helper.xcode_at_least?("8.0")
190
190
  end
191
191
 
192
192
  def self.detect_destination
data/screengrab/README.md CHANGED
@@ -183,7 +183,14 @@ You can find all the tools on [fastlane.tools](https://fastlane.tools).
183
183
  ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
184
184
 
185
185
  # Need help?
186
- Please submit an issue on GitHub and provide information about your setup.
186
+
187
+ Before submitting a new GitHub issue, please make sure to
188
+
189
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
190
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
191
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
192
+
193
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
187
194
 
188
195
  ## Code of Conduct
189
196
 
data/sigh/README.md CHANGED
@@ -250,7 +250,14 @@ If you also want to create a new App Identifier on the Apple Developer Portal, c
250
250
  `sigh` will never touch or use the profiles which are created and managed by Xcode. Instead `sigh` will manage its own set of provisioning profiles.
251
251
 
252
252
  # Need help?
253
- Please submit an issue on GitHub and provide information about your setup
253
+
254
+ Before submitting a new GitHub issue, please make sure to
255
+
256
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
257
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
258
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
259
+
260
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
254
261
 
255
262
  # Code of Conduct
256
263
  Help us keep `sigh` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
data/snapshot/README.md CHANGED
@@ -394,7 +394,14 @@ When the app dies directly after the application is launched there might be 2 pr
394
394
  To detect the currently used localization in your tests, access the `deviceLanguage` variable from `SnapshotHelper.swift`.
395
395
 
396
396
  # Need help?
397
- Please submit an issue on GitHub and provide information about your setup
397
+
398
+ Before submitting a new GitHub issue, please make sure to
399
+
400
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
401
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
402
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
403
+
404
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
398
405
 
399
406
  # Code of Conduct
400
407
  Help us keep _snapshot_ open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
@@ -49,10 +49,6 @@ module Snapshot
49
49
 
50
50
  Snapshot::DependencyChecker.check_dependencies
51
51
 
52
- def self.xcode_version
53
- `xcodebuild -version`.match(/Xcode (.*)/)[1]
54
- end
55
-
56
52
  def self.min_xcode7?
57
53
  xcode_version.split(".").first.to_i >= 7
58
54
  end
@@ -23,6 +23,9 @@ module Spaceship
23
23
  # The user that is currently logged in
24
24
  attr_accessor :user
25
25
 
26
+ # The email of the user that is currently logged in
27
+ attr_accessor :user_email
28
+
26
29
  # The logger in which all requests are logged
27
30
  # /tmp/spaceship[time]_[pid].log by default
28
31
  attr_accessor :logger
@@ -479,7 +482,13 @@ module Spaceship
479
482
 
480
483
  # Get the `itctx` from the new (22nd May 2017) API endpoint "olympus"
481
484
  def fetch_olympus_session
482
- request(:get, "https://olympus.itunes.apple.com/v1/session")
485
+ response = request(:get, "https://olympus.itunes.apple.com/v1/session")
486
+ if response.body
487
+ user_map = response.body["user"]
488
+ if user_map
489
+ self.user_email = user_map["emailAddress"]
490
+ end
491
+ end
483
492
  end
484
493
 
485
494
  def itc_service_key
@@ -71,18 +71,10 @@ module Spaceship
71
71
  )
72
72
 
73
73
  class << self
74
- # Create a new object based on a hash.
75
- # This is used to create a new object based on the server response.
76
- def factory(attrs)
77
- obj = self.new(attrs)
78
- obj.unfold_associated_groups(attrs['associatedApplicationGroups'])
79
- return obj
80
- end
81
-
82
74
  # @param mac [Bool] Fetches Mac apps if true
83
75
  # @return (Array) Returns all apps available for this account
84
76
  def all(mac: false)
85
- client.apps(mac: mac).map { |app| self.factory(app) }
77
+ client.apps(mac: mac).map { |app| self.new(app) }
86
78
  end
87
79
 
88
80
  # Creates a new App ID on the Apple Dev Portal
@@ -114,10 +106,12 @@ module Spaceship
114
106
  end
115
107
  end
116
108
 
117
- def unfold_associated_groups(attrs)
118
- return unless attrs
119
- unfolded_associated_groups = attrs.map { |info| Spaceship::Portal::AppGroup.new(info) }
120
- instance_variable_set(:@associated_groups, unfolded_associated_groups)
109
+ def associated_groups
110
+ return unless raw_data.key?('associatedApplicationGroups')
111
+
112
+ @associated_groups ||= raw_data['associatedApplicationGroups'].map do |info|
113
+ Spaceship::Portal::AppGroup.new(info)
114
+ end
121
115
  end
122
116
 
123
117
  # Delete this App ID. This action will most likely fail if the App ID is already in the store
@@ -0,0 +1,51 @@
1
+ module Spaceship
2
+ module Portal
3
+ class Invite < PortalBase
4
+ # @return (String) Invite Id
5
+ attr_accessor :invite_id
6
+
7
+ # @return (String) Inviter name
8
+ attr_accessor :inviter_name
9
+
10
+ # @return (String) Recipient Email Address
11
+ attr_accessor :email_address
12
+
13
+ # @return (String) Role (member, admin or agent)
14
+ attr_accessor :type
15
+
16
+ # @return (String) Invite creation date
17
+ attr_accessor :created
18
+
19
+ # @return (String) Invite expiration date
20
+ attr_accessor :expires
21
+
22
+ attr_mapping(
23
+ 'inviteId' => :invite_id,
24
+ 'inviterName' => :inviter_name,
25
+ 'recipientEmail' => :email_address,
26
+ 'recipientRole' => :type,
27
+ 'dateCreated' => :created,
28
+ 'dateExpires' => :expires
29
+ )
30
+
31
+ class << self
32
+ def factory(attrs)
33
+ begin
34
+ attrs['dateCreated'] = Time.at(attrs['dateCreated'] / 1000).utc
35
+ rescue NoMethodError
36
+ # if attrs['dateCreated'] does not implement /
37
+ rescue TypeError
38
+ # if Time.at receives an invalid type
39
+ end
40
+ begin
41
+ attrs['dateExpires'] = Time.at(attrs['dateExpires'] / 1000).utc
42
+ rescue NoMethodError
43
+ rescue TypeError
44
+ end
45
+ attrs['recipientRole'] = attrs['recipientRole'].downcase
46
+ return self.new(attrs)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -42,6 +42,19 @@ module Spaceship
42
42
  def change_role(role)
43
43
  client.team_set_role(team_member_id, role)
44
44
  end
45
+
46
+ class << self
47
+ def factory(attrs)
48
+ begin
49
+ attrs['dateJoined'] = Time.parse(attrs['dateJoined'])
50
+ rescue TypeError
51
+ # Raised if we start getting integer timestamps
52
+ rescue ArgumentError
53
+ # Raised if the string's format can't be parsed
54
+ end
55
+ return self.new(attrs)
56
+ end
57
+ end
45
58
  end
46
59
  end
47
60
  end
@@ -16,6 +16,21 @@ module Spaceship
16
16
  return all_members
17
17
  end
18
18
 
19
+ def invited
20
+ return factory_invite(client.team_invited["invites"])
21
+ end
22
+
23
+ def factory_invite(invitees)
24
+ if invitees.kind_of?(Hash)
25
+ return Spaceship::Portal::Invite.factory(invitees)
26
+ end
27
+ final_invitees = []
28
+ invitees.each do |invitee|
29
+ final_invitees << Spaceship::Portal::Invite.factory(invitee)
30
+ end
31
+ return final_invitees
32
+ end
33
+
19
34
  def factory_member(members, type)
20
35
  if members.kind_of?(Hash)
21
36
  attrs = members
@@ -11,3 +11,4 @@ require 'spaceship/portal/persons'
11
11
  require 'spaceship/portal/person'
12
12
  require 'spaceship/portal/key'
13
13
  require 'spaceship/portal/passbook'
14
+ require 'spaceship/portal/invite'
@@ -324,6 +324,17 @@ module Spaceship
324
324
  parse_response(response)
325
325
  end
326
326
 
327
+ def team_invited
328
+ response = request(:post) do |req|
329
+ req.url "/services-account/#{PROTOCOL_VERSION}/account/getInvites"
330
+ req.body = {
331
+ teamId: team_id
332
+ }.to_json
333
+ req.headers['Content-Type'] = 'application/json'
334
+ end
335
+ parse_response(response)
336
+ end
337
+
327
338
  def team_set_role(team_member_id, role)
328
339
  ensure_csrf(Spaceship::Portal::Persons)
329
340
  response = request(:post) do |req|
@@ -11,35 +11,24 @@ module Spaceship
11
11
  'theWorld' => :include_future_territories
12
12
  )
13
13
 
14
- class << self
15
- # Create a new object based on a hash.
16
- # This is used to create a new object based on the server response.
17
- def factory(attrs)
18
- obj = self.new(attrs)
19
- obj.unfold_territories(attrs['countries'])
20
- return obj
21
- end
22
-
23
- # Create a new object based on a set of territories.
24
- # @param territories (Array of String or Spaceship::Tunes::Territory objects): A list of the territories
25
- # @param params (Hash): Optional parameters (include_future_territories (Bool, default: true) Are future territories included?)
26
- def from_territories(territories = [], params = {})
27
- obj = self.new
28
- # Detect if the territories attribute is an array of Strings and convert to Territories
29
- obj.territories =
30
- if territories[0].kind_of?(String)
31
- territories.map { |territory| Spaceship::Tunes::Territory.from_code(territory) }
32
- else
33
- territories
34
- end
35
- obj.include_future_territories = params.fetch(:include_future_territories, true)
36
- return obj
37
- end
14
+ # Create a new object based on a set of territories.
15
+ # @param territories (Array of String or Spaceship::Tunes::Territory objects): A list of the territories
16
+ # @param params (Hash): Optional parameters (include_future_territories (Bool, default: true) Are future territories included?)
17
+ def self.from_territories(territories = [], params = {})
18
+ obj = self.new
19
+ # Detect if the territories attribute is an array of Strings and convert to Territories
20
+ obj.territories =
21
+ if territories[0].kind_of?(String)
22
+ territories.map { |territory| Spaceship::Tunes::Territory.from_code(territory) }
23
+ else
24
+ territories
25
+ end
26
+ obj.include_future_territories = params.fetch(:include_future_territories, true)
27
+ return obj
38
28
  end
39
29
 
40
- def unfold_territories(attrs)
41
- unfolded_territories = attrs.map { |info| Territory.new(info) }
42
- instance_variable_set(:@territories, unfolded_territories)
30
+ def territories
31
+ @territories ||= raw_data['countries'].map { |info| Territory.new(info) }
43
32
  end
44
33
  end
45
34
  end
@@ -15,20 +15,8 @@ module Spaceship
15
15
  "tierName" => :tier_name
16
16
  )
17
17
 
18
- class << self
19
- # Create a new object based on a hash.
20
- # This is used to create a new object based on the server response.
21
- def factory(attrs)
22
- obj = self.new(attrs)
23
- obj.unfold_pricing_info(attrs["pricingInfo"])
24
-
25
- return obj
26
- end
27
- end
28
-
29
- def unfold_pricing_info(attrs)
30
- unfolded_pricing_info = attrs.map { |info| IAPSubscriptionPricingInfo.new(info) }
31
- instance_variable_set(:@pricing_info, unfolded_pricing_info)
18
+ def pricing_info
19
+ @pricing_info ||= raw_data['pricingInfo'].map { |info| IAPSubscriptionPricingInfo.new(info) }
32
20
  end
33
21
  end
34
22
 
@@ -15,20 +15,8 @@ module Spaceship
15
15
  'tierName' => :tier_name
16
16
  )
17
17
 
18
- class << self
19
- # Create a new object based on a hash.
20
- # This is used to create a new object based on the server response.
21
- def factory(attrs)
22
- obj = self.new(attrs)
23
- obj.unfold_pricing_info(attrs['pricingInfo'])
24
-
25
- return obj
26
- end
27
- end
28
-
29
- def unfold_pricing_info(attrs)
30
- unfolded_pricing_info = attrs.map { |info| PricingInfo.new(info) }
31
- instance_variable_set(:@pricing_info, unfolded_pricing_info)
18
+ def pricing_info
19
+ @pricing_info ||= raw_data['pricingInfo'].map { |info| PricingInfo.new(info) }
32
20
  end
33
21
  end
34
22
 
data/supply/README.md CHANGED
@@ -210,7 +210,14 @@ Before performing a new APK upload you may want to check existing track version
210
210
  ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
211
211
 
212
212
  # Need help?
213
- Please submit an issue on GitHub and provide information about your setup
213
+
214
+ Before submitting a new GitHub issue, please make sure to
215
+
216
+ - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
217
+ - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
218
+ - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
219
+
220
+ If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
214
221
 
215
222
  # Code of Conduct
216
223
  Help us keep `supply` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.0.beta.20170808010002
4
+ version: 2.52.0.beta.20170809010003
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-08-08 00:00:00.000000000 Z
18
+ date: 2017-08-09 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1315,6 +1315,7 @@ files:
1315
1315
  - spaceship/lib/spaceship/portal/app_service.rb
1316
1316
  - spaceship/lib/spaceship/portal/certificate.rb
1317
1317
  - spaceship/lib/spaceship/portal/device.rb
1318
+ - spaceship/lib/spaceship/portal/invite.rb
1318
1319
  - spaceship/lib/spaceship/portal/key.rb
1319
1320
  - spaceship/lib/spaceship/portal/passbook.rb
1320
1321
  - spaceship/lib/spaceship/portal/person.rb