ask-auth 0.1.2 → 0.1.3
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/ask/auth/providers/rails_credentials.rb +6 -2
- data/lib/ask/auth/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: f8535335b52d412f3c6cd8cb70de3547d5872c21e0aac5465c1bac88a5446847
|
|
4
|
+
data.tar.gz: 1072dfab33c51e9ab57b6ccd928f97f9f55a947dd27d542696dece9330fa0326
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 349a4863d2061377b373402ea937e9fbaf15a8928662ec3af72e7754fc3e87542bf2e62e9355fbe90140e1a61c4d5e77985b1c87a706eddda8cf8abcd4599fe2
|
|
7
|
+
data.tar.gz: b01eabafd424f1bf3348b55f05678b6ff6aeb20b805e870cf975631d400915e992d05f64799c74e9cc53a0a37e16db332b1a9bac096be25fd413df0acd8bb100
|
|
@@ -30,8 +30,12 @@ module Ask
|
|
|
30
30
|
s = name.to_s
|
|
31
31
|
parts = s.split("_")
|
|
32
32
|
|
|
33
|
-
# 1. Full name as a single top-level key
|
|
34
|
-
|
|
33
|
+
# 1. Full name as a single top-level key (e.g., credentials.opencode_api_key)
|
|
34
|
+
# Must check the returned value, not just respond_to?, because
|
|
35
|
+
# ActiveSupport::OrderedOptions#respond_to? returns true for any
|
|
36
|
+
# method name even when the key doesn't exist in the hash.
|
|
37
|
+
val = creds.public_send(s) rescue nil
|
|
38
|
+
return val if val
|
|
35
39
|
|
|
36
40
|
# 2. First segment as namespace, joined rest as sub-key
|
|
37
41
|
# e.g., opencode_api_key → credentials.opencode.api_key
|
data/lib/ask/auth/version.rb
CHANGED