fastlane-plugin-firebase_app_distribution 0.6.1 → 0.7.0.pre.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (17) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb +155 -40
  3. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_add_testers_action.rb +52 -9
  4. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_create_group_action.rb +25 -4
  5. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_delete_group_action.rb +11 -3
  6. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_get_latest_release.rb +39 -6
  7. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_get_udids.rb +2 -2
  8. data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_remove_testers_action.rb +48 -9
  9. data/lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb +1 -396
  10. data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_auth_client.rb +24 -19
  11. data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb +2 -3
  12. data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_helper.rb +31 -2
  13. data/lib/fastlane/plugin/firebase_app_distribution/version.rb +1 -1
  14. metadata +32 -7
  15. data/lib/fastlane/plugin/firebase_app_distribution/client/aab_info.rb +0 -42
  16. data/lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb +0 -16
  17. data/lib/fastlane/plugin/firebase_app_distribution/helper/upload_status_response.rb +0 -77
@@ -1,42 +0,0 @@
1
- class AabInfo
2
- # AAB states
3
- class AabState
4
- UNSPECIFIED = 'AAB_STATE_UNSPECIFIED'
5
- PLAY_ACCOUNT_NOT_LINKED = 'PLAY_ACCOUNT_NOT_LINKED'
6
- NO_APP_WITH_GIVEN_BUNDLE_ID_IN_PLAY_ACCOUNT = 'NO_APP_WITH_GIVEN_BUNDLE_ID_IN_PLAY_ACCOUNT'
7
- APP_NOT_PUBLISHED = 'APP_NOT_PUBLISHED'
8
- PLAY_IAS_TERMS_NOT_ACCEPTED = 'PLAY_IAS_TERMS_NOT_ACCEPTED'
9
- INTEGRATED = 'INTEGRATED'
10
- UNAVAILABLE = 'AAB_STATE_UNAVAILABLE'
11
- end
12
-
13
- def initialize(response)
14
- @response = response || {}
15
- end
16
-
17
- def integration_state
18
- @response[:integrationState]
19
- end
20
-
21
- def test_certificate
22
- @response[:testCertificate] || {}
23
- end
24
-
25
- def md5_certificate_hash
26
- test_certificate[:hashMd5]
27
- end
28
-
29
- def sha1_certificate_hash
30
- test_certificate[:hashSha1]
31
- end
32
-
33
- def sha256_certificate_hash
34
- test_certificate[:hashSha256]
35
- end
36
-
37
- def certs_provided?
38
- (!md5_certificate_hash.nil? && !md5_certificate_hash.empty?) &&
39
- (!sha1_certificate_hash.nil? && !sha1_certificate_hash.empty?) &&
40
- (!sha256_certificate_hash.nil? && !sha256_certificate_hash.empty?)
41
- end
42
- end
@@ -1,16 +0,0 @@
1
- module Fastlane
2
- module Client
3
- class ErrorResponse
4
- attr_accessor :code, :message, :status
5
-
6
- def initialize(response)
7
- unless response[:body].nil? || response[:body].empty?
8
- response_body = JSON.parse(response[:body], symbolize_names: true)
9
- @code = response_body[:error][:code]
10
- @message = response_body[:error][:message]
11
- @status = response_body[:error][:status]
12
- end
13
- end
14
- end
15
- end
16
- end
@@ -1,77 +0,0 @@
1
- class UploadStatusResponse
2
- def initialize(response_json_hash)
3
- @response_json_hash = response_json_hash
4
- end
5
-
6
- def done
7
- !!@response_json_hash[:done]
8
- end
9
-
10
- def response
11
- @response_json_hash[:response]
12
- end
13
-
14
- def release
15
- response ? response[:release] : nil
16
- end
17
-
18
- def release_name
19
- release ? release[:name] : nil
20
- end
21
-
22
- def release_version
23
- if release
24
- if release[:displayVersion] && release[:buildVersion]
25
- "#{release[:displayVersion]} (#{release[:buildVersion]})"
26
- elsif release[:displayVersion]
27
- release[:displayVersion]
28
- else
29
- release[:buildVersion]
30
- end
31
- end
32
- end
33
-
34
- def firebase_console_uri
35
- release ? release[:firebaseConsoleUri] : nil
36
- end
37
-
38
- def testing_uri
39
- release ? release[:testingUri] : nil
40
- end
41
-
42
- def binary_download_uri
43
- release ? release[:binaryDownloadUri] : nil
44
- end
45
-
46
- def status
47
- response ? response[:result] : nil
48
- end
49
-
50
- def error
51
- @response_json_hash[:error]
52
- end
53
-
54
- def error_message
55
- error ? error[:message] : nil
56
- end
57
-
58
- def success?
59
- done && !!release
60
- end
61
-
62
- def in_progress?
63
- !done
64
- end
65
-
66
- def error?
67
- done && message
68
- end
69
-
70
- def release_updated?
71
- done && status == 'RELEASE_UPDATED'
72
- end
73
-
74
- def release_unmodified?
75
- done && status == 'RELEASE_UNMODIFIED'
76
- end
77
- end