ruby-cldr 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -7
- data/VERSION +1 -1
- data/lib/cldr/export/data/currencies.rb +2 -0
- data/ruby-cldr.gemspec +1 -1
- data/test/export/data/currencies_test.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08d81c0b6ee1d96ffa243d2ebf097de3daf26cbfdaa017e461bf57019fa6f2c3'
|
4
|
+
data.tar.gz: 623a6819224e69f397169989b3aafe7e63a348d2a2f579f4e3375d6853f2b70d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3e3a11bbf75be01de319dfe8a5941ac0c4cfe2f7d8526484de7b7ce9b4449d9bbc0edc4d857b442047f8b57e2e6c198f19532f13b1ef2b17fe3cabf84a908bb
|
7
|
+
data.tar.gz: 4c1f2d8503207ae9fdc5ec626b7441f89d98ccd505acb9ba43f536522ea9a392bd5cca2ba7ab964ee6d5dad88429571f8a97612eff83423b0ecc17da00743d5c
|
data/CHANGELOG.md
CHANGED
@@ -23,12 +23,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
23
23
|
|
24
24
|
## [Unreleased]
|
25
25
|
|
26
|
-
- Added a changelog, [#49](https://github.com/ruby-i18n/ruby-cldr/pull/49)
|
27
|
-
- Added Travis CI for testing, [#48](https://github.com/ruby-i18n/ruby-cldr/pull/48)
|
28
|
-
- Added root fallback to en language, [#47](https://github.com/ruby-i18n/ruby-cldr/pull/47)
|
29
|
-
- Added subdivisions to the list of exportable components, [#46](https://github.com/ruby-i18n/ruby-cldr/pull/46)
|
30
|
-
- Added country codes as an exportable component, [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)
|
31
|
-
|
32
26
|
---
|
33
27
|
|
34
28
|
## [0.2.0] - 2019-03-26
|
@@ -47,4 +41,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
47
41
|
- Support pluralization codes with missing spaces [#53](https://github.com/ruby-i18n/ruby-cldr/pull/53)
|
48
42
|
- Add in functionality to export country codes [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)
|
49
43
|
|
50
|
-
[
|
44
|
+
## [0.5.0] - 2020-11-20
|
45
|
+
|
46
|
+
- Added a changelog, [#49](https://github.com/ruby-i18n/ruby-cldr/pull/49)
|
47
|
+
- Added Travis CI for testing, [#48](https://github.com/ruby-i18n/ruby-cldr/pull/48)
|
48
|
+
- Added root fallback to en language, [#47](https://github.com/ruby-i18n/ruby-cldr/pull/47)
|
49
|
+
- Added subdivisions to the list of exportable components, [#46](https://github.com/ruby-i18n/ruby-cldr/pull/46)
|
50
|
+
- Added country codes as an exportable component, [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)
|
51
|
+
- Added narrow symbols to exported currency data, [#64](https://github.com/ruby-i18n/ruby-cldr/pull/64)
|
52
|
+
|
53
|
+
[Unreleased]: https://github.com/ruby-i18n/ruby-cldr/compare/v0.5.0...HEAD
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
@@ -31,7 +31,9 @@ module Cldr
|
|
31
31
|
end
|
32
32
|
|
33
33
|
symbol = select(node, 'symbol')
|
34
|
+
narrow_symbol = symbol.select { |child_node| child_node.values.include?('narrow') }.first
|
34
35
|
data[:symbol] = symbol.first.content if symbol.length > 0
|
36
|
+
data[:'narrow_symbol'] = narrow_symbol.content unless narrow_symbol.nil?
|
35
37
|
|
36
38
|
data
|
37
39
|
end
|
data/ruby-cldr.gemspec
CHANGED
@@ -36,7 +36,12 @@ class TestCldrCurrencies < Test::Unit::TestCase
|
|
36
36
|
currencies = Cldr::Export::Data::Currencies.new('de')[:currencies]
|
37
37
|
assert_empty codes - currencies.keys, "Unexpected missing currencies"
|
38
38
|
assert_empty currencies.keys - codes, "Unexpected extra currencies"
|
39
|
-
assert_equal({ :name => 'Euro', :one => 'Euro', :other => 'Euro', :symbol => '€' }, currencies[:EUR])
|
39
|
+
assert_equal({ :name => 'Euro', :'narrow_symbol'=>'€', :one => 'Euro', :other => 'Euro', :symbol => '€' }, currencies[:EUR])
|
40
|
+
end
|
41
|
+
|
42
|
+
test 'currencies populates symbol-narrow when narrow symbol is not equal to the regular symbol' do
|
43
|
+
currencies = Cldr::Export::Data::Currencies.new('root')[:currencies]
|
44
|
+
assert_equal({ :symbol=>'US$', :'narrow_symbol'=>'$'}, currencies[:USD])
|
40
45
|
end
|
41
46
|
|
42
47
|
test 'currencies uses the label to populate :one when count is unavailable' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-cldr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Fuchs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|