rails_erb_credentials 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rails_erb_credentials/evaluated_credentials.rb +9 -5
- data/lib/rails_erb_credentials/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: 904a3b4da6fb78fd0345033613992f507da09cd1703b2f5c52728622ba9087fb
|
4
|
+
data.tar.gz: f9efb59cc9a8311162c806d108ed969ee0328b1e0b14d371e8ec829eb657f589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f35254ee9b74e30f0169f2d8232fc6e579e369d3c288db4e9bff49c0ac8baf26a50af468173b82745ee99d904d434b25b8b378f4247e651c8d3ac3fafb2e8804
|
7
|
+
data.tar.gz: 3fbf91da9cd08829e82d3c471356859f253e4440c511b21860d3ec2dda3549ffff9be515328cb3f9df7c5d2b039eeba892c10ccf23d873aa735ec2e41e3d6b2e
|
data/CHANGELOG.md
CHANGED
@@ -9,16 +9,20 @@ module RailsErbCredentials
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def method_missing(method_name, *args, &block)
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
if @original_credentials.respond_to?(method_name)
|
13
|
+
value = @original_credentials.public_send(method_name, *args, &block)
|
14
|
+
if value.is_a?(String) && value.include?("<%=")
|
15
|
+
ERB.new(value).result(binding)
|
16
|
+
else
|
17
|
+
value
|
18
|
+
end
|
15
19
|
else
|
16
|
-
|
20
|
+
super
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def respond_to_missing?(method_name, include_private = false)
|
21
|
-
@original_credentials.respond_to?(method_name) || super
|
25
|
+
@original_credentials.respond_to?(method_name, include_private) || super
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|