ipod_db 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/bin/ipod +2 -0
- data/lib/fuzzy_locale.rb +74 -0
- data/lib/ipod_db/version.rb +1 -1
- data/spec/fuzzy_locale_spec.rb +20 -0
- data/spec/ipod_db_spec.rb +2 -0
- metadata +11 -2
data/README.md
CHANGED
data/bin/ipod
CHANGED
data/lib/fuzzy_locale.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'i18n'
|
3
|
+
I18n.backend.store_translations(:fuzzy, i18n: {
|
4
|
+
transliterate: {
|
5
|
+
rule: {
|
6
|
+
"А" => "A",
|
7
|
+
"а" => "a",
|
8
|
+
"Б" => "B",
|
9
|
+
"б" => "b",
|
10
|
+
"В" => "V",
|
11
|
+
"в" => "v",
|
12
|
+
"Г" => "G",
|
13
|
+
"г" => "g",
|
14
|
+
"Д" => "D",
|
15
|
+
"д" => "d",
|
16
|
+
"Е" => "E",
|
17
|
+
"е" => "e",
|
18
|
+
"Ё" => "Yo",
|
19
|
+
"ё" => "yo",
|
20
|
+
"Ж" => "Zh",
|
21
|
+
"ж" => "zh",
|
22
|
+
"З" => "Z",
|
23
|
+
"з" => "z",
|
24
|
+
"И" => "I",
|
25
|
+
"и" => "i",
|
26
|
+
"Й" => "J",
|
27
|
+
"й" => "j",
|
28
|
+
"К" => "K",
|
29
|
+
"к" => "k",
|
30
|
+
"Л" => "L",
|
31
|
+
"л" => "l",
|
32
|
+
"М" => "M",
|
33
|
+
"м" => "m",
|
34
|
+
"Н" => "N",
|
35
|
+
"н" => "n",
|
36
|
+
"О" => "O",
|
37
|
+
"о" => "o",
|
38
|
+
"П" => "P",
|
39
|
+
"п" => "p",
|
40
|
+
"Р" => "R",
|
41
|
+
"р" => "r",
|
42
|
+
"С" => "S",
|
43
|
+
"с" => "s",
|
44
|
+
"Т" => "T",
|
45
|
+
"т" => "t",
|
46
|
+
"У" => "U",
|
47
|
+
"у" => "u",
|
48
|
+
"Ф" => "F",
|
49
|
+
"ф" => "f",
|
50
|
+
"Х" => "H",
|
51
|
+
"х" => "h",
|
52
|
+
"Ц" => "C",
|
53
|
+
"ц" => "c",
|
54
|
+
"Ч" => "Ch",
|
55
|
+
"ч" => "ch",
|
56
|
+
"Ш" => "Sh",
|
57
|
+
"ш" => "sh",
|
58
|
+
"Щ" => "Sch",
|
59
|
+
"щ" => "sch",
|
60
|
+
"Ъ" => "'",
|
61
|
+
"ъ" => "'",
|
62
|
+
"Ы" => "Y",
|
63
|
+
"ы" => "y",
|
64
|
+
"Ь" => "'",
|
65
|
+
"ь" => "'",
|
66
|
+
"Э" => "E",
|
67
|
+
"э" => "e",
|
68
|
+
"Ю" => "Yu",
|
69
|
+
"ю" => "yu",
|
70
|
+
"Я" => "Ya",
|
71
|
+
"я" => "ya",
|
72
|
+
}
|
73
|
+
}
|
74
|
+
})
|
data/lib/ipod_db/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'fuzzy_locale'
|
4
|
+
require 'ipod_db'
|
5
|
+
|
6
|
+
describe 'sanitize_filename()' do
|
7
|
+
before {
|
8
|
+
I18n.locale = :fuzzy
|
9
|
+
}
|
10
|
+
it 'transliterates russian' do
|
11
|
+
IpodDB::sanitize_filename('русский').must_be :==, "russkij"
|
12
|
+
end
|
13
|
+
it 'transliterates RUSSIAN' do
|
14
|
+
IpodDB::sanitize_filename('РУССКИЙ').must_be :==, "RUSSKIJ"
|
15
|
+
end
|
16
|
+
it 'transliterates german' do
|
17
|
+
IpodDB::sanitize_filename('ümlaut').must_be :==, "umlaut"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
data/spec/ipod_db_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipod_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bindata
|
@@ -303,11 +303,13 @@ files:
|
|
303
303
|
- doc/ITunesDB - wikiPodLinux.html
|
304
304
|
- ipod_db.gemspec
|
305
305
|
- lib/bindata/itypes.rb
|
306
|
+
- lib/fuzzy_locale.rb
|
306
307
|
- lib/ipod/track.rb
|
307
308
|
- lib/ipod_db.rb
|
308
309
|
- lib/ipod_db/version.rb
|
309
310
|
- lib/pretty.rb
|
310
311
|
- lib/spread.rb
|
312
|
+
- spec/fuzzy_locale_spec.rb
|
311
313
|
- spec/ipod/track_spec.rb
|
312
314
|
- spec/ipod_db_spec.rb
|
313
315
|
- spec/spec_helper.rb
|
@@ -332,12 +334,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
332
334
|
- - ! '>='
|
333
335
|
- !ruby/object:Gem::Version
|
334
336
|
version: '0'
|
337
|
+
segments:
|
338
|
+
- 0
|
339
|
+
hash: 2376881358862062808
|
335
340
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
341
|
none: false
|
337
342
|
requirements:
|
338
343
|
- - ! '>='
|
339
344
|
- !ruby/object:Gem::Version
|
340
345
|
version: '0'
|
346
|
+
segments:
|
347
|
+
- 0
|
348
|
+
hash: 2376881358862062808
|
341
349
|
requirements: []
|
342
350
|
rubyforge_project:
|
343
351
|
rubygems_version: 1.8.23
|
@@ -345,6 +353,7 @@ signing_key:
|
|
345
353
|
specification_version: 3
|
346
354
|
summary: ipod database access
|
347
355
|
test_files:
|
356
|
+
- spec/fuzzy_locale_spec.rb
|
348
357
|
- spec/ipod/track_spec.rb
|
349
358
|
- spec/ipod_db_spec.rb
|
350
359
|
- spec/spec_helper.rb
|