i18n_flow 0.2.1 → 0.2.2
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/Gemfile.lock +1 -1
- data/lib/i18n_flow/version.rb +1 -1
- data/lib/i18n_flow/yaml_ast_proxy/mapping.rb +7 -3
- 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: 157be720fa6ecf3e7525a75e8ce298e60287e65c
|
4
|
+
data.tar.gz: f21d1957ec6bcfe491df0768e2205f30cffef921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 262fd31678a1aefa44651f0a5210431988d265857939ecf56b2fd69e7cb944f496f470d6a32533fa960658deedf0a259a46a580e6fb20b708410e2b602da5c3d
|
7
|
+
data.tar.gz: a8802ced6c6dcb06136c967bf5c074da02e4b4c9571eafb3850e940c67b5fb0e2892a47f64b7630827390e81674ac0f96933926d015d127f711b579e70463b25
|
data/Gemfile.lock
CHANGED
data/lib/i18n_flow/version.rb
CHANGED
@@ -83,12 +83,16 @@ module I18nFlow::YamlAstProxy
|
|
83
83
|
node.children.replace(children)
|
84
84
|
end
|
85
85
|
|
86
|
+
# -2 Default with anchor
|
87
|
+
# -1 Aliases
|
88
|
+
# 0 Default without anchor
|
89
|
+
# 0 Mappings with anchor
|
90
|
+
# 1 Mappings without anochor
|
86
91
|
def sort_order(node)
|
87
92
|
case node
|
88
93
|
when Psych::Nodes::Alias then -1
|
89
|
-
when Psych::Nodes::
|
90
|
-
|
91
|
-
else 0
|
94
|
+
when Psych::Nodes::Mapping then node.anchor ? 0 : 1
|
95
|
+
else node.anchor ? -2 : 0
|
92
96
|
end
|
93
97
|
end
|
94
98
|
end
|