annotate_yaml 0.0.2 → 0.0.3

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: c8af3f584ce0b6195aae0a48e4ca78dc9494c5d8
4
- data.tar.gz: f4f95b02260107b3f19fc69bfa3aef3ca74a906e
3
+ metadata.gz: f250ace0e7a275aa4aa88857e1fc928b5ba6dd4f
4
+ data.tar.gz: 0140c49db858f2f70f2dd52f17052b1f5647c917
5
5
  SHA512:
6
- metadata.gz: 1a0b8b542fd0725766f052941bc62e4bbf409a6f99baa86e62f97696ecb22dd517f334d2f3afd0cf62e5cd8d27f9f6a9b8721fa33898e8f8a45990e7e77e012f
7
- data.tar.gz: 76eec6b450f0c03e306b54cf756fed05a438b4d3c41683a3647b16d18c71ba75281614f92161d257e8461296bd91f4189f2d28d7dafd2b487a588c8bffdba03b
6
+ metadata.gz: 3a38d9e5750a221993df700f66e4b5282ac02697959eff2f0616c7acbd59171491423dd9cea6353c735bfefebb0a291da9e16b77cf937e6fa51db12e1d747818
7
+ data.tar.gz: 7ffa722bea2d770fa5551ee09b0abc14ab0a2eed9bb169bd7191dc22a40ba5254e6dc3de92334d8ab8d1c318f7263be960846632f4d8a71cbf22181aca0d679e
data/README.md CHANGED
@@ -1,6 +1,56 @@
1
1
  # AnnotateYaml
2
2
 
3
- TODO: Write a gem description
3
+ Have you never been bored to scroll up an entire YAML structure to find out how to access the value?
4
+
5
+ Fear no more, here is this marvellous gem which add comment to each value of your YAML files so you can easily use it in your views or wherever you may need it.
6
+
7
+ ## Quick Exemple
8
+
9
+ Let's say you want to use the quadrillion value of this file, what is its key?
10
+
11
+ en:
12
+ number:
13
+ format:
14
+ delimiter: ! ','
15
+ precision: 3
16
+ separator: .
17
+ significant: false
18
+ strip_insignificant_zeros: false
19
+ [...]
20
+ human:
21
+ decimal_units:
22
+ format: ! '%n %u'
23
+ units:
24
+ billion: Billion
25
+ million: Million
26
+ quadrillion: Quadrillion
27
+ thousand: Thousand
28
+ trillion: Trillion
29
+ unit: ''
30
+
31
+ With annotate_yaml your YAML file will look like this:
32
+
33
+ en:
34
+ number:
35
+ format:
36
+ delimiter: ! ',' # en.number.format.delimiter
37
+ precision: 3 # en.number.format.precision
38
+ separator: . # en.number.format.separator
39
+ significant: false # en.number.format.significant
40
+ strip_insignificant_zeros: false # en.number.format.strip_insignificant_zeros
41
+ [...]
42
+ human:
43
+ decimal_units:
44
+ format: ! '%n %u' # en.number.human.decimal_units.format
45
+ units:
46
+ billion: Billion # en.number.human.decimal_units.units.billion
47
+ million: Million # en.number.human.decimal_units.units.million
48
+ quadrillion: Quadrillion # en.number.human.decimal_units.units.quadrillion
49
+ thousand: Thousand # en.number.human.decimal_units.units.thousand
50
+ trillion: Trillion # en.number.human.decimal_units.units.trillion
51
+ unit: '' # en.number.human.decimal_units.units.unit
52
+
53
+ Now you know the key is `number.human.decimal_units.units.quadrillion`, thanks annotate_yaml!
4
54
 
5
55
  ## Installation
6
56
 
@@ -18,7 +68,11 @@ Or install it yourself as:
18
68
 
19
69
  ## Usage
20
70
 
21
- TODO: Write usage instructions here
71
+ To annotate your locales run:
72
+
73
+ `rake annotate:yaml:locales`
74
+
75
+ This will add a commented key to access each value of the YAML file.
22
76
 
23
77
  ## Contributing
24
78
 
@@ -1,3 +1,3 @@
1
1
  module AnnotateYaml
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotate_yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre URBAN