fastlane-plugin-firebase 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/firebase/lib/api.rb +10 -8
- data/lib/fastlane/plugin/firebase/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41c1ec562cfc2c60ef6162b9eccb6d72ffca29ff
|
4
|
+
data.tar.gz: 86d229fc2ca5eb4ce52b89fe661bad86bbc85b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a559d88714f929b256bb3190a98b9de6f3055dafdb32f24a4c91d6b6fd290bece957b2b302f59aae327b4fa97825398815cc1bb6e0da64a0554fd121a2083e4f
|
7
|
+
data.tar.gz: 15698ce14f7f42c3fc3db7ad9d865d0b5aab0b0f33a04cd41c4a5b88b4a3127aeb1454bcd94b63b4ee589547f4f8e45c72ecfe4ee3f8e5255034b3ffd327ed18
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Firebase
|
3
|
-
|
4
|
-
class Api
|
3
|
+
class Api
|
5
4
|
class LoginError < StandardError
|
6
5
|
end
|
7
6
|
|
@@ -17,7 +16,7 @@ module Fastlane
|
|
17
16
|
require 'digest/sha1'
|
18
17
|
require 'json'
|
19
18
|
require 'cgi'
|
20
|
-
|
19
|
+
|
21
20
|
def initialize(email, password)
|
22
21
|
@agent = Mechanize.new
|
23
22
|
@base_url = "https://console.firebase.google.com"
|
@@ -57,7 +56,7 @@ module Fastlane
|
|
57
56
|
elsif page.xpath("//div[@class='captcha-img']").count > 0 then
|
58
57
|
page = captcha_challenge(page)
|
59
58
|
next
|
60
|
-
elsif page.form.action.include? "/signin/challenge
|
59
|
+
elsif page.form.action.include? "/signin/challenge" then
|
61
60
|
page = signin_challenge(page)
|
62
61
|
next
|
63
62
|
else
|
@@ -127,19 +126,22 @@ module Fastlane
|
|
127
126
|
form = page.form_with(:id => form_id)
|
128
127
|
type = (form["challengeType"] || "-1").to_i
|
129
128
|
|
130
|
-
# Two factor verification
|
131
|
-
if type == 9 then
|
129
|
+
# Two factor verification SMS
|
130
|
+
if type == 9 || type == 6 then
|
132
131
|
div = page.at("##{form_id} div")
|
133
132
|
if div != nil then
|
134
133
|
UI.important div.xpath("div[1]").text
|
135
134
|
UI.important div.xpath("div[2]").text
|
136
135
|
end
|
137
136
|
|
138
|
-
|
137
|
+
prefix = type == 9 ? " G-" : ""
|
138
|
+
code = UI.input "Enter code#{prefix}:"
|
139
139
|
form.Pin = code
|
140
140
|
page = @agent.submit(form, form.buttons.first)
|
141
141
|
return page
|
142
|
-
|
142
|
+
elsif type == 4 then
|
143
|
+
UI.user_error! "Google prompt is not supported as a two-step verification"
|
144
|
+
else
|
143
145
|
html = page.at("##{form_id}").to_html
|
144
146
|
UI.user_error! "Unknown challenge type \n\n#{html}"
|
145
147
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-firebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Kohout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|