i18n-tasks 0.3.7 → 0.3.8
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/lib/i18n/tasks/data/file_formats.rb +3 -1
- data/lib/i18n/tasks/data/locale_tree.rb +7 -5
- data/lib/i18n/tasks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b251c2d3a1ff43a022a0e2ef3d98517071f2bcd3
|
4
|
+
data.tar.gz: 0d7b6dd38ceb7136c64038d5c299df475aae7712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19108f53812ed81ec2fac74c99d877a2b19ddff2320cc9e929055e00015d260e0e695fcf7cebdfa6ecdddc4e5e6380351ac8091c113a54af17375ac810e03097
|
7
|
+
data.tar.gz: 990b2e75cd6f492f93647e37a5aad0f8550d422157f593910e3d09662d60a708701c35ddf0282fb4a2bfcb5187b38ceb6837482dad858c78cd3610f5029d916a
|
data/CHANGES.md
CHANGED
@@ -4,16 +4,14 @@ module I18n::Tasks
|
|
4
4
|
class LocaleTree
|
5
5
|
attr_reader :locale, :data
|
6
6
|
|
7
|
-
delegate :tree_data, to: :class
|
8
|
-
|
9
7
|
def initialize(locale, data = {})
|
10
8
|
@locale = locale.to_s
|
11
|
-
data =
|
9
|
+
data = to_tree_data(data)
|
12
10
|
@data = data.with_indifferent_access
|
13
11
|
end
|
14
12
|
|
15
13
|
def merge(other)
|
16
|
-
self.class.new locale, data.deep_merge(
|
14
|
+
self.class.new locale, data.deep_merge(to_tree_data(other))
|
17
15
|
end
|
18
16
|
|
19
17
|
alias + merge
|
@@ -54,8 +52,12 @@ module I18n::Tasks
|
|
54
52
|
self
|
55
53
|
end
|
56
54
|
|
55
|
+
def to_tree_data(arg)
|
56
|
+
self.class.to_tree_data(arg)
|
57
|
+
end
|
58
|
+
|
57
59
|
class << self
|
58
|
-
def
|
60
|
+
def to_tree_data(any)
|
59
61
|
if any.is_a?(Hash)
|
60
62
|
any
|
61
63
|
elsif any.is_a?(Array)
|
data/lib/i18n/tasks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|