code-pages 1.1.0 → 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 +7 -1
- data/lib/code-pages/code_page.rb +3 -2
- data/lib/code-pages/importer.rb +2 -2
- data/lib/code-pages/version.rb +1 -1
- data/lib/code_pages.rb +33 -7
- data/resources/apple_arabic.yml +224 -0
- data/resources/apple_celtic.yml +224 -0
- data/resources/apple_central_europe.yml +224 -0
- data/resources/apple_corpchar.yml +1 -0
- data/resources/apple_croatian.yml +224 -0
- data/resources/apple_cyrillic.yml +224 -0
- data/resources/apple_devanagari.yml +193 -0
- data/resources/apple_dingbats.yml +203 -0
- data/resources/apple_farsi.yml +224 -0
- data/resources/apple_gaelic.yml +224 -0
- data/resources/apple_greek.yml +224 -0
- data/resources/apple_gujarati.yml +184 -0
- data/resources/apple_gurmukhi.yml +178 -0
- data/resources/apple_hebrew.yml +224 -0
- data/resources/apple_iceland.yml +224 -0
- data/resources/apple_inuit.yml +224 -0
- data/resources/apple_japanese.yml +164 -0
- data/resources/apple_keyboard.yml +73 -0
- data/resources/apple_korean.yml +129 -0
- data/resources/apple_roman.yml +224 -0
- data/resources/apple_romanian.yml +224 -0
- data/resources/apple_simplified_chinese.yml +132 -0
- data/resources/apple_symbol.yml +191 -0
- data/resources/apple_thai.yml +218 -0
- data/resources/apple_traditional_chinese.yml +132 -0
- data/resources/apple_turkish.yml +224 -0
- data/resources/apple_ukraine.yml +1 -0
- data/resources/{47451.yml → atarist.yml} +0 -0
- data/resources/big5.yml +13711 -0
- data/resources/code_page_manifest.yml +119 -0
- data/resources/{37.yml → cp037.yml} +0 -0
- data/resources/{1026.yml → cp1026.yml} +0 -0
- data/resources/{1250.yml → cp1250.yml} +0 -0
- data/resources/{1251.yml → cp1251.yml} +0 -0
- data/resources/{1252.yml → cp1252.yml} +0 -0
- data/resources/{1253.yml → cp1253.yml} +0 -0
- data/resources/{1254.yml → cp1254.yml} +0 -0
- data/resources/{1255.yml → cp1255.yml} +0 -0
- data/resources/{1256.yml → cp1256.yml} +0 -0
- data/resources/{1257.yml → cp1257.yml} +0 -0
- data/resources/{1258.yml → cp1258.yml} +0 -0
- data/resources/{437.yml → cp437.yml} +0 -0
- data/resources/{500.yml → cp500.yml} +0 -0
- data/resources/{737.yml → cp737.yml} +0 -0
- data/resources/{775.yml → cp775.yml} +0 -0
- data/resources/{850.yml → cp850.yml} +0 -0
- data/resources/{852.yml → cp852.yml} +0 -0
- data/resources/{855.yml → cp855.yml} +0 -0
- data/resources/{857.yml → cp857.yml} +0 -0
- data/resources/{860.yml → cp860.yml} +0 -0
- data/resources/{861.yml → cp861.yml} +0 -0
- data/resources/{862.yml → cp862.yml} +0 -0
- data/resources/{863.yml → cp863.yml} +0 -0
- data/resources/{864.yml → cp864.yml} +0 -0
- data/resources/{865.yml → cp865.yml} +0 -0
- data/resources/{866.yml → cp866.yml} +0 -0
- data/resources/{869.yml → cp869.yml} +0 -0
- data/resources/{874.yml → cp874.yml} +0 -0
- data/resources/{875.yml → cp875.yml} +0 -0
- data/resources/{932.yml → cp932.yml} +0 -0
- data/resources/{936.yml → cp936.yml} +0 -0
- data/resources/{949.yml → cp949.yml} +0 -0
- data/resources/{950.yml → cp950.yml} +0 -0
- data/resources/{28591.yml → iso8859_1.yml} +0 -0
- data/resources/{28600.yml → iso8859_10.yml} +0 -0
- data/resources/{28601.yml → iso8859_11.yml} +0 -0
- data/resources/{28603.yml → iso8859_13.yml} +0 -0
- data/resources/{28604.yml → iso8859_14.yml} +0 -0
- data/resources/{28605.yml → iso8859_15.yml} +0 -0
- data/resources/{28606.yml → iso8859_16.yml} +0 -0
- data/resources/{28592.yml → iso8859_2.yml} +0 -0
- data/resources/{28593.yml → iso8859_3.yml} +0 -0
- data/resources/{28594.yml → iso8859_4.yml} +0 -0
- data/resources/{28595.yml → iso8859_5.yml} +0 -0
- data/resources/{28596.yml → iso8859_6.yml} +0 -0
- data/resources/{28597.yml → iso8859_7.yml} +0 -0
- data/resources/{28598.yml → iso8859_8.yml} +0 -0
- data/resources/{28599.yml → iso8859_9.yml} +0 -0
- data/resources/johab.yml +1 -0
- data/resources/{10007.yml → mac_cyrillic.yml} +0 -0
- data/resources/{10006.yml → mac_greek.yml} +0 -0
- data/resources/{10079.yml → mac_iceland.yml} +0 -0
- data/resources/{10029.yml → mac_latin2.yml} +0 -0
- data/resources/{10000.yml → mac_roman.yml} +0 -0
- data/resources/{10081.yml → mac_turkish.yml} +0 -0
- data/resources/shift_jis.yml +7038 -0
- data/resources/wansung.yml +8225 -0
- data/spec/code_pages_spec.rb +17 -3
- metadata +88 -57
data/spec/code_pages_spec.rb
CHANGED
@@ -21,6 +21,19 @@ describe CodePages do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
describe '#supported_names' do
|
25
|
+
subject { described_class.supported_names }
|
26
|
+
|
27
|
+
it 'rerieves a list of all available code page ids' do
|
28
|
+
expect(subject.all? { |id| id.is_a?(String) }).to eq(true)
|
29
|
+
expect(subject).to include('cp875')
|
30
|
+
expect(subject).to include('cp860')
|
31
|
+
expect(subject).to include('cp1251')
|
32
|
+
expect(subject).to include('shift_jis')
|
33
|
+
expect(subject).to include('apple_hebrew')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
24
37
|
describe '#supports?' do
|
25
38
|
it 'returns true if the code page is supported' do
|
26
39
|
expect(described_class.supports?(28605)).to eq(true)
|
@@ -41,9 +54,10 @@ describe CodePages do
|
|
41
54
|
end
|
42
55
|
|
43
56
|
it 'includes certain code pages' do
|
44
|
-
expect(subject).to include(
|
45
|
-
expect(subject).to include(
|
46
|
-
expect(subject).to include(
|
57
|
+
expect(subject).to include('cp950')
|
58
|
+
expect(subject).to include('cp1250')
|
59
|
+
expect(subject).to include('mac_roman')
|
60
|
+
expect(subject).to include('apple_cyrillic')
|
47
61
|
end
|
48
62
|
end
|
49
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A database of legacy Microsoft and ISO 8859 code pages for Ruby.
|
14
14
|
email:
|
@@ -26,62 +26,93 @@ files:
|
|
26
26
|
- lib/code-pages/importer.rb
|
27
27
|
- lib/code-pages/version.rb
|
28
28
|
- lib/code_pages.rb
|
29
|
-
- resources/
|
30
|
-
- resources/
|
31
|
-
- resources/
|
32
|
-
- resources/
|
33
|
-
- resources/
|
34
|
-
- resources/
|
35
|
-
- resources/
|
36
|
-
- resources/
|
37
|
-
- resources/
|
38
|
-
- resources/
|
39
|
-
- resources/
|
40
|
-
- resources/
|
41
|
-
- resources/
|
42
|
-
- resources/
|
43
|
-
- resources/
|
44
|
-
- resources/
|
45
|
-
- resources/
|
46
|
-
- resources/
|
47
|
-
- resources/
|
48
|
-
- resources/
|
49
|
-
- resources/
|
50
|
-
- resources/
|
51
|
-
- resources/
|
52
|
-
- resources/
|
53
|
-
- resources/
|
54
|
-
- resources/
|
55
|
-
- resources/
|
56
|
-
- resources/
|
57
|
-
- resources/
|
58
|
-
- resources/28605.yml
|
59
|
-
- resources/28606.yml
|
60
|
-
- resources/37.yml
|
61
|
-
- resources/437.yml
|
62
|
-
- resources/47451.yml
|
63
|
-
- resources/500.yml
|
64
|
-
- resources/737.yml
|
65
|
-
- resources/775.yml
|
66
|
-
- resources/850.yml
|
67
|
-
- resources/852.yml
|
68
|
-
- resources/855.yml
|
69
|
-
- resources/857.yml
|
70
|
-
- resources/860.yml
|
71
|
-
- resources/861.yml
|
72
|
-
- resources/862.yml
|
73
|
-
- resources/863.yml
|
74
|
-
- resources/864.yml
|
75
|
-
- resources/865.yml
|
76
|
-
- resources/866.yml
|
77
|
-
- resources/869.yml
|
78
|
-
- resources/874.yml
|
79
|
-
- resources/875.yml
|
80
|
-
- resources/932.yml
|
81
|
-
- resources/936.yml
|
82
|
-
- resources/949.yml
|
83
|
-
- resources/950.yml
|
29
|
+
- resources/apple_arabic.yml
|
30
|
+
- resources/apple_celtic.yml
|
31
|
+
- resources/apple_central_europe.yml
|
32
|
+
- resources/apple_corpchar.yml
|
33
|
+
- resources/apple_croatian.yml
|
34
|
+
- resources/apple_cyrillic.yml
|
35
|
+
- resources/apple_devanagari.yml
|
36
|
+
- resources/apple_dingbats.yml
|
37
|
+
- resources/apple_farsi.yml
|
38
|
+
- resources/apple_gaelic.yml
|
39
|
+
- resources/apple_greek.yml
|
40
|
+
- resources/apple_gujarati.yml
|
41
|
+
- resources/apple_gurmukhi.yml
|
42
|
+
- resources/apple_hebrew.yml
|
43
|
+
- resources/apple_iceland.yml
|
44
|
+
- resources/apple_inuit.yml
|
45
|
+
- resources/apple_japanese.yml
|
46
|
+
- resources/apple_keyboard.yml
|
47
|
+
- resources/apple_korean.yml
|
48
|
+
- resources/apple_roman.yml
|
49
|
+
- resources/apple_romanian.yml
|
50
|
+
- resources/apple_simplified_chinese.yml
|
51
|
+
- resources/apple_symbol.yml
|
52
|
+
- resources/apple_thai.yml
|
53
|
+
- resources/apple_traditional_chinese.yml
|
54
|
+
- resources/apple_turkish.yml
|
55
|
+
- resources/apple_ukraine.yml
|
56
|
+
- resources/atarist.yml
|
57
|
+
- resources/big5.yml
|
84
58
|
- resources/code_page_manifest.yml
|
59
|
+
- resources/cp037.yml
|
60
|
+
- resources/cp1026.yml
|
61
|
+
- resources/cp1250.yml
|
62
|
+
- resources/cp1251.yml
|
63
|
+
- resources/cp1252.yml
|
64
|
+
- resources/cp1253.yml
|
65
|
+
- resources/cp1254.yml
|
66
|
+
- resources/cp1255.yml
|
67
|
+
- resources/cp1256.yml
|
68
|
+
- resources/cp1257.yml
|
69
|
+
- resources/cp1258.yml
|
70
|
+
- resources/cp437.yml
|
71
|
+
- resources/cp500.yml
|
72
|
+
- resources/cp737.yml
|
73
|
+
- resources/cp775.yml
|
74
|
+
- resources/cp850.yml
|
75
|
+
- resources/cp852.yml
|
76
|
+
- resources/cp855.yml
|
77
|
+
- resources/cp857.yml
|
78
|
+
- resources/cp860.yml
|
79
|
+
- resources/cp861.yml
|
80
|
+
- resources/cp862.yml
|
81
|
+
- resources/cp863.yml
|
82
|
+
- resources/cp864.yml
|
83
|
+
- resources/cp865.yml
|
84
|
+
- resources/cp866.yml
|
85
|
+
- resources/cp869.yml
|
86
|
+
- resources/cp874.yml
|
87
|
+
- resources/cp875.yml
|
88
|
+
- resources/cp932.yml
|
89
|
+
- resources/cp936.yml
|
90
|
+
- resources/cp949.yml
|
91
|
+
- resources/cp950.yml
|
92
|
+
- resources/iso8859_1.yml
|
93
|
+
- resources/iso8859_10.yml
|
94
|
+
- resources/iso8859_11.yml
|
95
|
+
- resources/iso8859_13.yml
|
96
|
+
- resources/iso8859_14.yml
|
97
|
+
- resources/iso8859_15.yml
|
98
|
+
- resources/iso8859_16.yml
|
99
|
+
- resources/iso8859_2.yml
|
100
|
+
- resources/iso8859_3.yml
|
101
|
+
- resources/iso8859_4.yml
|
102
|
+
- resources/iso8859_5.yml
|
103
|
+
- resources/iso8859_6.yml
|
104
|
+
- resources/iso8859_7.yml
|
105
|
+
- resources/iso8859_8.yml
|
106
|
+
- resources/iso8859_9.yml
|
107
|
+
- resources/johab.yml
|
108
|
+
- resources/mac_cyrillic.yml
|
109
|
+
- resources/mac_greek.yml
|
110
|
+
- resources/mac_iceland.yml
|
111
|
+
- resources/mac_latin2.yml
|
112
|
+
- resources/mac_roman.yml
|
113
|
+
- resources/mac_turkish.yml
|
114
|
+
- resources/shift_jis.yml
|
115
|
+
- resources/wansung.yml
|
85
116
|
- spec/code_page_spec.rb
|
86
117
|
- spec/code_pages_spec.rb
|
87
118
|
- spec/spec_helper.rb
|