i18n-tasks 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +1 -1
- data/lib/i18n/tasks/base_task.rb +1 -1
- data/lib/i18n/tasks/configuration.rb +4 -2
- data/lib/i18n/tasks/console_context.rb +4 -0
- data/lib/i18n/tasks/data.rb +1 -1
- data/lib/i18n/tasks/data/tree/node.rb +1 -1
- data/lib/i18n/tasks/version.rb +1 -1
- data/spec/support/trees.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: 6579b9cbd049e1fa2d48871a7ca13f7fd8ad96a4
|
4
|
+
data.tar.gz: eaa10ec60b66db271f1c3f25f7369d4c0ba6e36e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1119961b325f1bf1f678b42304ed9669f4c8800a865f257a09817ceff1d5bfc69038ebf6ec8932e4833e90fea3b969574b2d3a0315245981a3f230793ae4665c
|
7
|
+
data.tar.gz: 3c69f7d4e2f8edde4dd4407f6e18085fd4d8318565bc366ec1f39288465f345466fd5da8967f9ed279d35f089f75236710f73f0a45cf41e88d9e6cfaf8eaa909
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
data/lib/i18n/tasks/base_task.rb
CHANGED
@@ -106,7 +106,7 @@ module I18n::Tasks::Configuration
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def config_for_inspect
|
109
|
-
to_hash_from_indifferent(config_sections.
|
109
|
+
to_hash_from_indifferent(config_sections.reject { |k, v| v.blank? }).tap do |sections|
|
110
110
|
sections.each do |_k, section|
|
111
111
|
section.merge! section.delete('config') if Hash === section && section.key?('config')
|
112
112
|
end
|
@@ -118,7 +118,9 @@ module I18n::Tasks::Configuration
|
|
118
118
|
def to_hash_from_indifferent(v)
|
119
119
|
case v
|
120
120
|
when Hash
|
121
|
-
v.to_hash
|
121
|
+
v.stringify_keys.to_hash.tap do |h|
|
122
|
+
h.each { |k, v| h[k] = to_hash_from_indifferent(v) if Hash === v || Array === v }
|
123
|
+
end
|
122
124
|
when Array
|
123
125
|
v.map { |e| to_hash_from_indifferent e }
|
124
126
|
else
|
data/lib/i18n/tasks/data.rb
CHANGED
@@ -199,7 +199,7 @@ module I18n::Tasks::Data::Tree
|
|
199
199
|
|
200
200
|
# value can be a nested hash
|
201
201
|
def from_key_value(key, value)
|
202
|
-
Node.new(key: key).tap do |node|
|
202
|
+
Node.new(key: key.try(:to_s)).tap do |node|
|
203
203
|
if value.is_a?(Hash)
|
204
204
|
node.children = Siblings.from_nested_hash(value, parent: node)
|
205
205
|
else
|
data/lib/i18n/tasks/version.rb
CHANGED
data/spec/support/trees.rb
CHANGED