fastlane 2.56.0.beta.20170905010003 → 2.56.0.beta.20170906010003

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: be675133e059a8951b116bdbcb5bf5dcd3ff51b7
4
- data.tar.gz: 5a80c306bb75691b09d4599bcfec14c87e7ae7dc
3
+ metadata.gz: d3e157dca28a3b9c7a49e4c94c338f8c6b210e61
4
+ data.tar.gz: b7e89f5124eb919234a0ad8b9d0eaaea91dcc975
5
5
  SHA512:
6
- metadata.gz: d2447ac38393bfb769e82a695c253dd886001b56bb11591752099fad29fdde0a87ede2131b6aec9e17f03f13785da52a4525dbd5d2e6ba862b1e33f9dd1a71a5
7
- data.tar.gz: 1e02b74159d420a1dd7cb306fa14c1ff091af63708fc612f91b3db07ebb316fb844ac27a0666dbcff893e8d3d626d7a9a0f4b2cf340edab431d9ac26e21af313
6
+ metadata.gz: 6950954874037a6d52fcfd0beac4f2081e0b56318b3bc82364ed15aa55ab95d198ccbcfc52a0dd6ef8555066b3292f11686b7145e6f3f50ed18b00955e0438e1
7
+ data.tar.gz: f00d313ffe489c08e0c17666bd566f80c1c5711795e666fa57f9c72c1db6b04ec0c73e6a6311dabef4ab4f2395109668483bb5d2f3fe66d6c26bd1ee3d8e821c
@@ -46,6 +46,7 @@ module Fastlane
46
46
  end
47
47
 
48
48
  connection.post do |req|
49
+ req.options.timeout = options.delete(:timeout)
49
50
  if options[:public_identifier].nil?
50
51
  req.url("/api/2/apps/upload")
51
52
  else
@@ -100,6 +101,7 @@ module Fastlane
100
101
  end
101
102
 
102
103
  connection.put do |req|
104
+ req.options.timeout = options.delete(:timeout)
103
105
  req.url("/api/2/apps/#{app_id}/app_versions/#{app_version_id}")
104
106
  req.headers['X-HockeyAppToken'] = api_token
105
107
  req.body = options
@@ -301,6 +303,11 @@ module Fastlane
301
303
  verify_block: proc do |value|
302
304
  UI.user_error!("Invalid value '#{value}' for key 'strategy'. Allowed values are 'add', 'replace'.") unless ['add', 'replace'].include?(value)
303
305
  end),
306
+ FastlaneCore::ConfigItem.new(key: :timeout,
307
+ env_name: "FL_HOCKEY_TIMEOUT",
308
+ description: "Request timeout in seconds",
309
+ is_string: false,
310
+ optional: true),
304
311
  FastlaneCore::ConfigItem.new(key: :bypass_cdn,
305
312
  env_name: "FL_HOCKEY_BYPASS_CDN",
306
313
  description: "Flag to bypass Hockey CDN when it uploads successfully but reports error",
@@ -59,7 +59,7 @@ module Fastlane
59
59
  end
60
60
 
61
61
  def self.is_supported?(platform)
62
- true
62
+ [:ios].include?(platform)
63
63
  end
64
64
  end
65
65
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.56.0.beta.20170905010003'.freeze
2
+ VERSION = '2.56.0.beta.20170906010003'.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
@@ -23,6 +23,10 @@ module Spaceship
23
23
  def create!(firstname: nil, lastname: nil, email_address: nil, roles: [], apps: [])
24
24
  client.create_member!(firstname: firstname, lastname: lastname, email_address: email_address, roles: roles, apps: apps)
25
25
  end
26
+
27
+ def update_member_roles!(member, roles: [], apps: [])
28
+ client.update_member_roles!(member, roles: roles, apps: apps)
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -416,6 +416,37 @@ module Spaceship
416
416
  handle_itc_response(r.body)
417
417
  end
418
418
 
419
+ def update_member_roles!(member, roles: [], apps: [])
420
+ r = request(:get, "ra/users/itc/#{member.user_id}/roles")
421
+ data = parse_response(r, 'data')
422
+
423
+ roles << "admin" if roles.length == 0
424
+
425
+ data["user"]["roles"] = []
426
+ roles.each do |role|
427
+ # find role from template
428
+ data["roles"].each do |template_role|
429
+ if template_role["value"]["name"] == role
430
+ data["user"]["roles"] << template_role
431
+ end
432
+ end
433
+ end
434
+
435
+ if apps.length == 0
436
+ data["user"]["userSoftwares"] = { value: { grantAllSoftware: true, grantedSoftwareAdamIds: [] } }
437
+ else
438
+ data["user"]["userSoftwares"] = { value: { grantAllSoftware: false, grantedSoftwareAdamIds: apps } }
439
+ end
440
+
441
+ # send the changes back to Apple
442
+ r = request(:post) do |req|
443
+ req.url "ra/users/itc/#{member.user_id}/roles"
444
+ req.body = data.to_json
445
+ req.headers['Content-Type'] = 'application/json'
446
+ end
447
+ handle_itc_response(r.body)
448
+ end
449
+
419
450
  #####################################################
420
451
  # @!group Pricing
421
452
  #####################################################
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.56.0.beta.20170905010003
4
+ version: 2.56.0.beta.20170906010003
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-09-05 00:00:00.000000000 Z
18
+ date: 2017-09-06 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier