fastlane 2.126.0.beta.20190623200100 → 2.126.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +76 -76
  3. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  4. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  5. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -2
  6. data/fastlane/lib/fastlane/actions/oclint.rb +9 -2
  7. data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +34 -27
  8. data/fastlane/lib/fastlane/lane_manager_base.rb +4 -1
  9. data/fastlane/lib/fastlane/version.rb +1 -1
  10. data/fastlane/swift/Deliverfile.swift +1 -1
  11. data/fastlane/swift/DeliverfileProtocol.swift +3 -1
  12. data/fastlane/swift/Fastlane.swift +19 -5
  13. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  14. data/fastlane/swift/Gymfile.swift +1 -1
  15. data/fastlane/swift/Matchfile.swift +1 -1
  16. data/fastlane/swift/Precheckfile.swift +1 -1
  17. data/fastlane/swift/Scanfile.swift +1 -1
  18. data/fastlane/swift/ScanfileProtocol.swift +3 -1
  19. data/fastlane/swift/Screengrabfile.swift +1 -1
  20. data/fastlane/swift/Snapshotfile.swift +1 -1
  21. data/fastlane_core/lib/fastlane_core/.build_watcher.rb.swp +0 -0
  22. data/fastlane_core/lib/fastlane_core/build_watcher.rb +2 -2
  23. data/pilot/lib/pilot/.build_manager.rb.swp +0 -0
  24. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  25. data/pilot/lib/pilot/.tester_manager.rb.swp +0 -0
  26. data/pilot/lib/pilot/build_manager.rb +9 -14
  27. data/pilot/lib/pilot/manager.rb +2 -2
  28. data/pilot/lib/pilot/tester_exporter.rb +3 -3
  29. data/pilot/lib/pilot/tester_manager.rb +2 -2
  30. data/scan/lib/scan/options.rb +7 -1
  31. data/scan/lib/scan/test_command_generator.rb +1 -1
  32. data/snapshot/lib/assets/SnapshotHelper.swift +10 -4
  33. data/spaceship/lib/spaceship/connect_api.rb +42 -0
  34. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
  35. data/spaceship/lib/spaceship/connect_api/client.rb +178 -0
  36. data/spaceship/lib/spaceship/connect_api/model.rb +1 -15
  37. data/spaceship/lib/spaceship/connect_api/models/app.rb +97 -0
  38. data/spaceship/lib/spaceship/connect_api/models/beta_app_localization.rb +28 -0
  39. data/spaceship/lib/spaceship/connect_api/models/beta_app_review_detail.rb +32 -0
  40. data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +26 -0
  41. data/spaceship/lib/spaceship/connect_api/models/beta_build_localization.rb +20 -0
  42. data/spaceship/lib/spaceship/connect_api/models/beta_build_metric.rb +24 -0
  43. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +41 -0
  44. data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +56 -0
  45. data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +43 -0
  46. data/spaceship/lib/spaceship/connect_api/models/build.rb +144 -0
  47. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +56 -0
  48. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +36 -0
  49. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +46 -0
  50. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +37 -0
  51. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +48 -0
  52. data/spaceship/lib/spaceship/connect_api/models/device.rb +53 -0
  53. data/spaceship/lib/spaceship/connect_api/models/pre_release_version.rb +20 -0
  54. data/spaceship/lib/spaceship/connect_api/models/profile.rb +60 -0
  55. data/spaceship/lib/spaceship/connect_api/models/user.rb +50 -0
  56. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +59 -0
  57. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +48 -0
  58. data/spaceship/lib/spaceship/connect_api/response.rb +1 -1
  59. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +18 -538
  60. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +314 -19
  61. data/spaceship/lib/spaceship/connect_api/token.rb +13 -1
  62. data/spaceship/lib/spaceship/connect_api/users/client.rb +33 -0
  63. data/spaceship/lib/spaceship/connect_api/users/users.rb +16 -0
  64. data/spaceship/lib/spaceship/test_flight/build.rb +2 -2
  65. data/spaceship/lib/spaceship/test_flight/build_trains.rb +5 -56
  66. metadata +64 -48
  67. data/spaceship/lib/spaceship/connect_api/testflight/base.rb +0 -41
  68. data/spaceship/lib/spaceship/connect_api/testflight/models/app.rb +0 -99
  69. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_app_localization.rb +0 -30
  70. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_app_review_detail.rb +0 -34
  71. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_app_review_submission.rb +0 -28
  72. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_build_localization.rb +0 -22
  73. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_build_metric.rb +0 -26
  74. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_group.rb +0 -43
  75. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb +0 -58
  76. data/spaceship/lib/spaceship/connect_api/testflight/models/beta_tester_metric.rb +0 -45
  77. data/spaceship/lib/spaceship/connect_api/testflight/models/build.rb +0 -146
  78. data/spaceship/lib/spaceship/connect_api/testflight/models/build_beta_detail.rb +0 -58
  79. data/spaceship/lib/spaceship/connect_api/testflight/models/build_delivery.rb +0 -38
  80. data/spaceship/lib/spaceship/connect_api/testflight/models/pre_release_version.rb +0 -22
  81. data/spaceship/lib/spaceship/connect_api/testflight/models/user.rb +0 -52
@@ -0,0 +1,56 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BuildBetaDetail
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :auto_notify_enabled
8
+ attr_accessor :did_notify
9
+ attr_accessor :internal_build_state
10
+ attr_accessor :external_build_state
11
+
12
+ module InternalState
13
+ PROCESSING_EXCEPTION = "PROCESSING_EXCEPTION"
14
+ MISSING_EXPORT_COMPLIANCE = "MISSING_EXPORT_COMPLIANCE"
15
+ READY_FOR_BETA_TESTING = "READY_FOR_BETA_TESTING"
16
+ IN_BETA_TESTING = "IN_BETA_TESTING"
17
+ EXPIRED = "EXPIRED"
18
+ IN_EXPORT_COMPLIANCE_REVIEW = "IN_EXPORT_COMPLIANCE_REVIEW"
19
+ end
20
+
21
+ module ExternalState
22
+ PROCESSING = "PROCESSING"
23
+ PROCESSING_EXCEPTION = "PROCESSING_EXCEPTION"
24
+ MISSING_EXPORT_COMPLIANCE = "MISSING_EXPORT_COMPLIANCE"
25
+ READY_FOR_BETA_TESTING = "READY_FOR_BETA_TESTING"
26
+ IN_BETA_TESTING = "IN_BETA_TESTING"
27
+ EXPIRED = "EXPIRED"
28
+ READY_FOR_BETA_SUBMISSION = "READY_FOR_BETA_SUBMISSION"
29
+ IN_EXPORT_COMPLIANCE_REVIEW = "IN_EXPORT_COMPLIANCE_REVIEW"
30
+ WAITING_FOR_BETA_REVIEW = "WAITING_FOR_BETA_REVIEW"
31
+ IN_BETA_REVIEW = "IN_BETA_REVIEW"
32
+ BETA_REJECTED = "BETA_REJECTED"
33
+ BETA_APPROVED = "BETA_APPROVED"
34
+ end
35
+
36
+ attr_mapping({
37
+ "autoNotifyEnabled" => "auto_notify_enabled",
38
+ "didNotify" => "did_notify",
39
+ "internalBuildState" => "internal_build_state",
40
+ "externalBuildState" => "external_build_state"
41
+ })
42
+
43
+ def self.type
44
+ return "buildBetaDetails"
45
+ end
46
+
47
+ #
48
+ # Helpers
49
+ #
50
+
51
+ def ready_for_beta_submission?
52
+ return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,36 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BuildDelivery
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :cf_build_version
8
+ attr_accessor :cf_build_short_version_string
9
+ attr_accessor :platform
10
+ attr_accessor :uploaded_date
11
+
12
+ attr_mapping({
13
+ "cfBundleVersion" => "cf_build_version",
14
+ "cfBundleShortVersionString" => "cf_build_short_version_string",
15
+ "platform" => "platform",
16
+ "uploadedDate" => "uploaded_date"
17
+ })
18
+
19
+ def self.type
20
+ return "buildDeliveries"
21
+ end
22
+
23
+ #
24
+ # API
25
+ #
26
+
27
+ def self.all(app_id: nil, version: nil, build_number: nil)
28
+ resps = Spaceship::ConnectAPI.get_build_deliveries(
29
+ filter: { app: app_id, cfBundleShortVersionString: version, cfBundleVersion: build_number },
30
+ limit: 1
31
+ ).all_pages
32
+ return resps.map(&:to_models).flatten
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,46 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BundleId
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :identifier
8
+ attr_accessor :name
9
+ attr_accessor :seed_id
10
+ attr_accessor :platform
11
+
12
+ attr_accessor :bundle_id_capabilities
13
+
14
+ attr_mapping({
15
+ "identifier" => "identifier",
16
+ "name" => "name",
17
+ "seedId" => "seed_id",
18
+ "platform" => "platform",
19
+
20
+ "bundleIdCapabilities" => 'bundle_id_capabilities'
21
+ })
22
+
23
+ module Platform
24
+ IOS = "IOS"
25
+ MAC_OS = "MAC_OS"
26
+ end
27
+
28
+ def self.type
29
+ return "bundleIds"
30
+ end
31
+
32
+ #
33
+ # API
34
+ #
35
+
36
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
37
+ resps = Spaceship::ConnectAPI.get_bundle_ids(filter: filter, includes: includes).all_pages
38
+ return resps.map(&:to_models).flatten
39
+ end
40
+
41
+ def self.get(bundle_id_id: nil, includes: nil)
42
+ return Spaceship::ConnectAPI.get_bundle_id(bundle_id_id: bundle_id_id, includes: includes).first
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,37 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BundleIdCapability
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :capabilityType
8
+ attr_accessor :bundleIdCapabilitiesSettingOption
9
+
10
+ attr_mapping({
11
+ "capabilityType" => "capabilityType",
12
+ "settings" => "email"
13
+ })
14
+
15
+ module Platform
16
+ IOS = "IOS"
17
+ MAC_OS = "MAC_OS"
18
+ end
19
+
20
+ def self.type
21
+ return "bundleIdCapabilities"
22
+ end
23
+
24
+ #
25
+ # API
26
+ #
27
+
28
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
29
+ return users_client.get_users(filter: filter, includes: includes)
30
+ end
31
+
32
+ def self.find(email: nil, includes: nil)
33
+ return all(filter: { email: email }, includes: includes)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,48 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class Certificate
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :certificate_content
8
+ attr_accessor :display_name
9
+ attr_accessor :name
10
+ attr_accessor :platform
11
+ attr_accessor :serial_number
12
+ attr_accessor :certificate_type
13
+
14
+ attr_mapping({
15
+ "certificateContent" => "certificate_content",
16
+ "displayName" => "display_name",
17
+ "expirationDate" => "expiration_date",
18
+ "name" => "name",
19
+ "platform" => "platform",
20
+ "serialNumber" => "serial_number",
21
+ "certificateType" => "certificate_type"
22
+ })
23
+
24
+ module CertificateType
25
+ IOS_DEVELOPMENT = "IOS_DEVELOPMENT"
26
+ IOS_DISTRIBUTION = "IOS_DISTRIBUTION"
27
+ MAC_APP_DISTRIBUTION = "MAC_APP_DISTRIBUTION"
28
+ MAC_INSTALLER_DISTRIBUTION = "MAC_INSTALLER_DISTRIBUTION"
29
+ MAC_APP_DEVELOPMENT = "MAC_APP_DEVELOPMENT"
30
+ DEVELOPER_ID_KEXT = "DEVELOPER_ID_KEXT"
31
+ DEVELOPER_ID_APPLICATION = "DEVELOPER_ID_APPLICATION"
32
+ end
33
+
34
+ def self.type
35
+ return "certificates"
36
+ end
37
+
38
+ #
39
+ # API
40
+ #
41
+
42
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
43
+ resps = Spaceship::ConnectAPI.get_certificates(filter: filter, includes: includes).all_pages
44
+ return resps.map(&:to_models).flatten
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,53 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class Device
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :device_class
8
+ attr_accessor :model
9
+ attr_accessor :name
10
+ attr_accessor :platform
11
+ attr_accessor :status
12
+ attr_accessor :udid
13
+ attr_accessor :added_date
14
+
15
+ attr_mapping({
16
+ "deviceClass" => "device_class",
17
+ "model" => "model",
18
+ "name" => "name",
19
+ "platform" => "platform",
20
+ "status" => "status",
21
+ "udid" => "udid",
22
+ "addedDate" => "added_date"
23
+ })
24
+
25
+ module DeviceClass
26
+ APPLE_WATCH = "APPLE_WATCH"
27
+ IPAD = "IPAD"
28
+ IPHONE = "IPHONE"
29
+ IPOD = "IPOD"
30
+ APPLE_TV = "APPLE_TV"
31
+ MAC = "MAC"
32
+ end
33
+
34
+ module Status
35
+ ENABLED = "ENABLED"
36
+ DISABLED = "DISABLED"
37
+ end
38
+
39
+ def self.type
40
+ return "devices"
41
+ end
42
+
43
+ #
44
+ # API
45
+ #
46
+
47
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
48
+ resps = Spaceship::ConnectAPI.get_devices(filter: filter, includes: includes).all_pages
49
+ return resps.map(&:to_models).flatten
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,20 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class PreReleaseVersion
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :version
8
+ attr_accessor :platform
9
+
10
+ attr_mapping({
11
+ "version" => "version",
12
+ "platform" => "platform"
13
+ })
14
+
15
+ def self.type
16
+ return "preReleaseVersions"
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,60 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class Profile
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :name
8
+ attr_accessor :platform
9
+ attr_accessor :profile_content
10
+ attr_accessor :uuid
11
+ attr_accessor :created_date
12
+ attr_accessor :profile_state
13
+ attr_accessor :profile_type
14
+ attr_accessor :expiration_date
15
+
16
+ attr_mapping({
17
+ "name" => "name",
18
+ "platform" => "platform",
19
+ "profileContent" => "profile_content",
20
+ "uuid" => "uuid",
21
+ "createdDate" => "created_date",
22
+ "profileState" => "profile_state",
23
+ "profileType" => "profile_type",
24
+ "expirationDate" => "expiration_date"
25
+ })
26
+
27
+ module ProfileState
28
+ ACTIVE = "ACTIVE"
29
+ INVALID = "INVALID"
30
+ end
31
+
32
+ module ProfileType
33
+ IOS_APP_DEVELOPMENT = "IOS_APP_DEVELOPMENT"
34
+ IOS_APP_STORE = "IOS_APP_STORE"
35
+ IOS_APP_ADHOC = "IOS_APP_ADHOC"
36
+ IOS_APP_INHOUSE = "IOS_APP_INHOUSE"
37
+ MAC_APP_DEVELOPMENT = "MAC_APP_DEVELOPMENT"
38
+ MAC_APP_STORE = "MAC_APP_STORE"
39
+ MAC_APP_DIRECT = "MAC_APP_DIRECT"
40
+ TVOS_APP_DEVELOPMENT = "TVOS_APP_DEVELOPMENT"
41
+ TVOS_APP_STORE = "TVOS_APP_STORE"
42
+ TVOS_APP_ADHOC = "TVOS_APP_ADHOC"
43
+ TVOS_APP_INHOUSE = "TVOS_APP_INHOUSE"
44
+ end
45
+
46
+ def self.type
47
+ return "profiles"
48
+ end
49
+
50
+ #
51
+ # API
52
+ #
53
+
54
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
55
+ resps = Spaceship::ConnectAPI.get_profiles(filter: filter, includes: includes).all_pages
56
+ return resps.map(&:to_models).flatten
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,50 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class User
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :username
8
+ attr_accessor :first_name
9
+ attr_accessor :last_name
10
+ attr_accessor :email
11
+ attr_accessor :preferred_currency_territory
12
+ attr_accessor :agreed_to_terms
13
+ attr_accessor :roles
14
+ attr_accessor :all_apps_visible
15
+ attr_accessor :provisioning_allowed
16
+ attr_accessor :email_vetting_required
17
+ attr_accessor :notifications
18
+
19
+ attr_mapping({
20
+ "username" => "username",
21
+ "firstName" => "first_name",
22
+ "lastName" => "last_name",
23
+ "email" => "email",
24
+ "preferredCurrencyTerritory" => "preferred_currency_territory",
25
+ "agreedToTerms" => "agreed_to_terms",
26
+ "roles" => "roles",
27
+ "allAppsVisible" => "all_apps_visible",
28
+ "provisioningAllowed" => "provisioning_allowed",
29
+ "emailVettingRequired" => "email_vetting_required",
30
+ "notifications" => "notifications"
31
+ })
32
+
33
+ def self.type
34
+ return "users"
35
+ end
36
+
37
+ #
38
+ # API
39
+ #
40
+
41
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
42
+ return Spaceship::ConnectAPI.get_users(filter: filter, includes: includes)
43
+ end
44
+
45
+ def self.find(email: nil, includes: nil)
46
+ return all(filter: { email: email }, includes: includes)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,59 @@
1
+ require_relative '../client'
2
+ require_relative '../../portal/portal_client'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ module Provisioning
7
+ class Client < Spaceship::ConnectAPI::Client
8
+ def self.instance
9
+ # Verify there is a token or a client that can be used
10
+ if Spaceship::ConnectAPI.token
11
+ if @client.nil? || @client.token != Spaceship::ConnectAPI.token
12
+ @client = Spaceship::ConnectAPI::Provisioning::Client.new(token: Spaceship::ConnectAPI.token)
13
+ end
14
+ elsif Spaceship::Portal.client
15
+ # Initialize new client if new or if team changed
16
+ if @client.nil? || @client.team_id != Spaceship::Portal.client.team_id
17
+ @client = Spaceship::ConnectAPI::Provisioning::Client.client_with_authorization_from(Spaceship::Portal.client)
18
+ end
19
+ end
20
+
21
+ # Need to handle not having a client but this shouldn't ever happen
22
+ raise "Please login using `Spaceship::Portal.login('user', 'password')`" unless @client
23
+
24
+ @client
25
+ end
26
+
27
+ def self.hostname
28
+ 'https://developer.apple.com/services-account/v1/'
29
+ end
30
+
31
+ #
32
+ # Helpers
33
+ #
34
+
35
+ def get(url_or_path, params = nil)
36
+ # The App Store Connect API is only available in a web session through a
37
+ # a proxy server where GET requests are actually sent as a POST
38
+ return get_as_post(url_or_path, params) if web_session?
39
+
40
+ super(url_or_path, params)
41
+ end
42
+
43
+ def get_as_post(url_or_path, params = nil)
44
+ encoded_params = Faraday::NestedParamsEncoder.encode(params)
45
+ body = { "urlEncodedQueryParams" => encoded_params, "teamId" => team_id }
46
+
47
+ response = request(:post) do |req|
48
+ req.url(url_or_path)
49
+ req.body = body.to_json
50
+ req.headers['Content-Type'] = 'application/vnd.api+json'
51
+ req.headers['X-HTTP-Method-Override'] = 'GET'
52
+ req.headers['X-Requested-With'] = 'XMLHttpRequest'
53
+ end
54
+ handle_response(response)
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end