ordinalize_full 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ordinalize_full.rb +2 -0
- data/lib/ordinalize_full/locales/it.yml +102 -0
- data/ordinalize_full.gemspec +1 -1
- data/spec/ordinalize_full_spec.rb +7 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c4ec1c859df34e7e1fc4406dc770305b8edacbe
|
4
|
+
data.tar.gz: 4489967b56b7b24185081858c528ec1b1d273790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28177340ea0e2048af4b6c13b3653e19266331ff1b3a349df2ea05befacbaf9da034e2d075f9d008be9512e3a37f82fa5e77d8e3c6088da13c60998b7dc44123
|
7
|
+
data.tar.gz: 4fda783b4bcd3e7440c64883e2dfef93056a9dd05bdd31f5ee36c190ddcf9cc4ec2d0f861ab2ca4857d69a7f77abb94aa24a9c24cea5bd1640fc6daa3e00020e
|
data/README.md
CHANGED
@@ -40,5 +40,5 @@ MyIntegerLikeClass.new.ordinalize_in_full #=> "forty second"
|
|
40
40
|
## Limitations
|
41
41
|
|
42
42
|
- only works up to 100 (for now)
|
43
|
-
- locales only available in English and
|
43
|
+
- locales only available in English, French and Italian (pull requests welcome!)
|
44
44
|
|
data/lib/ordinalize_full.rb
CHANGED
@@ -0,0 +1,102 @@
|
|
1
|
+
it:
|
2
|
+
ordinalize_full:
|
3
|
+
n_1: primo
|
4
|
+
n_2: secondo
|
5
|
+
n_3: terzo
|
6
|
+
n_4: quarto
|
7
|
+
n_5: quinto
|
8
|
+
n_6: sesto
|
9
|
+
n_7: settimo
|
10
|
+
n_8: ottavo
|
11
|
+
n_9: nono
|
12
|
+
n_10: decimo
|
13
|
+
n_11: undicesimo
|
14
|
+
n_12: dodicesimo
|
15
|
+
n_13: tredicesimo
|
16
|
+
n_14: quattordicesimo
|
17
|
+
n_15: quindicesimo
|
18
|
+
n_16: sedicesimo
|
19
|
+
n_17: diciassettesimo
|
20
|
+
n_18: diciottesimo
|
21
|
+
n_19: diciannovesimo
|
22
|
+
n_20: ventesimo
|
23
|
+
n_21: ventunesimo
|
24
|
+
n_22: ventiduesima
|
25
|
+
n_23: ventitreesima
|
26
|
+
n_24: ventiquattresimo
|
27
|
+
n_25: venticinque
|
28
|
+
n_26: ventiseisima
|
29
|
+
n_27: ventisettesimo
|
30
|
+
n_28: ventiottesimo
|
31
|
+
n_29: ventinovesimo
|
32
|
+
n_30: trentesimo
|
33
|
+
n_31: trentunesimo
|
34
|
+
n_32: trentiduesima
|
35
|
+
n_33: trentitreesime
|
36
|
+
n_34: trentiquattresimo
|
37
|
+
n_35: trenticinquesima
|
38
|
+
n_36: trentiseisime
|
39
|
+
n_37: trentisettesime
|
40
|
+
n_38: trentiottesima
|
41
|
+
n_39: trentinovesima
|
42
|
+
n_40: quarantesimo
|
43
|
+
n_41: quarantunesima
|
44
|
+
n_42: quarantiduesime
|
45
|
+
n_43: quarantitreesimo
|
46
|
+
n_44: quarantiquattresimo
|
47
|
+
n_45: quaranticinquesima
|
48
|
+
n_46: quarantiseisime
|
49
|
+
n_47: quarantisettesima
|
50
|
+
n_48: quarantiottesimo
|
51
|
+
n_49: quarantinovesima
|
52
|
+
n_50: cinquantesimo
|
53
|
+
n_51: cinquantunesima
|
54
|
+
n_52: cinquantiduesimo
|
55
|
+
n_53: cinquantitreesime
|
56
|
+
n_54: cinquantiquattresimo
|
57
|
+
n_55: cinquanticinquesima
|
58
|
+
n_56: cinquantiseisimo
|
59
|
+
n_57: cinquantisettesime
|
60
|
+
n_58: cinquantiottesime
|
61
|
+
n_59: cinquantinovesima
|
62
|
+
n_60: sessantesimo
|
63
|
+
n_61: sessantunesimo
|
64
|
+
n_62: sessantiduesima
|
65
|
+
n_63: sessantitreesima
|
66
|
+
n_64: sessantiquattresime
|
67
|
+
n_65: sessanticinquesime
|
68
|
+
n_66: sessantiseisimo
|
69
|
+
n_67: sessantisettesima
|
70
|
+
n_68: sessantiottesimo
|
71
|
+
n_69: sessantinovesime
|
72
|
+
n_70: settantesimo
|
73
|
+
n_71: settantunesime
|
74
|
+
n_72: settantiduesime
|
75
|
+
n_73: settantitreesime
|
76
|
+
n_74: settantiquattresima
|
77
|
+
n_75: settanticinquesime
|
78
|
+
n_76: settantiseisimo
|
79
|
+
n_77: settantisettesima
|
80
|
+
n_78: settantiottesime
|
81
|
+
n_79: settantinovesime
|
82
|
+
n_80: ottantesimo
|
83
|
+
n_81: ottantunesime
|
84
|
+
n_82: ottantiduesimo
|
85
|
+
n_83: ottantitreesima
|
86
|
+
n_84: ottantiquattresimo
|
87
|
+
n_85: ottanticinquesime
|
88
|
+
n_86: ottantiseisima
|
89
|
+
n_87: ottantisettesime
|
90
|
+
n_88: ottantiottesimo
|
91
|
+
n_89: ottantinovesimo
|
92
|
+
n_90: novantesimo
|
93
|
+
n_91: novantunesimo
|
94
|
+
n_92: novantiduesimo
|
95
|
+
n_93: novantitreesima
|
96
|
+
n_94: novantiquattresime
|
97
|
+
n_95: novanticinquesima
|
98
|
+
n_96: novantiseisima
|
99
|
+
n_97: novantisettesimo
|
100
|
+
n_98: novantiottesimo
|
101
|
+
n_99: novantinovesime
|
102
|
+
n_100: centesimo
|
data/ordinalize_full.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "ordinalize_full"
|
7
|
-
spec.version = "1.
|
7
|
+
spec.version = "1.2.0"
|
8
8
|
spec.authors = ["Cédric Félizard"]
|
9
9
|
spec.email = ["cedric@felizard.fr"]
|
10
10
|
spec.summary = %q{Turns a number into an ordinal string such as first, second, third or 1st, 2nd, 3rd.}
|
@@ -41,6 +41,13 @@ describe OrdinalizeFull do
|
|
41
41
|
specify { expect(1.ordinalize(in_full: false)).to eq("1er") }
|
42
42
|
end
|
43
43
|
|
44
|
+
context "with locale = :it" do
|
45
|
+
before { I18n.locale = :it }
|
46
|
+
|
47
|
+
specify { expect(1.ordinalize(in_full: true)).to eq("primo") }
|
48
|
+
specify { expect(1.ordinalize(in_full: false)).to eq("1°") }
|
49
|
+
end
|
50
|
+
|
44
51
|
it "raises for unknown locales" do
|
45
52
|
I18n.locale = :zz
|
46
53
|
expect { 1.ordinalize(in_full: false) }.to raise_error(NotImplementedError)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ordinalize_full
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cédric Félizard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/ordinalize_full/integer.rb
|
85
85
|
- lib/ordinalize_full/locales/en.yml
|
86
86
|
- lib/ordinalize_full/locales/fr.yml
|
87
|
+
- lib/ordinalize_full/locales/it.yml
|
87
88
|
- ordinalize_full.gemspec
|
88
89
|
- spec/ordinalize_full_spec.rb
|
89
90
|
homepage: https://github.com/infertux/ordinalize_full
|