ru_propisju 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -7
- data/lib/ru_propisju.rb +7 -7
- data/ru_propisju.gemspec +4 -4
- data/test/test_ru_propisju.rb +5 -1
- metadata +65 -40
data/History.txt
CHANGED
@@ -1,29 +1,33 @@
|
|
1
|
-
=== 2.1.
|
1
|
+
=== 2.1.3
|
2
|
+
|
3
|
+
* Починен порядок тысячных долей на ruby 1.8x
|
4
|
+
|
5
|
+
=== 2.1.2
|
2
6
|
|
3
7
|
* Починено https://github.com/julik/ru_propisju/issues/5
|
4
8
|
|
5
|
-
=== 2.1.1
|
9
|
+
=== 2.1.1
|
6
10
|
|
7
11
|
* Починено https://github.com/julik/ru_propisju/issues/3
|
8
12
|
|
9
|
-
=== 2.1.0
|
13
|
+
=== 2.1.0
|
10
14
|
|
11
15
|
* Восстановлен старый API для choose_plural
|
12
16
|
* Добавлено исключение UnknownLocale
|
13
17
|
|
14
|
-
=== 2.0.0
|
18
|
+
=== 2.0.0
|
15
19
|
|
16
20
|
* Добавлена поддержка украинского языка - iz65535
|
17
21
|
|
18
|
-
=== 1.2.0
|
22
|
+
=== 1.2.0
|
19
23
|
|
20
24
|
* Добавлена поддержка И Еще Нескольких Валют (тм) - terraplane
|
21
25
|
|
22
|
-
=== 1.1.0
|
26
|
+
=== 1.1.0
|
23
27
|
|
24
28
|
* На самом деле количество копеек пишется цифрами
|
25
29
|
|
26
|
-
=== 1.0.0
|
30
|
+
=== 1.0.0
|
27
31
|
|
28
32
|
* Модуль вынут из RuTils
|
29
33
|
|
data/lib/ru_propisju.rb
CHANGED
@@ -6,7 +6,7 @@ $KCODE = 'u' if RUBY_VERSION < '1.9.0'
|
|
6
6
|
# RuPropisju.rublej(123) # "сто двадцать три рубля"
|
7
7
|
module RuPropisju
|
8
8
|
|
9
|
-
VERSION = '2.1.
|
9
|
+
VERSION = '2.1.3'
|
10
10
|
|
11
11
|
# http://www.xe.com/symbols.php
|
12
12
|
# (лица, приближенные форексам и всяким там валютам и курсам)
|
@@ -437,12 +437,12 @@ module RuPropisju
|
|
437
437
|
|
438
438
|
locale_root = pick_locale(TRANSLATIONS, locale)
|
439
439
|
|
440
|
-
fractions =
|
441
|
-
:trillions
|
442
|
-
:billions
|
443
|
-
:millions
|
444
|
-
:thousands
|
445
|
-
|
440
|
+
fractions = [
|
441
|
+
[:trillions, 1_000_000_000_000],
|
442
|
+
[:billions, 1_000_000_000],
|
443
|
+
[:millions, 1_000_000],
|
444
|
+
[:thousands, 1_000],
|
445
|
+
]
|
446
446
|
|
447
447
|
parts = fractions.map do | name, multiplier |
|
448
448
|
[name, fraction = (amount / multiplier) % 1000]
|
data/ru_propisju.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ru_propisju"
|
8
|
-
s.version = "2.1.
|
8
|
+
s.version = "2.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julik Tarkhanov"]
|
12
|
-
s.date = "2012-03-
|
12
|
+
s.date = "2012-03-30"
|
13
13
|
s.email = "me@julik.nl"
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
@@ -26,8 +26,8 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.homepage = "http://github.com/julik/ru_propisju"
|
27
27
|
s.licenses = ["MIT"]
|
28
28
|
s.require_paths = ["lib"]
|
29
|
-
s.rubygems_version = "1.8.
|
30
|
-
s.summary = "C\
|
29
|
+
s.rubygems_version = "1.8.16"
|
30
|
+
s.summary = "C\321\203\320\274\320\274\320\260 \320\277\321\200\320\276\320\277\320\270\321\201\321\214\321\216"
|
31
31
|
|
32
32
|
if s.respond_to? :specification_version then
|
33
33
|
s.specification_version = 3
|
data/test/test_ru_propisju.rb
CHANGED
@@ -47,7 +47,11 @@ class TestRuPropisju < Test::Unit::TestCase
|
|
47
47
|
assert_equal "сто двадцать один евро четыре цента", RuPropisju.evro(121.04)
|
48
48
|
assert_equal "сто двадцять один євро чотири євроцента", RuPropisju.evro(121.04, :ua)
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
|
+
def test_thousands_and_millions
|
52
|
+
assert_equal "два миллиона сто тысяч рублей", RuPropisju.amount_in_words(2100000, :rur)
|
53
|
+
end
|
54
|
+
|
51
55
|
def test_propisju_for_ints
|
52
56
|
assert_equal "пятьсот двадцать три", RuPropisju.propisju(523, 1)
|
53
57
|
assert_equal "шесть тысяч семьсот двадцать семь", RuPropisju.propisju(6727, 1)
|
metadata
CHANGED
@@ -1,45 +1,59 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ru_propisju
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 1
|
9
|
+
- 3
|
10
|
+
version: 2.1.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Julik Tarkhanov
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
requirement: &3876260 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
17
|
+
|
18
|
+
date: 2012-03-30 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
22
21
|
type: :development
|
23
|
-
|
24
|
-
version_requirements: *3876260
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rake
|
27
|
-
requirement: &3875960 !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
28
23
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
prerelease: false
|
32
|
+
requirement: *id001
|
33
|
+
name: jeweler
|
34
|
+
- !ruby/object:Gem::Dependency
|
33
35
|
type: :development
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
hash: 3
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
version: "0"
|
34
45
|
prerelease: false
|
35
|
-
|
46
|
+
requirement: *id002
|
47
|
+
name: rake
|
36
48
|
description:
|
37
49
|
email: me@julik.nl
|
38
50
|
executables: []
|
51
|
+
|
39
52
|
extensions: []
|
40
|
-
|
53
|
+
|
54
|
+
extra_rdoc_files:
|
41
55
|
- README.rdoc
|
42
|
-
files:
|
56
|
+
files:
|
43
57
|
- Gemfile
|
44
58
|
- History.txt
|
45
59
|
- README.rdoc
|
@@ -48,28 +62,39 @@ files:
|
|
48
62
|
- ru_propisju.gemspec
|
49
63
|
- test/test_ru_propisju.rb
|
50
64
|
homepage: http://github.com/julik/ru_propisju
|
51
|
-
licenses:
|
65
|
+
licenses:
|
52
66
|
- MIT
|
53
67
|
post_install_message:
|
54
68
|
rdoc_options: []
|
55
|
-
|
69
|
+
|
70
|
+
require_paths:
|
56
71
|
- lib
|
57
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
73
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 3
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
82
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
69
90
|
requirements: []
|
91
|
+
|
70
92
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.8.
|
93
|
+
rubygems_version: 1.8.16
|
72
94
|
signing_key:
|
73
95
|
specification_version: 3
|
74
|
-
summary:
|
96
|
+
summary: !binary |
|
97
|
+
Q9GD0LzQvNCwINC/0YDQvtC/0LjRgdGM0Y4=
|
98
|
+
|
75
99
|
test_files: []
|
100
|
+
|