i18n_flow 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7a3c18156e0fdfebf2f9b9de3f6965eb86e17d2
4
- data.tar.gz: 807640fefba2f86593ae49ec5d1abe385592eafc
3
+ metadata.gz: 157be720fa6ecf3e7525a75e8ce298e60287e65c
4
+ data.tar.gz: f21d1957ec6bcfe491df0768e2205f30cffef921
5
5
  SHA512:
6
- metadata.gz: 7953b9c89839512ca1fa0b07d4e67f58a6d2bc15fe9865640fc21c84c2bdadf2d851f94dfdffbe510166ac9aea40702b3b59044909e90e742b7017a775bef5a7
7
- data.tar.gz: f853af82979315aafbcb43d7c5128289ec6e1da90992b6fac1132f1dc2c1497cdd9ba278bb142c44b15fe0925b68c8f79140f8416f91dbcaaf0fffd7f95654f3
6
+ metadata.gz: 262fd31678a1aefa44651f0a5210431988d265857939ecf56b2fd69e7cb944f496f470d6a32533fa960658deedf0a259a46a580e6fb20b708410e2b602da5c3d
7
+ data.tar.gz: a8802ced6c6dcb06136c967bf5c074da02e4b4c9571eafb3850e940c67b5fb0e2892a47f64b7630827390e81674ac0f96933926d015d127f711b579e70463b25
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_flow (0.2.1)
4
+ i18n_flow (0.2.2)
5
5
  psych (>= 3.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  module I18nFlow
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- REVISION = 1
4
+ REVISION = 2
5
5
 
6
6
  VERSION = [MAJOR, MINOR, REVISION].join('.')
7
7
  end
@@ -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::Scalar then node.anchor ? 1 : 0
90
- when Psych::Nodes::Mapping then node.anchor ? 1 : 2
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Iwanaga