fastlane 2.165.0 → 2.170.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +76 -76
- data/cert/lib/cert/options.rb +3 -3
- data/cert/lib/cert/runner.rb +1 -1
- data/deliver/lib/deliver/app_screenshot.rb +6 -2
- data/deliver/lib/deliver/loader.rb +136 -18
- data/deliver/lib/deliver/upload_metadata.rb +4 -10
- data/deliver/lib/deliver/upload_screenshots.rb +1 -64
- data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +9 -2
- data/fastlane/lib/fastlane/actions/appledoc.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +4 -0
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +13 -3
- data/fastlane/lib/fastlane/actions/slather.rb +2 -2
- data/fastlane/lib/fastlane/actions/spm.rb +6 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +29 -8
- data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +289 -0
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +3 -3
- data/fastlane/lib/fastlane/actions/xcode_install.rb +8 -5
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +2 -2
- data/fastlane/lib/fastlane/features.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +97 -26
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +5 -1
- data/fastlane/swift/LaneFileProtocol.swift +2 -2
- data/fastlane/swift/MainProcess.swift +2 -0
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +3 -3
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Runner.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +9 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/SocketClient.swift +1 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +12 -7
- data/fastlane_core/lib/fastlane_core/helper.rb +10 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -3
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +3 -1
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +8 -0
- data/gym/lib/gym/code_signing_mapping.rb +1 -1
- data/gym/lib/gym/generators/build_command_generator.rb +1 -0
- data/gym/lib/gym/options.rb +7 -1
- data/match/lib/match/module.rb +1 -1
- data/match/lib/match/nuke.rb +9 -5
- data/match/lib/match/options.rb +1 -1
- data/match/lib/match/runner.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +9 -3
- data/scan/lib/scan/detect_values.rb +3 -1
- data/scan/lib/scan/module.rb +4 -0
- data/scan/lib/scan/options.rb +16 -1
- data/scan/lib/scan/runner.rb +2 -2
- data/scan/lib/scan/test_command_generator.rb +1 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +5 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +1 -1
- data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +14 -0
- data/spaceship/lib/spaceship/connect_api.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/.app_data_usage_data_protection.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/app.rb +88 -54
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_category.rb +65 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_data_protection.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_grouping.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_purposes.rb +37 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usages_publish_state.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +16 -10
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +8 -4
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +15 -11
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +13 -9
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +9 -7
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +15 -11
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +7 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +55 -36
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +21 -14
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +12 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/build.rb +24 -16
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/device.rb +10 -4
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/user.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +103 -0
- data/spaceship/lib/spaceship/errors.rb +19 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +18 -6
- data/supply/lib/supply.rb +1 -1
- data/supply/lib/supply/options.rb +1 -1
- data/supply/lib/supply/uploader.rb +3 -2
- metadata +26 -18
@@ -63,12 +63,14 @@ module Spaceship
|
|
63
63
|
# API
|
64
64
|
#
|
65
65
|
|
66
|
-
def self.all(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
|
67
|
-
|
66
|
+
def self.all(client: nil, filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
|
67
|
+
client ||= Spaceship::ConnectAPI
|
68
|
+
return client.get_beta_feedback(filter: filter, includes: includes, limit: limit, sort: sort)
|
68
69
|
end
|
69
70
|
|
70
|
-
def delete!
|
71
|
-
|
71
|
+
def delete!(client: nil)
|
72
|
+
client ||= Spaceship::ConnectAPI
|
73
|
+
return client.delete_beta_feedback(feedback_id: self.id)
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
@@ -33,8 +33,18 @@ module Spaceship
|
|
33
33
|
#
|
34
34
|
|
35
35
|
# beta_testers - [{email: "", firstName: "", lastName: ""}]
|
36
|
-
def post_bulk_beta_tester_assignments(beta_testers: nil)
|
37
|
-
|
36
|
+
def post_bulk_beta_tester_assignments(client: nil, beta_testers: nil)
|
37
|
+
client ||= Spaceship::ConnectAPI
|
38
|
+
return client.post_bulk_beta_tester_assignments(beta_group_id: id, beta_testers: beta_testers)
|
39
|
+
end
|
40
|
+
|
41
|
+
def delete!
|
42
|
+
return Spaceship::ConnectAPI.delete_beta_group(group_id: id)
|
43
|
+
end
|
44
|
+
|
45
|
+
def fetch_builds
|
46
|
+
resps = Spaceship::ConnectAPI.get_builds_for_beta_group(group_id: id).all_pages
|
47
|
+
return resps.flat_map(&:to_models)
|
38
48
|
end
|
39
49
|
end
|
40
50
|
end
|
@@ -34,23 +34,27 @@ module Spaceship
|
|
34
34
|
# API
|
35
35
|
#
|
36
36
|
|
37
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
38
|
-
|
37
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
38
|
+
client ||= Spaceship::ConnectAPI
|
39
|
+
resps = client.get_beta_testers(filter: filter, includes: includes).all_pages
|
39
40
|
return resps.flat_map(&:to_models)
|
40
41
|
end
|
41
42
|
|
42
|
-
def self.find(email: nil, includes: nil)
|
43
|
-
|
43
|
+
def self.find(client: nil, email: nil, includes: nil)
|
44
|
+
client ||= Spaceship::ConnectAPI
|
45
|
+
return all(client: client, filter: { email: email }, includes: includes).first
|
44
46
|
end
|
45
47
|
|
46
|
-
def delete_from_apps(apps: nil)
|
48
|
+
def delete_from_apps(client: nil, apps: nil)
|
49
|
+
client ||= Spaceship::ConnectAPI
|
47
50
|
app_ids = apps.map(&:id)
|
48
|
-
return
|
51
|
+
return client.delete_beta_tester_from_apps(beta_tester_id: id, app_ids: app_ids)
|
49
52
|
end
|
50
53
|
|
51
|
-
def delete_from_beta_groups(beta_groups: nil)
|
54
|
+
def delete_from_beta_groups(client: nil, beta_groups: nil)
|
55
|
+
client ||= Spaceship::ConnectAPI
|
52
56
|
beta_group_ids = beta_groups.map(&:id)
|
53
|
-
return
|
57
|
+
return client.delete_beta_tester_from_beta_groups(beta_tester_id: id, beta_group_ids: beta_group_ids)
|
54
58
|
end
|
55
59
|
end
|
56
60
|
end
|
@@ -106,8 +106,9 @@ module Spaceship
|
|
106
106
|
# API
|
107
107
|
#
|
108
108
|
|
109
|
-
def self.all(app_id: nil, version: nil, build_number: nil, platform: nil, processing_states: "PROCESSING,FAILED,INVALID,VALID", includes: ESSENTIAL_INCLUDES, sort: "-uploadedDate", limit: 30)
|
110
|
-
|
109
|
+
def self.all(client: nil, app_id: nil, version: nil, build_number: nil, platform: nil, processing_states: "PROCESSING,FAILED,INVALID,VALID", includes: ESSENTIAL_INCLUDES, sort: "-uploadedDate", limit: 30)
|
110
|
+
client ||= Spaceship::ConnectAPI
|
111
|
+
resps = client.get_builds(
|
111
112
|
filter: { app: app_id, "preReleaseVersion.version" => version, version: build_number, processingState: processing_states },
|
112
113
|
includes: includes,
|
113
114
|
sort: sort,
|
@@ -125,23 +126,27 @@ module Spaceship
|
|
125
126
|
return models
|
126
127
|
end
|
127
128
|
|
128
|
-
def self.get(build_id: nil, includes: ESSENTIAL_INCLUDES)
|
129
|
-
|
129
|
+
def self.get(client: nil, build_id: nil, includes: ESSENTIAL_INCLUDES)
|
130
|
+
client ||= Spaceship::ConnectAPI
|
131
|
+
return client.get_build(build_id: build_id, includes: includes).first
|
130
132
|
end
|
131
133
|
|
132
|
-
def update(attributes: nil)
|
134
|
+
def update(client: nil, attributes: nil)
|
135
|
+
client ||= Spaceship::ConnectAPI
|
133
136
|
attributes = reverse_attr_mapping(attributes)
|
134
|
-
return
|
137
|
+
return client.patch_builds(build_id: id, attributes: attributes).first
|
135
138
|
end
|
136
139
|
|
137
|
-
def add_beta_groups(beta_groups: nil)
|
140
|
+
def add_beta_groups(client: nil, beta_groups: nil)
|
141
|
+
client ||= Spaceship::ConnectAPI
|
138
142
|
beta_groups ||= []
|
139
143
|
beta_group_ids = beta_groups.map(&:id)
|
140
|
-
return
|
144
|
+
return client.add_beta_groups_to_build(build_id: id, beta_group_ids: beta_group_ids)
|
141
145
|
end
|
142
146
|
|
143
|
-
def get_beta_build_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
144
|
-
|
147
|
+
def get_beta_build_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
148
|
+
client ||= Spaceship::ConnectAPI
|
149
|
+
resps = client.get_beta_build_localizations(
|
145
150
|
filter: { build: id },
|
146
151
|
includes: includes,
|
147
152
|
sort: sort,
|
@@ -150,8 +155,9 @@ module Spaceship
|
|
150
155
|
return resps.flat_map(&:to_models)
|
151
156
|
end
|
152
157
|
|
153
|
-
def get_build_beta_details(filter: {}, includes: nil, limit: nil, sort: nil)
|
154
|
-
|
158
|
+
def get_build_beta_details(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
159
|
+
client ||= Spaceship::ConnectAPI
|
160
|
+
resps = client.get_build_beta_details(
|
155
161
|
filter: { build: id },
|
156
162
|
includes: includes,
|
157
163
|
sort: sort,
|
@@ -160,12 +166,14 @@ module Spaceship
|
|
160
166
|
return resps.flat_map(&:to_models)
|
161
167
|
end
|
162
168
|
|
163
|
-
def post_beta_app_review_submission
|
164
|
-
|
169
|
+
def post_beta_app_review_submission(client: nil)
|
170
|
+
client ||= Spaceship::ConnectAPI
|
171
|
+
return client.post_beta_app_review_submissions(build_id: id)
|
165
172
|
end
|
166
173
|
|
167
|
-
def expire!
|
168
|
-
|
174
|
+
def expire!(client: nil)
|
175
|
+
client ||= Spaceship::ConnectAPI
|
176
|
+
return client.patch_builds(build_id: id, attributes: { expired: true })
|
169
177
|
end
|
170
178
|
end
|
171
179
|
end
|
@@ -24,8 +24,9 @@ module Spaceship
|
|
24
24
|
# API
|
25
25
|
#
|
26
26
|
|
27
|
-
def self.all(app_id: nil, version: nil, build_number: nil)
|
28
|
-
|
27
|
+
def self.all(client: nil, app_id: nil, version: nil, build_number: nil)
|
28
|
+
client ||= Spaceship::ConnectAPI
|
29
|
+
resps = client.get_build_deliveries(
|
29
30
|
filter: { app: app_id, cfBundleShortVersionString: version, cfBundleVersion: build_number },
|
30
31
|
limit: 1
|
31
32
|
).all_pages
|
@@ -39,19 +39,22 @@ module Spaceship
|
|
39
39
|
# API
|
40
40
|
#
|
41
41
|
|
42
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
43
|
-
|
42
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
43
|
+
client ||= Spaceship::ConnectAPI
|
44
|
+
resps = client.get_bundle_ids(filter: filter, includes: includes).all_pages
|
44
45
|
return resps.flat_map(&:to_models)
|
45
46
|
end
|
46
47
|
|
47
|
-
def self.find(identifier, includes: nil)
|
48
|
-
|
48
|
+
def self.find(identifier, includes: nil, client: nil)
|
49
|
+
client ||= Spaceship::ConnectAPI
|
50
|
+
return all(client: client, filter: { identifier: identifier }, includes: includes).find do |app|
|
49
51
|
app.identifier == identifier
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
53
|
-
def self.get(bundle_id_id: nil, includes: nil)
|
54
|
-
|
55
|
+
def self.get(client: nil, bundle_id_id: nil, includes: nil)
|
56
|
+
client ||= Spaceship::ConnectAPI
|
57
|
+
return client.get_bundle_id(bundle_id_id: bundle_id_id, includes: includes).first
|
55
58
|
end
|
56
59
|
end
|
57
60
|
end
|
@@ -59,12 +59,14 @@ module Spaceship
|
|
59
59
|
# API
|
60
60
|
#
|
61
61
|
|
62
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
63
|
-
|
62
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
63
|
+
client ||= Spaceship::ConnectAPI
|
64
|
+
return client.get_users(filter: filter, includes: includes)
|
64
65
|
end
|
65
66
|
|
66
|
-
def self.find(email: nil, includes: nil)
|
67
|
-
|
67
|
+
def self.find(client: nil, email: nil, includes: nil)
|
68
|
+
client ||= Spaceship::ConnectAPI
|
69
|
+
return all(client: client, filter: { email: email }, includes: includes)
|
68
70
|
end
|
69
71
|
end
|
70
72
|
end
|
@@ -75,27 +75,31 @@ module Spaceship
|
|
75
75
|
# API
|
76
76
|
#
|
77
77
|
|
78
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
79
|
-
|
78
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
79
|
+
client ||= Spaceship::ConnectAPI
|
80
|
+
resps = client.get_certificates(filter: filter, includes: includes).all_pages
|
80
81
|
return resps.flat_map(&:to_models)
|
81
82
|
end
|
82
83
|
|
83
|
-
def self.create(certificate_type: nil, csr_content: nil)
|
84
|
+
def self.create(client: nil, certificate_type: nil, csr_content: nil)
|
85
|
+
client ||= Spaceship::ConnectAPI
|
84
86
|
attributes = {
|
85
87
|
certificateType: certificate_type,
|
86
88
|
csrContent: csr_content
|
87
89
|
}
|
88
|
-
resp =
|
90
|
+
resp = client.post_certificate(attributes: attributes)
|
89
91
|
return resp.to_models.first
|
90
92
|
end
|
91
93
|
|
92
|
-
def self.get(certificate_id: nil, includes: nil)
|
93
|
-
|
94
|
+
def self.get(client: nil, certificate_id: nil, includes: nil)
|
95
|
+
client ||= Spaceship::ConnectAPI
|
96
|
+
resp = client.get_certificate(certificate_id: certificate_id, includes: includes)
|
94
97
|
return resp.to_models.first
|
95
98
|
end
|
96
99
|
|
97
|
-
def delete!
|
98
|
-
Spaceship::ConnectAPI
|
100
|
+
def delete!(client: nil)
|
101
|
+
client ||= Spaceship::ConnectAPI
|
102
|
+
client.delete_certificate(certificate_id: id)
|
99
103
|
end
|
100
104
|
end
|
101
105
|
end
|
@@ -40,17 +40,23 @@ module Spaceship
|
|
40
40
|
return "devices"
|
41
41
|
end
|
42
42
|
|
43
|
+
def enabled?
|
44
|
+
return status == Status::ENABLED
|
45
|
+
end
|
46
|
+
|
43
47
|
#
|
44
48
|
# API
|
45
49
|
#
|
46
50
|
|
47
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
48
|
-
|
51
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
52
|
+
client ||= Spaceship::ConnectAPI
|
53
|
+
resps = client.get_devices(filter: filter, includes: includes).all_pages
|
49
54
|
return resps.flat_map(&:to_models)
|
50
55
|
end
|
51
56
|
|
52
|
-
def self.create(name: nil, platform: nil, udid: nil)
|
53
|
-
|
57
|
+
def self.create(client: nil, name: nil, platform: nil, udid: nil)
|
58
|
+
client ||= Spaceship::ConnectAPI
|
59
|
+
resp = client.post_device(name: name, platform: platform, udid: udid)
|
54
60
|
return resp.to_models.first
|
55
61
|
end
|
56
62
|
end
|
@@ -28,13 +28,15 @@ module Spaceship
|
|
28
28
|
# API
|
29
29
|
#
|
30
30
|
|
31
|
-
def update(attributes: nil)
|
31
|
+
def update(client: nil, attributes: nil)
|
32
|
+
client ||= Spaceship::ConnectAPI
|
32
33
|
attributes = reverse_attr_mapping(attributes)
|
33
|
-
|
34
|
+
client.patch_idfa_declaration(idfa_declaration_id: id, attributes: attributes)
|
34
35
|
end
|
35
36
|
|
36
|
-
def delete!
|
37
|
-
Spaceship::ConnectAPI
|
37
|
+
def delete!(client: nil)
|
38
|
+
client ||= Spaceship::ConnectAPI
|
39
|
+
client.delete_idfa_declaration(idfa_declaration_id: id)
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
@@ -65,13 +65,15 @@ module Spaceship
|
|
65
65
|
# API
|
66
66
|
#
|
67
67
|
|
68
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
69
|
-
|
68
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
69
|
+
client ||= Spaceship::ConnectAPI
|
70
|
+
resps = client.get_profiles(filter: filter, includes: includes).all_pages
|
70
71
|
return resps.flat_map(&:to_models)
|
71
72
|
end
|
72
73
|
|
73
|
-
def self.create(name: nil, profile_type: nil, bundle_id_id: nil, certificate_ids: nil, device_ids: nil, template_name: nil)
|
74
|
-
|
74
|
+
def self.create(client: nil, name: nil, profile_type: nil, bundle_id_id: nil, certificate_ids: nil, device_ids: nil, template_name: nil)
|
75
|
+
client ||= Spaceship::ConnectAPI
|
76
|
+
resp = client.post_profiles(
|
75
77
|
bundle_id_id: bundle_id_id,
|
76
78
|
certificates: certificate_ids,
|
77
79
|
devices: device_ids,
|
@@ -84,13 +86,15 @@ module Spaceship
|
|
84
86
|
return resp.to_models.first
|
85
87
|
end
|
86
88
|
|
87
|
-
def fetch_all_devices(filter: {}, includes: nil, sort: nil)
|
88
|
-
|
89
|
+
def fetch_all_devices(client: nil, filter: {}, includes: nil, sort: nil)
|
90
|
+
client ||= Spaceship::ConnectAPI
|
91
|
+
resps = client.get_devices(profile_id: id, filter: filter, includes: includes).all_pages
|
89
92
|
return resps.flat_map(&:to_models)
|
90
93
|
end
|
91
94
|
|
92
|
-
def delete!
|
93
|
-
|
95
|
+
def delete!(client: nil)
|
96
|
+
client ||= Spaceship::ConnectAPI
|
97
|
+
return client.delete_profile(profile_id: id)
|
94
98
|
end
|
95
99
|
end
|
96
100
|
end
|
@@ -18,8 +18,9 @@ module Spaceship
|
|
18
18
|
# API
|
19
19
|
#
|
20
20
|
|
21
|
-
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
22
|
-
Spaceship::ConnectAPI
|
21
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
22
|
+
client ||= Spaceship::ConnectAPI
|
23
|
+
client.delete_reset_ratings_request(reset_ratings_request_id: id)
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -36,12 +36,14 @@ module Spaceship
|
|
36
36
|
# API
|
37
37
|
#
|
38
38
|
|
39
|
-
def self.all(filter: {}, includes: nil, limit: 2000, sort: nil)
|
40
|
-
|
39
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: 2000, sort: nil)
|
40
|
+
client ||= Spaceship::ConnectAPI
|
41
|
+
resps = client.get_sandbox_testers(filter: filter, includes: includes).all_pages
|
41
42
|
return resps.flat_map(&:to_models)
|
42
43
|
end
|
43
44
|
|
44
|
-
def self.create(first_name: nil, last_name: nil, email: nil, password: nil, confirm_password: nil, secret_question: nil, secret_answer: nil, birth_date: nil, app_store_territory: nil)
|
45
|
+
def self.create(client: nil, first_name: nil, last_name: nil, email: nil, password: nil, confirm_password: nil, secret_question: nil, secret_answer: nil, birth_date: nil, app_store_territory: nil)
|
46
|
+
client ||= Spaceship::ConnectAPI
|
45
47
|
attributes = {
|
46
48
|
firstName: first_name,
|
47
49
|
lastName: last_name,
|
@@ -53,11 +55,12 @@ module Spaceship
|
|
53
55
|
birthDate: birth_date,
|
54
56
|
appStoreTerritory: app_store_territory
|
55
57
|
}
|
56
|
-
return
|
58
|
+
return client.post_sandbox_tester(attributes: attributes).first
|
57
59
|
end
|
58
60
|
|
59
|
-
def delete!
|
60
|
-
Spaceship::ConnectAPI
|
61
|
+
def delete!(client: nil)
|
62
|
+
client ||= Spaceship::ConnectAPI
|
63
|
+
client.delete_sandbox_tester(sandbox_tester_id: id)
|
61
64
|
end
|
62
65
|
end
|
63
66
|
end
|
@@ -18,8 +18,9 @@ module Spaceship
|
|
18
18
|
# API
|
19
19
|
#
|
20
20
|
|
21
|
-
def self.all(filter: {}, includes: nil, limit: 180, sort: nil)
|
22
|
-
|
21
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: 180, sort: nil)
|
22
|
+
client ||= Spaceship::ConnectAPI
|
23
|
+
resps = client.get_territories(filter: {}, includes: nil, limit: nil, sort: nil).all_pages
|
23
24
|
return resps.flat_map(&:to_models)
|
24
25
|
end
|
25
26
|
end
|
@@ -38,13 +38,15 @@ module Spaceship
|
|
38
38
|
# API
|
39
39
|
#
|
40
40
|
|
41
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
42
|
-
|
41
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
42
|
+
client ||= Spaceship::ConnectAPI
|
43
|
+
resps = client.get_users(filter: filter, includes: includes).all_pages
|
43
44
|
return resps.flat_map(&:to_models)
|
44
45
|
end
|
45
46
|
|
46
|
-
def self.find(email: nil, includes: nil)
|
47
|
-
|
47
|
+
def self.find(client: nil, email: nil, includes: nil)
|
48
|
+
client ||= Spaceship::ConnectAPI
|
49
|
+
return all(client: client, filter: { email: email }, includes: includes)
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
@@ -42,17 +42,20 @@ module Spaceship
|
|
42
42
|
# Managing invitations
|
43
43
|
#
|
44
44
|
|
45
|
-
def self.all(filter: {}, includes: nil, sort: nil)
|
46
|
-
|
45
|
+
def self.all(client: nil, filter: {}, includes: nil, sort: nil)
|
46
|
+
client ||= Spaceship::ConnectAPI
|
47
|
+
resps = client.get_user_invitations(filter: filter, includes: includes, sort: sort).all_pages
|
47
48
|
return resps.flat_map(&:to_models)
|
48
49
|
end
|
49
50
|
|
50
|
-
def self.find(email: nil, includes: nil)
|
51
|
-
|
51
|
+
def self.find(client: nil, email: nil, includes: nil)
|
52
|
+
client ||= Spaceship::ConnectAPI
|
53
|
+
return all(client: client, filter: { email: email }, includes: includes)
|
52
54
|
end
|
53
55
|
|
54
|
-
def delete!
|
55
|
-
Spaceship::ConnectAPI
|
56
|
+
def delete!(client: nil)
|
57
|
+
client ||= Spaceship::ConnectAPI
|
58
|
+
client.delete_user_invitation(user_invitation_id: id)
|
56
59
|
end
|
57
60
|
end
|
58
61
|
end
|