fastlane-plugin-firebase_management 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 6df846eaf1aad7840c15967396f8be9e0b5d7d54e8743621506c71c451e47ad8
4
- data.tar.gz: 4cad671ea2d90da2cd663017cfd0c287d61e38498850630ad4fc62bcc4feaf23
3
+ metadata.gz: 404070b44bafc2d2f983b13a4fa5bfba0eb5def830f66cad096c5fa57ca31021
4
+ data.tar.gz: 994ad2f5533c6cde536087c34bf7919b61e09be431d7bd6878bded2c8905ec7f
5
5
  SHA512:
6
- metadata.gz: b29e743396ab24b68b03b1cdc9d59a6718768f40be3ef894241a8e3249d97f62a4a947afb4587d84312fd970abe50bc3c98180e4e18c7c0003ba138e7238da26
7
- data.tar.gz: ed5b0d1e4a7669e310f958fe8711e8e560ddb6976d7e48c8bae40dbe7ccaf24eebf1e2a505f27130d840344ef08270a4b53a00e0f98707a0298517a0fc964474
6
+ metadata.gz: 9c9ea8fb8317338d3480af2a8580fed3b0d1889880630deecd37b9efb862200194661f4e99a094faea98d9a5a12cb65e15ee000c30e70943b61a229c6707535d
7
+ data.tar.gz: d864b0348120c4b3d3ec812820fc06bb52b2ae5db7cb0f4c9286f967ab4982be1e442ec40115dd91f81b02c99b07c3a22afe0effb363aff785453467b7ba96c6
data/README.md CHANGED
@@ -14,31 +14,41 @@ fastlane add_plugin firebase_management
14
14
 
15
15
  An unofficial tool to access Firebase project settings. It allows you to create new apps and download config files (GoogleInfo.plist for ios and google-services.json for android).
16
16
 
17
- Plugin uses new official Firebase Management API introduced on Firebase Summit 10/2018. It's based on [tkohout/fastlane-firebase-plugin](https://github.com/tkohout/fastlane-firebase-plugin), which uses web scraping instead of official API to manage Firebase apps.
17
+ Plugin uses new official [Firebase Management API](https://firebase.google.com/docs/projects/api/reference/rest/) introduced on Firebase Summit 10/2018. It's based on [tkohout/fastlane-firebase-plugin](https://github.com/tkohout/fastlane-firebase-plugin), which uses web scraping instead of official API to manage Firebase apps. The plan is that both plugins will live next to each other until official API will contain all desired features and tkohout's plugin won't be needed anymore.
18
18
 
19
- **This very first version was developed using alpha version of the API in a very short time, so it's not well tested and may contain bugs or mistakes. Issues and PRs are very welcome! 🤗**
19
+ New features like deleting apps or APNs keys/certificates management are promised by guys from Google/Firebase so stay tuned 🤙
20
+
21
+ **This very first version was developed using alpha version of the API in a very short time, so it may contain bugs or mistakes. Issues and PRs are very welcome! 🤗**
20
22
 
21
23
  ### Actions
22
24
 
23
25
  List all projects and apps
24
26
 
25
27
  ```
26
- firebase_list
28
+ firebase_management_list
27
29
  ```
28
30
 
29
31
 
30
32
  Add app to a project and download config file
31
33
 
32
34
  ```
33
- firebase_add_app
35
+ firebase_management_add_app
34
36
  ```
35
37
 
36
38
  Download config file for a client
37
39
 
38
40
  ```
39
- firebase_download_config
41
+ firebase_management_download_config
40
42
  ```
41
43
 
44
+ ### Authentication
45
+
46
+ Plugin works only with service accounts. A service account is a special Google account that belongs to your application or a virtual machine, instead of to an individual end user. Read more [here](https://cloud.google.com/iam/docs/service-accounts).
47
+
48
+ All you need for the plugin to work is a json file with service account private key information. The easiest way to get it is...
49
+
50
+ Go to Firebase Console -> Your project -> Project settings -> Service accounts and tap on button `Generate new private key`. 🎉 That's the file you need!
51
+
42
52
  ## Example
43
53
 
44
54
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
@@ -62,22 +62,37 @@ module Fastlane
62
62
  UI.verbose "Found #{projects.count} projects"
63
63
  projects
64
64
  end
65
-
66
- def ios_app_list(project_id)
67
- UI.verbose "Retrieving app list for project #{project_id}"
68
- json = request_json("v1beta1/projects/#{project_id}/iosApps")
69
- apps = json["apps"] || []
70
- UI.verbose "Found #{apps.count} apps"
71
- apps
72
- end
73
-
74
- def android_app_list(project_id)
75
- UI.verbose "Retrieving app list for project #{project_id}"
76
- json = request_json("v1beta1/projects/#{project_id}/androidApps")
77
- apps = json["apps"] || []
78
- UI.verbose "Found #{apps.count} apps"
79
- apps
80
- end
65
+
66
+ def ios_app_list(project_id, params = nil)
67
+ UI.verbose "Retrieving app list for project #{project_id}"
68
+
69
+ apps = []
70
+ pageToken = nil
71
+ loop do
72
+ url = "v1beta1/projects/#{project_id}/iosApps" + (pageToken ? "?pageToken=#{pageToken}" : "")
73
+ json = request_json(url)
74
+ apps.concat(json["apps"] || [])
75
+ pageToken = json["nextPageToken"]
76
+ break if !pageToken
77
+ end
78
+ UI.verbose "Found #{apps.count} apps"
79
+ apps
80
+ end
81
+
82
+ def android_app_list(project_id)
83
+ UI.verbose "Retrieving app list for project #{project_id}"
84
+ apps = []
85
+ pageToken = nil
86
+ loop do
87
+ url = "v1beta1/projects/#{project_id}/androidApps" + (pageToken ? "?pageToken=#{pageToken}" : "")
88
+ json = request_json(url)
89
+ apps.concat(json["apps"] || [])
90
+ pageToken = json["nextPageToken"]
91
+ break if !pageToken
92
+ end
93
+ UI.verbose "Found #{apps.count} apps"
94
+ apps
95
+ end
81
96
 
82
97
  def add_ios_app(project_id, bundle_id, app_name)
83
98
  parameters = {
@@ -126,4 +141,4 @@ module Fastlane
126
141
  end
127
142
  end
128
143
  end
129
- end
144
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FirebaseManagement
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-firebase_management
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ackee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-07 00:00:00.000000000 Z
11
+ date: 2019-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -201,8 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
- rubyforge_project:
205
- rubygems_version: 2.7.8
204
+ rubygems_version: 3.0.3
206
205
  signing_key:
207
206
  specification_version: 4
208
207
  summary: Unofficial tool to access Firebase project settings