omniai-google 2.3.0 → 2.3.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/omniai/google/client.rb +1 -1
- data/lib/omniai/google/config.rb +1 -1
- data/lib/omniai/google/credentials.rb +3 -2
- data/lib/omniai/google/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 904b9944d8f92b2dd343568a5185c0adf8151d84e57698a85542187f88e5b469
|
4
|
+
data.tar.gz: fbcac301f2f80c16b3ad2d1c3e1d812ea52c9ea7f5ba5ca0ba22c2f2e7b5a594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac86234994438b8197e88ce447479aab12aaddef77e2d50e04c58560af2d83c0f18af34512de2e19524ae383203194dd42fb4264510bd01aed26a60bc8e77cf8
|
7
|
+
data.tar.gz: 9a212401e92a2ab193fab62db2b01da7f7012c42ba4e1f95a5446b921a57946c816347248138f98c0a8f387cbe2fcef359fc0a8189363388aff0c2ffd76aa2d8
|
data/lib/omniai/google/client.rb
CHANGED
data/lib/omniai/google/config.rb
CHANGED
@@ -51,7 +51,7 @@ module OmniAI
|
|
51
51
|
Credentials.detect
|
52
52
|
end
|
53
53
|
|
54
|
-
# @param value [String, File, Google::Auth::ServiceAccountCredentials, nil]
|
54
|
+
# @param value [String, File, Hash, Google::Auth::ServiceAccountCredentials, nil]
|
55
55
|
def credentials=(value)
|
56
56
|
@credentials = Credentials.parse(value)
|
57
57
|
end
|
@@ -17,14 +17,15 @@ module OmniAI
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
# @param value [Google::Auth::ServiceAccountCredentials, IO, Pathname, String nil]
|
20
|
+
# @param value [Google::Auth::ServiceAccountCredentials, IO, Pathname, String, Hash, nil]
|
21
21
|
# @return [Google::Auth::ServiceAccountCredentials]
|
22
22
|
def self.parse(value)
|
23
23
|
case value
|
24
|
-
when ::Google::Auth::ServiceAccountCredentials then value
|
25
24
|
when IO, StringIO then ::Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: value, scope: SCOPE)
|
25
|
+
when Hash then parse(JSON.generate(value))
|
26
26
|
when Pathname then parse(File.open(value))
|
27
27
|
when String then parse(StringIO.new(value))
|
28
|
+
else value
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|