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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef7814ad2fd60f7d89dd87a2350c23496d4846e172393bb0b8fbf3ffde48347f
4
- data.tar.gz: 7ead40b0168c010885d0af4fb8633d5da67ef187508777aa506528a5946bef75
3
+ metadata.gz: 904b9944d8f92b2dd343568a5185c0adf8151d84e57698a85542187f88e5b469
4
+ data.tar.gz: fbcac301f2f80c16b3ad2d1c3e1d812ea52c9ea7f5ba5ca0ba22c2f2e7b5a594
5
5
  SHA512:
6
- metadata.gz: f49152ce0896a0c4ed9668dcc5f4abce7363d4dfe907fd79a7511363fa5e8b7ec1797d1449653c22fb5dfbb9f49054359d7d57102607ec59699c113975d7fdb4
7
- data.tar.gz: 8a88be48a793faefd52d98928fc57b9b1acdc84e1ad0d82735ca6605e63cfdfb7119c6835dc88c51d323cb4d0155a61d5c49995ae2f7b546b937ab333bb90471
6
+ metadata.gz: ac86234994438b8197e88ce447479aab12aaddef77e2d50e04c58560af2d83c0f18af34512de2e19524ae383203194dd42fb4264510bd01aed26a60bc8e77cf8
7
+ data.tar.gz: 9a212401e92a2ab193fab62db2b01da7f7012c42ba4e1f95a5446b921a57946c816347248138f98c0a8f387cbe2fcef359fc0a8189363388aff0c2ffd76aa2d8
@@ -50,7 +50,7 @@ module OmniAI
50
50
 
51
51
  @project_id = project_id
52
52
  @location_id = location_id
53
- @credentials = credentials
53
+ @credentials = Credentials.parse(credentials)
54
54
  @version = version
55
55
  end
56
56
 
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Google
5
- VERSION = "2.3.0"
5
+ VERSION = "2.3.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre