Allow symbols for credential flow
Because of my production environment, adding a JSON file a little bit of a pain. However: using the intializer it's readily possible to set my credentials manually from my environment. I noticed that while all the credential details can be either a String or a Symbol, the 'flow' (i.e., `web`) **must** be a string. This allows it to accept both a string and a symbol.
This commit is contained in:
1 parent
1b2a607d9b
commit
74bbfa2251
2 files changed
+2
-2
No files matched your search
@@ -82,7 +82,7 @@ module Google
|
||||
def initialize(options={})
|
||||
# Client auth configuration
|
||||
@flow = options[:flow] || options.keys.first.to_s || 'web'
|
||||
fdata = options[@flow]
|
||||
fdata = options[@flow.to_sym] || options[@flow]
|
||||
@client_id = fdata[:client_id] || fdata["client_id"]
|
||||
@client_secret = fdata[:client_secret] || fdata["client_secret"]
|
||||
@redirect_uris = fdata[:redirect_uris] || fdata["redirect_uris"]
|
||||
|
||||
Reference in new issue
Block a user