ravioli 0.1.6 → 0.1.7
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/ravioli/builder.rb +1 -1
- data/lib/ravioli/configuration.rb +5 -5
- data/lib/ravioli/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: a42c50f1ae58ea21c70956c3a2fda57084dc20042efc3e163c26b80a8ecc8c58
|
4
|
+
data.tar.gz: 2fafc358079f1bab16f25e36563dc5f843fedd7d85e32b8e34ca337b2c3c23ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf02967cc19dfba1c24a0db7da932999896c278635a8be0c45d6966d4d9e76d2517290770a8d608842b4978beb9c05621b532023ffd2bbd8eed484155c3327b8
|
7
|
+
data.tar.gz: 77bdfbaeb3210f7033e9837d7c52003118fc45edaec020595276f455260cb13a186c1c1239c3bf96e5e4965acb3c3f1b250fc0766e1f5d6957c89d662c633d5e
|
data/lib/ravioli/builder.rb
CHANGED
@@ -213,7 +213,7 @@ module Ravioli
|
|
213
213
|
@reload_credentials.add(@current_credentials)
|
214
214
|
end
|
215
215
|
|
216
|
-
configuration.send(*args, &block)
|
216
|
+
configuration.fetch_env_key_for(args) { configuration.send(*args, &block) }
|
217
217
|
end
|
218
218
|
# rubocop:enable Style/MissingRespondToMissing
|
219
219
|
# rubocop:enable Style/MethodMissingSuper
|
@@ -45,6 +45,11 @@ module Ravioli
|
|
45
45
|
dig(*keys) || yield
|
46
46
|
end
|
47
47
|
|
48
|
+
def fetch_env_key_for(keys, &block)
|
49
|
+
env_key = key_path_for(keys).join("_").upcase
|
50
|
+
ENV.fetch(env_key, &block)
|
51
|
+
end
|
52
|
+
|
48
53
|
def pretty_print(printer = nil)
|
49
54
|
table.pretty_print(printer)
|
50
55
|
end
|
@@ -80,11 +85,6 @@ module Ravioli
|
|
80
85
|
end
|
81
86
|
end
|
82
87
|
|
83
|
-
def fetch_env_key_for(keys, &block)
|
84
|
-
env_key = key_path_for(keys).join("_").upcase
|
85
|
-
ENV.fetch(env_key, &block)
|
86
|
-
end
|
87
|
-
|
88
88
|
def key_path_for(keys)
|
89
89
|
Array(key_path) + Array(keys)
|
90
90
|
end
|
data/lib/ravioli/version.rb
CHANGED