tamplier 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tamplier.rb +3 -3
- data/lib/tamplier/validator.rb +3 -3
- data/lib/tamplier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af6fec80c5ac246a13218b9073558380c3e63a0f
|
4
|
+
data.tar.gz: b68e417ea47add5aeccd182dad289a285bfd169d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 105c5b4d0bfb1cabac5d7d2096226c35b2dabf7fc2411a0915161b3f12fa1df14eda42b2bb915ed6ea33f24d7d2a205f12bf3d443cc9b781e3cc84dc1f73109a
|
7
|
+
data.tar.gz: 9daa5cafb620612ef369d1f8d031e301afd5080d3f1603a1ea3cb5096963070f9345cf8807eba71d748bd98853abd742451bda7e57463e41e213e194149b4aaa
|
data/lib/tamplier.rb
CHANGED
@@ -2,8 +2,8 @@ require 'pathname'
|
|
2
2
|
require 'yaml'
|
3
3
|
require 'active_support/all'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
require_relative 'tamplier/version'
|
6
|
+
require_relative 'tamplier/exceptions/configuration_exception'
|
7
|
+
require_relative 'tamplier/validator'
|
8
8
|
|
9
9
|
require 'tamplier/railtie' if defined?(Rails)
|
data/lib/tamplier/validator.rb
CHANGED
@@ -23,10 +23,10 @@ module Tamplier
|
|
23
23
|
(YAML.load(file.read).keys & %w[development test]).present?
|
24
24
|
end
|
25
25
|
|
26
|
-
def flat_keys(hash, path =
|
27
|
-
return path unless hash.is_a?(Hash)
|
26
|
+
def flat_keys(hash, path = '')
|
27
|
+
return [path] unless hash.is_a?(Hash)
|
28
28
|
hash.map do |key, value|
|
29
|
-
flat_keys(value, [path, key].
|
29
|
+
flat_keys(value, path.blank? ? key : [path, key].join('/'))
|
30
30
|
end.flatten
|
31
31
|
end
|
32
32
|
end
|
data/lib/tamplier/version.rb
CHANGED