twitter_cldr 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/History.txt +4 -0
  2. data/Rakefile +8 -3
  3. data/lib/twitter_cldr/collation/collator.rb +9 -11
  4. data/lib/twitter_cldr/collation/trie.rb +8 -0
  5. data/lib/twitter_cldr/collation/trie_builder.rb +12 -15
  6. data/lib/twitter_cldr/collation/trie_loader.rb +50 -0
  7. data/lib/twitter_cldr/collation/trie_with_fallback.rb +6 -4
  8. data/lib/twitter_cldr/collation.rb +1 -0
  9. data/lib/twitter_cldr/resources/tailoring_importer.rb +203 -0
  10. data/lib/twitter_cldr/resources/tries_dumper.rb +43 -0
  11. data/lib/twitter_cldr/resources.rb +3 -2
  12. data/lib/twitter_cldr/version.rb +1 -1
  13. data/resources/collation/tries/af.dump +0 -0
  14. data/resources/collation/tries/ar.dump +0 -0
  15. data/resources/collation/tries/ca.dump +0 -0
  16. data/resources/collation/tries/cs.dump +0 -0
  17. data/resources/collation/tries/da.dump +0 -0
  18. data/resources/collation/tries/de.dump +0 -0
  19. data/resources/collation/tries/default.dump +0 -0
  20. data/resources/collation/tries/el.dump +0 -0
  21. data/resources/collation/tries/en.dump +0 -0
  22. data/resources/collation/tries/es.dump +0 -0
  23. data/resources/collation/tries/eu.dump +0 -0
  24. data/resources/collation/tries/fa.dump +0 -0
  25. data/resources/collation/tries/fi.dump +0 -0
  26. data/resources/collation/tries/fil.dump +0 -0
  27. data/resources/collation/tries/fr.dump +0 -0
  28. data/resources/collation/tries/he.dump +0 -0
  29. data/resources/collation/tries/hi.dump +0 -0
  30. data/resources/collation/tries/hu.dump +0 -0
  31. data/resources/collation/tries/id.dump +0 -0
  32. data/resources/collation/tries/it.dump +0 -0
  33. data/resources/collation/tries/ja.dump +0 -0
  34. data/resources/collation/tries/ko.dump +0 -0
  35. data/resources/collation/tries/ms.dump +0 -0
  36. data/resources/collation/tries/nb.dump +0 -0
  37. data/resources/collation/tries/nl.dump +0 -0
  38. data/resources/collation/tries/pl.dump +0 -0
  39. data/resources/collation/tries/pt.dump +0 -0
  40. data/resources/collation/tries/ru.dump +0 -0
  41. data/resources/collation/tries/sv.dump +0 -0
  42. data/resources/collation/tries/th.dump +0 -0
  43. data/resources/collation/tries/tr.dump +0 -0
  44. data/resources/collation/tries/uk.dump +0 -0
  45. data/resources/collation/tries/ur.dump +0 -0
  46. data/resources/collation/tries/zh-Hant.dump +0 -0
  47. data/resources/collation/tries/zh.dump +0 -0
  48. data/spec/collation/collation_spec.rb +4 -2
  49. data/spec/collation/collator_spec.rb +36 -30
  50. data/spec/collation/tailoring_spec.rb +3 -1
  51. data/spec/collation/tailoring_tests/ja.txt +6 -5
  52. data/spec/collation/trie_builder_spec.rb +21 -26
  53. data/spec/collation/trie_dumps_spec.rb +26 -0
  54. data/spec/collation/trie_loader_spec.rb +72 -0
  55. data/spec/collation/trie_spec.rb +14 -0
  56. data/spec/collation/trie_with_fallback_spec.rb +6 -0
  57. data/spec/normalization/normalization_spec.rb +2 -2
  58. metadata +43 -21
  59. data/lib/twitter_cldr/resources/import/tailoring.rb +0 -202
  60. data/lib/twitter_cldr/resources/import.rb +0 -12
@@ -11,53 +11,52 @@ describe Collator do
11
11
 
12
12
  let(:trie) { Trie.new }
13
13
 
14
- before(:each) { clear_fce_tries_cache }
15
- after(:all) { clear_fce_tries_cache }
14
+ before(:each) { clear_tries_cache }
15
+ after(:all) { clear_tries_cache }
16
16
 
17
- describe '.default_fce_trie' do
17
+ describe '.default_trie' do
18
18
  before(:each) do
19
- clear_default_fce_trie_cache
20
- mock(TrieBuilder).load_trie(Collator::FRACTIONAL_UCA_SHORT_RESOURCE) { trie }
19
+ clear_default_trie_cache
20
+ mock(TrieLoader).load_default_trie { trie }
21
21
  end
22
22
 
23
23
  it 'returns default fractional collation elements trie' do
24
- Collator.default_fce_trie.should == trie
24
+ Collator.default_trie.should == trie
25
25
  end
26
26
 
27
27
  it 'loads the trie only once' do
28
- Collator.default_fce_trie.object_id.should == Collator.default_fce_trie.object_id
28
+ Collator.default_trie.object_id.should == Collator.default_trie.object_id
29
29
  end
30
30
 
31
31
  it 'locks the trie' do
32
- Collator.default_fce_trie.should be_locked
32
+ Collator.default_trie.should be_locked
33
33
  end
34
34
  end
35
35
 
36
- describe '.tailored_fce_trie' do
36
+ describe '.tailored_trie' do
37
37
  let(:locale) { :ru }
38
38
 
39
39
  before(:each) do
40
- clear_tailored_fce_tries_cache
41
- stub(Collator).default_fce_trie { trie }
42
- mock(TrieBuilder).load_tailored_trie(locale, Collator.default_fce_trie) { trie }
40
+ clear_tailored_tries_cache
41
+ stub(Collator).default_trie { trie }
42
+ mock(TrieLoader).load_tailored_trie(locale, Collator.default_trie) { trie }
43
43
  end
44
44
 
45
45
  it 'returns default fractional collation elements trie' do
46
- Collator.tailored_fce_trie(locale).should == trie
46
+ Collator.tailored_trie(locale).should == trie
47
47
  end
48
48
 
49
49
  it 'loads the trie only once' do
50
- Collator.tailored_fce_trie(locale).object_id.should == Collator.tailored_fce_trie(locale).object_id
50
+ Collator.tailored_trie(locale).object_id.should == Collator.tailored_trie(locale).object_id
51
51
  end
52
52
 
53
53
  it 'locks the trie' do
54
- Collator.tailored_fce_trie(locale).should be_locked
54
+ Collator.tailored_trie(locale).should be_locked
55
55
  end
56
56
  end
57
57
 
58
58
  describe '#initialize' do
59
59
  before :each do
60
- stub(TrieBuilder).load_trie { trie }
61
60
  any_instance_of(Collator) { |c| stub(c).load_trie { trie } }
62
61
  end
63
62
 
@@ -106,7 +105,7 @@ describe Collator do
106
105
  let(:collation_elements) { [[39, 5, 5], [41, 5, 5], [43, 5, 5]] }
107
106
  let(:sort_key) { [39, 41, 43, 1, 7, 1, 7] }
108
107
 
109
- before(:each) { stub(TrieBuilder).load_trie { trie } }
108
+ before(:each) { mock(TrieLoader).load_default_trie { trie } }
110
109
 
111
110
  describe 'calculating sort key' do
112
111
  before(:each) { mock(TwitterCldr::Collation::SortKeyBuilder).build(collation_elements, nil) { sort_key } }
@@ -127,7 +126,7 @@ describe Collator do
127
126
  let(:locale) { :uk }
128
127
 
129
128
  it 'passes case-first sort option to sort key builder' do
130
- mock(TwitterCldr::Collation::TrieBuilder).load_tailored_trie(locale, trie) { Trie.new }
129
+ mock(TwitterCldr::Collation::TrieLoader).load_tailored_trie(locale, trie) { Trie.new }
131
130
  mock(TwitterCldr::Collation::TrieBuilder).tailoring_data(locale) { { :collator_options => { :case_first => case_first } } }
132
131
 
133
132
  collator = Collator.new(locale)
@@ -145,7 +144,7 @@ describe Collator do
145
144
  let(:sort_key) { [1, 3, 8, 9] }
146
145
  let(:another_sort_key) { [6, 8, 9, 2] }
147
146
 
148
- before(:each) { stub(Collator).default_fce_trie { trie } }
147
+ before(:each) { stub(Collator).default_trie { trie } }
149
148
 
150
149
  it 'compares strings by sort keys' do
151
150
  stub_sort_key(collator, 'foo', sort_key)
@@ -169,7 +168,7 @@ describe Collator do
169
168
  let(:sorted) { %w[aaa abc bca] }
170
169
 
171
170
  before :each do
172
- stub(Collator).default_fce_trie { trie }
171
+ stub(Collator).default_trie { trie }
173
172
  sort_keys.each { |s, key| mock_sort_key(collator, s, key) }
174
173
  end
175
174
 
@@ -193,9 +192,16 @@ describe Collator do
193
192
 
194
193
  describe 'tailoring support' do
195
194
  before(:each) do
196
- stub(Collator).default_fce_trie { TrieBuilder.parse_trie(fractional_uca_short_stub) }
197
- stub(TwitterCldr::Normalization::NFD).normalize_code_points { |code_points| code_points }
198
195
  stub(TwitterCldr).get_resource(:collation, :tailoring, locale) { YAML.load(tailoring_resource_stub) }
196
+
197
+ mock(File).open(TrieBuilder::FRACTIONAL_UCA_SHORT_PATH, 'r') do |*args|
198
+ args.last.call(fractional_uca_short_stub)
199
+ end
200
+
201
+ mock(TrieLoader).load_default_trie { TrieBuilder.load_default_trie }
202
+ mock(TrieLoader).load_tailored_trie.with_any_args { |*args| TrieBuilder.load_tailored_trie(*args) }
203
+
204
+ stub(TwitterCldr::Normalization::NFD).normalize_code_points { |code_points| code_points }
199
205
  end
200
206
 
201
207
  let(:locale) { :some_locale }
@@ -231,7 +237,7 @@ describe Collator do
231
237
 
232
238
  let(:fractional_uca_short_stub) do
233
239
  <<END
234
- # collation elements from default FCE table
240
+ # collation elements from default fractional collation elements table
235
241
  0301; [, 8D, 05]
236
242
  0306; [, 91, 05]
237
243
  041A; [5C 6C, 05, 8F] # К
@@ -275,17 +281,17 @@ END
275
281
  stub(collator).get_sort_key(string) { sort_key }
276
282
  end
277
283
 
278
- def clear_fce_tries_cache
279
- clear_default_fce_trie_cache
280
- clear_tailored_fce_tries_cache
284
+ def clear_tries_cache
285
+ clear_default_trie_cache
286
+ clear_tailored_tries_cache
281
287
  end
282
288
 
283
- def clear_default_fce_trie_cache
284
- Collator.instance_variable_set(:@default_fce_trie, nil)
289
+ def clear_default_trie_cache
290
+ Collator.instance_variable_set(:@default_trie, nil)
285
291
  end
286
292
 
287
- def clear_tailored_fce_tries_cache
288
- Collator.instance_variable_set(:@tailored_fce_tries_cache, nil)
293
+ def clear_tailored_tries_cache
294
+ Collator.instance_variable_set(:@tailored_tries_cache, nil)
289
295
  end
290
296
 
291
297
  end
@@ -18,7 +18,9 @@ describe 'Unicode collation tailoring' do
18
18
 
19
19
  print "#{locale}\t-\t"
20
20
 
21
- lines = open(File.join(File.dirname(__FILE__), 'tailoring_tests', "#{locale}.txt")) { |f| f.lines.map(&:strip) }
21
+ lines = File.open(File.join(File.dirname(__FILE__), 'tailoring_tests', "#{locale}.txt")) do |file|
22
+ file.lines.map(&:strip)
23
+ end
22
24
 
23
25
  active_tests = lines.count(&method(:tailoring_test?))
24
26
  pending_tests = lines.count(&method(:pending_tailoring_test?))
@@ -3,11 +3,12 @@
3
3
  # [[2, "x ", "x"], [5, "X ", "X"]] - failures identical to ICU
4
4
  #
5
5
  # [156, "xゞx", "xヽ"]] - character 'ゞ', code point 0x309E, is not in NFD (its normalized version is 0x309D 0x3099),
6
- # but there is an entry for denormalized version of this string in FCE table - 309E; [0E 25, 05, 05][, DA 95, 05].
7
- # As all strings are normalized first, we don't use this entry, but instead build collation elements for this
8
- # character from CE's for 0x309D and 0x3099 that are [0E 25, 05, 05] and [, DA 95, 05]. That doesn't cause any issue
9
- # in the default locale, because the results are identical. But when 'ゝ' (code point 0x309D) is tailored from
10
- # [0E 25, 05, 05] to [0E 29, 5, 5] in JA locale we get wrong [0E 29, 05, 05][, DA 95, 05] collation elements for 'ゞ'.
6
+ # but there is an entry for denormalized version of this string in fractional collation elements table -
7
+ # 309E; [0E 25, 05, 05][, DA 95, 05]. As all strings are normalized first, we don't use this entry, but instead build
8
+ # collation elements for this character from CE's for 0x309D and 0x3099 that are [0E 25, 05, 05] and [, DA 95, 05].
9
+ # That doesn't cause any issue in the default locale, because the results are identical. But when 'ゝ' (code point 0x309D)
10
+ # is tailored from [0E 25, 05, 05] to [0E 29, 5, 5] in JA locale we get wrong [0E 29, 05, 05][, DA 95, 05] collation
11
+ # elements for 'ゞ'.
11
12
  #
12
13
 
13
14
  x ̄
@@ -9,24 +9,19 @@ include TwitterCldr::Collation
9
9
 
10
10
  describe TrieBuilder do
11
11
 
12
- describe '.parse_trie' do
13
- it 'returns a trie' do
14
- TrieBuilder.parse_trie(fractional_uca_short_stub).should be_instance_of(Trie)
15
- end
12
+ describe '.load_default_trie' do
13
+ let(:trie) { TrieBuilder.load_default_trie }
16
14
 
17
- it 'adds every collation element from the FCE table to the trie' do
18
- trie = Object.new
19
- mock(Trie).new { trie }
20
- collation_elements_table.each { |code_points, collation_elements| mock(trie).set(code_points, collation_elements) }
15
+ before(:each) { mock_default_table }
21
16
 
22
- TrieBuilder.parse_trie(fractional_uca_short_stub).should == trie
17
+ it 'returns a Trie' do
18
+ trie.should be_instance_of(Trie)
23
19
  end
24
20
 
25
- it 'populates the trie that is passed as an argument' do
26
- trie = Object.new
27
- collation_elements_table.each { |code_points, collation_elements| mock(trie).set(code_points, collation_elements) }
28
-
29
- TrieBuilder.parse_trie(fractional_uca_short_stub, trie).should == trie
21
+ it 'adds every collation element from the fractional collation elements table to the trie' do
22
+ collation_elements_table.each do |code_points, collation_elements|
23
+ trie.get(code_points).should == collation_elements
24
+ end
30
25
  end
31
26
 
32
27
  let(:fractional_uca_short_stub) do
@@ -104,15 +99,6 @@ END
104
99
  end
105
100
  end
106
101
 
107
- describe '.load_trie' do
108
- it 'load FCE table from the resource into a trie' do
109
- mock(TrieBuilder).parse_trie('fce-table') { 'trie' }
110
- mock(TrieBuilder).load_resource('resource') { 'fce-table' }
111
-
112
- TrieBuilder.load_trie('resource').should == 'trie'
113
- end
114
- end
115
-
116
102
  let(:tailoring_resource_stub) do
117
103
  <<END
118
104
  ---
@@ -130,10 +116,13 @@ END
130
116
 
131
117
  describe '.load_tailored_trie' do
132
118
  let(:locale) { :xxx }
133
- let(:fallback) { TrieBuilder.parse_trie(fractional_uca_short_stub) }
119
+ let(:fallback) { TrieBuilder.load_default_trie }
134
120
  let(:tailored_trie) { TrieBuilder.load_tailored_trie(locale, fallback) }
135
121
 
136
- before(:each) { mock(TrieBuilder).tailoring_data(locale) { tailoring_data } }
122
+ before :each do
123
+ mock_default_table
124
+ mock(TrieBuilder).tailoring_data(locale) { tailoring_data }
125
+ end
137
126
 
138
127
  it 'returns a TrieWithFallback' do
139
128
  tailored_trie.should be_instance_of(TrieWithFallback)
@@ -171,7 +160,7 @@ END
171
160
 
172
161
  let(:fractional_uca_short_stub) do
173
162
  <<END
174
- # collation elements from default FCE table
163
+ # collation elements from default fractional collation elements table
175
164
  0301; [, 8D, 05]
176
165
  0306; [, 91, 05]
177
166
  041A; [5C 6C, 05, 8F] # К
@@ -205,4 +194,10 @@ END
205
194
  end
206
195
  end
207
196
 
197
+ def mock_default_table
198
+ mock(File).open(TrieBuilder::FRACTIONAL_UCA_SHORT_PATH, 'r') do |*args|
199
+ args.last.call(fractional_uca_short_stub)
200
+ end
201
+ end
202
+
208
203
  end
@@ -0,0 +1,26 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Twitter, Inc
4
+ # http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ require 'spec_helper'
7
+
8
+ include TwitterCldr::Collation
9
+
10
+ describe 'trie dumps', :slow => true do
11
+ let(:default_trie) { TrieBuilder.load_default_trie }
12
+ let(:error_message) { 'expected trie dump to be up-to-date.' }
13
+
14
+ it 'has a valid default Fractional Collation Elements trie dump' do
15
+ TrieLoader.load_default_trie.to_hash.should(eq(default_trie.to_hash), error_message)
16
+ end
17
+
18
+ TwitterCldr.supported_locales.each do |locale|
19
+ it "has a valid tailored trie dump for #{locale} locale" do
20
+ loaded_trie = TrieLoader.load_tailored_trie(locale, Trie.new)
21
+ fresh_trie = TrieBuilder.load_tailored_trie(locale, default_trie)
22
+
23
+ loaded_trie.to_hash.should(eq(fresh_trie.to_hash), error_message)
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,72 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Twitter, Inc
4
+ # http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ require 'spec_helper'
7
+
8
+ include TwitterCldr::Collation
9
+
10
+ describe TrieLoader do
11
+
12
+ describe '.load_default_trie' do
13
+ let(:root) { 42 }
14
+ let(:trie) { Trie.new(root).tap { |t| t.lock } }
15
+ let(:trie_dump) { Marshal.dump(trie) }
16
+ let(:loaded_trie) { TrieLoader.load_default_trie }
17
+ let(:locale) { TrieLoader::DEFAULT_TRIE_LOCALE }
18
+
19
+ before(:each) { mock_trie_dump }
20
+
21
+ it 'loads a Trie' do
22
+ loaded_trie.should be_instance_of(Trie)
23
+ end
24
+
25
+ it 'loads trie root' do
26
+ loaded_trie.instance_variable_get(:@root).should == root
27
+ end
28
+
29
+ it 'loads trie as unlocked' do
30
+ loaded_trie.should_not be_locked
31
+ end
32
+ end
33
+
34
+ describe '.load_tailored_trie' do
35
+ let(:root) { 42 }
36
+ let(:original_fallback) { 13 }
37
+ let(:new_fallback) { 37 }
38
+ let(:trie) { TrieWithFallback.new(original_fallback).tap { |t| t.lock.instance_variable_set(:@root, root) } }
39
+ let(:locale) { :ru }
40
+ let(:trie_dump) { Marshal.dump(trie) }
41
+ let(:loaded_trie) { TrieLoader.load_tailored_trie(locale, new_fallback) }
42
+
43
+ before(:each) { mock_trie_dump }
44
+
45
+ it 'loads a TrieWithFallback' do
46
+ loaded_trie.should be_instance_of(TrieWithFallback)
47
+ end
48
+
49
+ it 'loads trie root' do
50
+ loaded_trie.instance_variable_get(:@root).should == root
51
+ end
52
+
53
+ it 'loads trie as unlocked' do
54
+ loaded_trie.should_not be_locked
55
+ end
56
+
57
+ it 'sets trie fallback' do
58
+ loaded_trie.fallback.should == new_fallback
59
+ end
60
+ end
61
+
62
+ describe '.dump_path' do
63
+ it 'returns path to a trie dump for a specific locale' do
64
+ TrieLoader.dump_path(:foo).should == File.join(TwitterCldr::RESOURCES_DIR, 'collation', 'tries', 'foo.dump')
65
+ end
66
+ end
67
+
68
+ def mock_trie_dump
69
+ mock(File).open(TrieLoader.dump_path(locale), 'r') { |*args| args.last.call(trie_dump) }
70
+ end
71
+
72
+ end
@@ -225,6 +225,20 @@ describe Trie do
225
225
 
226
226
  end
227
227
 
228
+ describe 'marshaling' do
229
+ it 'dumps trie structure' do
230
+ trie = Trie.new
231
+ trie.add([13, 37], 1337)
232
+ trie.add([42], 42)
233
+
234
+ Marshal.load(Marshal.dump(trie)).to_hash.should == { 42 => [42, {}], 13 => [nil, { 37 => [1337, {}] }] }
235
+ end
236
+
237
+ it 'does not dump locked state' do
238
+ Marshal.load(Marshal.dump(Trie.new.lock)).should_not be_locked
239
+ end
240
+ end
241
+
228
242
  describe Trie::Node do
229
243
 
230
244
  let(:node) { Trie::Node.new }
@@ -38,4 +38,10 @@ describe TrieWithFallback do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'marshaling' do
42
+ it 'does not dump fallback' do
43
+ Marshal.load(Marshal.dump(TrieWithFallback.new(Trie.new))).fallback.should be_nil
44
+ end
45
+ end
46
+
41
47
  end
@@ -59,7 +59,7 @@ describe 'Unicode Normalization Algorithms' do
59
59
  # normalization function. Note, how expectation and tests columns indexes match the numbers in the `invariants` hash.
60
60
  #
61
61
  def run_test(normalizer, invariants, file_path)
62
- open(file_path, 'r:UTF-8') do |file|
62
+ File.open(file_path, 'r:UTF-8') do |file|
63
63
  file.each do |line|
64
64
  next if line.empty? || line =~ /^(@|#)/
65
65
 
@@ -98,7 +98,7 @@ Got: #{normalized.inspect}
98
98
  return if File.file?(FULL_NORMALIZATION_TEST_PATH)
99
99
 
100
100
  print ' Downloading NormalizationTest.txt ... '
101
- open(FULL_NORMALIZATION_TEST_PATH, 'w') { |file| file.write(open(FULL_NORMALIZATION_TEST_URL).read) }
101
+ File.open(FULL_NORMALIZATION_TEST_PATH, 'w') { |file| file.write(open(FULL_NORMALIZATION_TEST_URL).read) }
102
102
  puts 'done.'
103
103
  end
104
104
 
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_cldr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 6
9
- - 1
10
- version: 1.6.1
5
+ version: 1.6.2
11
6
  platform: ruby
12
7
  authors:
13
8
  - Cameron Dutro
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2012-07-19 00:00:00 Z
13
+ date: 2012-07-23 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: json
@@ -25,11 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- hash: 1
29
- segments:
30
- - 1
31
- - 1
32
- - 9
33
23
  version: 1.1.9
34
24
  type: :runtime
35
25
  version_requirements: *id001
@@ -66,6 +56,7 @@ files:
66
56
  - lib/twitter_cldr/collation/sort_key_builder.rb
67
57
  - lib/twitter_cldr/collation/trie.rb
68
58
  - lib/twitter_cldr/collation/trie_builder.rb
59
+ - lib/twitter_cldr/collation/trie_loader.rb
69
60
  - lib/twitter_cldr/collation/trie_with_fallback.rb
70
61
  - lib/twitter_cldr/collation.rb
71
62
  - lib/twitter_cldr/core_ext/array.rb
@@ -105,9 +96,9 @@ files:
105
96
  - lib/twitter_cldr/normalization/nfkc.rb
106
97
  - lib/twitter_cldr/normalization/nfkd.rb
107
98
  - lib/twitter_cldr/normalization.rb
108
- - lib/twitter_cldr/resources/import/tailoring.rb
109
- - lib/twitter_cldr/resources/import.rb
110
99
  - lib/twitter_cldr/resources/loader.rb
100
+ - lib/twitter_cldr/resources/tailoring_importer.rb
101
+ - lib/twitter_cldr/resources/tries_dumper.rb
111
102
  - lib/twitter_cldr/resources.rb
112
103
  - lib/twitter_cldr/shared/calendar.rb
113
104
  - lib/twitter_cldr/shared/code_point.rb
@@ -171,6 +162,8 @@ files:
171
162
  - spec/collation/tailoring_tests/zh-Hant.txt
172
163
  - spec/collation/tailoring_tests/zh.txt
173
164
  - spec/collation/trie_builder_spec.rb
165
+ - spec/collation/trie_dumps_spec.rb
166
+ - spec/collation/trie_loader_spec.rb
174
167
  - spec/collation/trie_spec.rb
175
168
  - spec/collation/trie_with_fallback_spec.rb
176
169
  - spec/core_ext/array_spec.rb
@@ -255,6 +248,41 @@ files:
255
248
  - resources/collation/tailoring/ur.yml
256
249
  - resources/collation/tailoring/zh-Hant.yml
257
250
  - resources/collation/tailoring/zh.yml
251
+ - resources/collation/tries/af.dump
252
+ - resources/collation/tries/ar.dump
253
+ - resources/collation/tries/ca.dump
254
+ - resources/collation/tries/cs.dump
255
+ - resources/collation/tries/da.dump
256
+ - resources/collation/tries/de.dump
257
+ - resources/collation/tries/default.dump
258
+ - resources/collation/tries/el.dump
259
+ - resources/collation/tries/en.dump
260
+ - resources/collation/tries/es.dump
261
+ - resources/collation/tries/eu.dump
262
+ - resources/collation/tries/fa.dump
263
+ - resources/collation/tries/fi.dump
264
+ - resources/collation/tries/fil.dump
265
+ - resources/collation/tries/fr.dump
266
+ - resources/collation/tries/he.dump
267
+ - resources/collation/tries/hi.dump
268
+ - resources/collation/tries/hu.dump
269
+ - resources/collation/tries/id.dump
270
+ - resources/collation/tries/it.dump
271
+ - resources/collation/tries/ja.dump
272
+ - resources/collation/tries/ko.dump
273
+ - resources/collation/tries/ms.dump
274
+ - resources/collation/tries/nb.dump
275
+ - resources/collation/tries/nl.dump
276
+ - resources/collation/tries/pl.dump
277
+ - resources/collation/tries/pt.dump
278
+ - resources/collation/tries/ru.dump
279
+ - resources/collation/tries/sv.dump
280
+ - resources/collation/tries/th.dump
281
+ - resources/collation/tries/tr.dump
282
+ - resources/collation/tries/uk.dump
283
+ - resources/collation/tries/ur.dump
284
+ - resources/collation/tries/zh-Hant.dump
285
+ - resources/collation/tries/zh.dump
258
286
  - resources/custom/locales/af/units.yml
259
287
  - resources/custom/locales/ar/units.yml
260
288
  - resources/custom/locales/ca/units.yml
@@ -704,23 +732,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
704
732
  requirements:
705
733
  - - ">="
706
734
  - !ruby/object:Gem::Version
707
- hash: 3
708
- segments:
709
- - 0
710
735
  version: "0"
711
736
  required_rubygems_version: !ruby/object:Gem::Requirement
712
737
  none: false
713
738
  requirements:
714
739
  - - ">="
715
740
  - !ruby/object:Gem::Version
716
- hash: 3
717
- segments:
718
- - 0
719
741
  version: "0"
720
742
  requirements: []
721
743
 
722
744
  rubyforge_project:
723
- rubygems_version: 1.8.10
745
+ rubygems_version: 1.8.17
724
746
  signing_key:
725
747
  specification_version: 3
726
748
  summary: Text formatting using data from Unicode's Common Locale Data Repository (CLDR).