html_number_decoder 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b57caa2bb7077f0d67796d64f1c0f02171fc1f2e
4
- data.tar.gz: 3a062ce0acbdd897f3e3a0d49b471853af7a4fb3
3
+ metadata.gz: 20d96d17029879920631bfb8e2adbaf939f23e34
4
+ data.tar.gz: d93555b091073f253ef37bdd7d82fd23e2d643ac
5
5
  SHA512:
6
- metadata.gz: 6b720e3589b8d1a9ce20fbffa797e7d08112e1ccd6f05f45d203ea3ec7383a28207b1f2dc9d20b82410f79e6a9a9e94769b1eec6e8f6622bbf499cf31f7723cd
7
- data.tar.gz: 544b65a20c8228dc14f6e93d0313669812715fa71482f1f21d6955d708c19ad20d191b8de5c5c6037597924047fa2f3c184705b7b72b783ff3d1ee44a69af743
6
+ metadata.gz: 32485a756d8fb98509bfc2e26e2c8d7e73125ebc01101808feb6d8c5e5ba02b3e3931802ca62eafd3e8fc753bfa910e268ce064efed0c4ece4288078fe18045e
7
+ data.tar.gz: 6c6aad38a4806ace2541a3e17fbe9ed572f82137477008f5abea48a4f08bb1920ef98fd5f7ace78ad8f25bf3b2d9898d88418483061387356f89e06605cac92b
@@ -1,213 +1,217 @@
1
- MAPPING = {
2
- "32" => " ",
3
- "33" => "!",
4
- "34" => "\"",
5
- "35" => "#",
6
- "36" => "$",
7
- "37" => "%",
8
- "38" => "&",
9
- "39" => "'",
10
- "40" => "(",
11
- "41" => ")",
12
- "42" => "*",
13
- "43" => "+",
14
- "44" => ",",
15
- "45" => "-",
16
- "46" => ".",
17
- "47" => "/",
18
- "48" => "0",
19
- "49" => "1",
20
- "50" => "2",
21
- "51" => "3",
22
- "52" => "4",
23
- "53" => "5",
24
- "54" => "6",
25
- "55" => "7",
26
- "56" => "8",
27
- "57" => "9",
28
- "58" => ":",
29
- "59" => ";",
30
- "60" => "<",
31
- "61" => "=",
32
- "62" => ">",
33
- "63" => "?",
34
- "64" => "@",
35
- "65" => "A",
36
- "66" => "B",
37
- "67" => "C",
38
- "68" => "D",
39
- "69" => "E",
40
- "70" => "F",
41
- "71" => "G",
42
- "72" => "H",
43
- "73" => "I",
44
- "74" => "J",
45
- "75" => "K",
46
- "76" => "L",
47
- "77" => "M",
48
- "78" => "N",
49
- "79" => "O",
50
- "80" => "P",
51
- "81" => "Q",
52
- "82" => "R",
53
- "83" => "S",
54
- "84" => "T",
55
- "85" => "U",
56
- "86" => "V",
57
- "87" => "W",
58
- "88" => "X",
59
- "89" => "Y",
60
- "90" => "Z",
61
- "91" => "[",
62
- "92" => "\\",
63
- "93" => "]",
64
- "94" => "^",
65
- "95" => "_",
66
- "96" => "`",
67
- "97" => "a",
68
- "98" => "b",
69
- "99" => "c",
70
- "100" => "d",
71
- "101" => "e",
72
- "102" => "f",
73
- "103" => "g",
74
- "104" => "h",
75
- "105" => "i",
76
- "106" => "j",
77
- "107" => "k",
78
- "108" => "l",
79
- "109" => "m",
80
- "110" => "n",
81
- "111" => "o",
82
- "112" => "p",
83
- "113" => "q",
84
- "114" => "r",
85
- "115" => "s",
86
- "116" => "t",
87
- "117" => "u",
88
- "118" => "v",
89
- "119" => "w",
90
- "120" => "x",
91
- "121" => "y",
92
- "122" => "z",
93
- "123" => "{",
94
- "124" => "|",
95
- "125" => "}",
96
- "126" => "~",
97
- "160" => " ",
98
- "161" => "¡",
99
- "162" => "¢",
100
- "163" => "£",
101
- "164" => "¤",
102
- "165" => "¥",
103
- "166" => "¦",
104
- "167" => "§",
105
- "168" => "¨",
106
- "169" => "©",
107
- "170" => "ª",
108
- "171" => "«",
109
- "172" => "¬",
110
- "174" => "®",
111
- "175" => "¯",
112
- "176" => "°",
113
- "177" => "±",
114
- "178" => "²",
115
- "179" => "³",
116
- "180" => "´",
117
- "181" => "µ",
118
- "182" => "",
119
- "183" => "·",
120
- "184" => "¸",
121
- "185" => "¹",
122
- "186" => "º",
123
- "187" => "»",
124
- "188" => "¼",
125
- "189" => "½",
126
- "190" => "¾",
127
- "191" => "¿",
128
- "192" => "À",
129
- "193" => "Á",
130
- "194" => "Â",
131
- "195" => "Ã",
132
- "196" => "Ä",
133
- "197" => "Å",
134
- "198" => "Æ",
135
- "199" => "Ç",
136
- "200" => "È",
137
- "201" => "É",
138
- "202" => "Ê",
139
- "203" => "Ë",
140
- "204" => "Ì",
141
- "205" => "Í",
142
- "206" => "Î",
143
- "207" => "Ï",
144
- "208" => "Ð",
145
- "209" => "Ñ",
146
- "210" => "Ò",
147
- "211" => "Ó",
148
- "212" => "Ô",
149
- "213" => "Õ",
150
- "214" => "Ö",
151
- "215" => "×",
152
- "216" => "Ø",
153
- "217" => "Ù",
154
- "218" => "Ú",
155
- "219" => "Û",
156
- "220" => "Ü",
157
- "221" => "Ý",
158
- "222" => "Þ",
159
- "223" => "ß",
160
- "224" => "à",
161
- "225" => "á",
162
- "226" => "â",
163
- "227" => "ã",
164
- "228" => "ä",
165
- "229" => "å",
166
- "230" => "æ",
167
- "231" => "ç",
168
- "232" => "è",
169
- "233" => "é",
170
- "234" => "ê",
171
- "235" => "ë",
172
- "236" => "ì",
173
- "237" => "í",
174
- "238" => "î",
175
- "239" => "ï",
176
- "240" => "ð",
177
- "241" => "ñ",
178
- "242" => "ò",
179
- "243" => "ó",
180
- "244" => "ô",
181
- "245" => "õ",
182
- "246" => "ö",
183
- "247" => "÷",
184
- "248" => "ø",
185
- "249" => "ù",
186
- "250" => "ú",
187
- "251" => "û",
188
- "252" => "ü",
189
- "253" => "ý",
190
- "254" => "þ",
191
- "255" => "ÿ",
192
- "338" => "Œ",
193
- "339" => "œ",
194
- "352" => "Š",
195
- "353" => "š",
196
- "376" => "Ÿ",
197
- "402" => "ƒ",
198
- "8211" => "",
199
- "8212" => "",
200
- "8216" => "",
201
- "8217" => "",
202
- "8218" => "",
203
- "8220" => "",
204
- "8221" => "",
205
- "8222" => "",
206
- "8224" => "",
207
- "8225" => "",
208
- "8226" => "",
209
- "8230" => "",
210
- "8240" => "",
211
- "8364" => "",
212
- "8482" => ""
213
- }
1
+ # encoding: utf-8
2
+
3
+ module HtmlNumberDecoder
4
+ MAPPING = {
5
+ "32" => " ",
6
+ "33" => "!",
7
+ "34" => "\"",
8
+ "35" => "#",
9
+ "36" => "$",
10
+ "37" => "%",
11
+ "38" => "&",
12
+ "39" => "'",
13
+ "40" => "(",
14
+ "41" => ")",
15
+ "42" => "*",
16
+ "43" => "+",
17
+ "44" => ",",
18
+ "45" => "-",
19
+ "46" => ".",
20
+ "47" => "/",
21
+ "48" => "0",
22
+ "49" => "1",
23
+ "50" => "2",
24
+ "51" => "3",
25
+ "52" => "4",
26
+ "53" => "5",
27
+ "54" => "6",
28
+ "55" => "7",
29
+ "56" => "8",
30
+ "57" => "9",
31
+ "58" => ":",
32
+ "59" => ";",
33
+ "60" => "<",
34
+ "61" => "=",
35
+ "62" => ">",
36
+ "63" => "?",
37
+ "64" => "@",
38
+ "65" => "A",
39
+ "66" => "B",
40
+ "67" => "C",
41
+ "68" => "D",
42
+ "69" => "E",
43
+ "70" => "F",
44
+ "71" => "G",
45
+ "72" => "H",
46
+ "73" => "I",
47
+ "74" => "J",
48
+ "75" => "K",
49
+ "76" => "L",
50
+ "77" => "M",
51
+ "78" => "N",
52
+ "79" => "O",
53
+ "80" => "P",
54
+ "81" => "Q",
55
+ "82" => "R",
56
+ "83" => "S",
57
+ "84" => "T",
58
+ "85" => "U",
59
+ "86" => "V",
60
+ "87" => "W",
61
+ "88" => "X",
62
+ "89" => "Y",
63
+ "90" => "Z",
64
+ "91" => "[",
65
+ "92" => "\\",
66
+ "93" => "]",
67
+ "94" => "^",
68
+ "95" => "_",
69
+ "96" => "`",
70
+ "97" => "a",
71
+ "98" => "b",
72
+ "99" => "c",
73
+ "100" => "d",
74
+ "101" => "e",
75
+ "102" => "f",
76
+ "103" => "g",
77
+ "104" => "h",
78
+ "105" => "i",
79
+ "106" => "j",
80
+ "107" => "k",
81
+ "108" => "l",
82
+ "109" => "m",
83
+ "110" => "n",
84
+ "111" => "o",
85
+ "112" => "p",
86
+ "113" => "q",
87
+ "114" => "r",
88
+ "115" => "s",
89
+ "116" => "t",
90
+ "117" => "u",
91
+ "118" => "v",
92
+ "119" => "w",
93
+ "120" => "x",
94
+ "121" => "y",
95
+ "122" => "z",
96
+ "123" => "{",
97
+ "124" => "|",
98
+ "125" => "}",
99
+ "126" => "~",
100
+ "160" => " ",
101
+ "161" => "¡",
102
+ "162" => "¢",
103
+ "163" => "£",
104
+ "164" => "¤",
105
+ "165" => "¥",
106
+ "166" => "¦",
107
+ "167" => "§",
108
+ "168" => "¨",
109
+ "169" => "©",
110
+ "170" => "ª",
111
+ "171" => "«",
112
+ "172" => "¬",
113
+ "174" => "®",
114
+ "175" => "¯",
115
+ "176" => "°",
116
+ "177" => "±",
117
+ "178" => "²",
118
+ "179" => "³",
119
+ "180" => "´",
120
+ "181" => "µ",
121
+ "182" => "",
122
+ "183" => "·",
123
+ "184" => "¸",
124
+ "185" => "¹",
125
+ "186" => "º",
126
+ "187" => "»",
127
+ "188" => "¼",
128
+ "189" => "½",
129
+ "190" => "¾",
130
+ "191" => "¿",
131
+ "192" => "À",
132
+ "193" => "Á",
133
+ "194" => "Â",
134
+ "195" => "Ã",
135
+ "196" => "Ä",
136
+ "197" => "Å",
137
+ "198" => "Æ",
138
+ "199" => "Ç",
139
+ "200" => "È",
140
+ "201" => "É",
141
+ "202" => "Ê",
142
+ "203" => "Ë",
143
+ "204" => "Ì",
144
+ "205" => "Í",
145
+ "206" => "Î",
146
+ "207" => "Ï",
147
+ "208" => "Ð",
148
+ "209" => "Ñ",
149
+ "210" => "Ò",
150
+ "211" => "Ó",
151
+ "212" => "Ô",
152
+ "213" => "Õ",
153
+ "214" => "Ö",
154
+ "215" => "×",
155
+ "216" => "Ø",
156
+ "217" => "Ù",
157
+ "218" => "Ú",
158
+ "219" => "Û",
159
+ "220" => "Ü",
160
+ "221" => "Ý",
161
+ "222" => "Þ",
162
+ "223" => "ß",
163
+ "224" => "à",
164
+ "225" => "á",
165
+ "226" => "â",
166
+ "227" => "ã",
167
+ "228" => "ä",
168
+ "229" => "å",
169
+ "230" => "æ",
170
+ "231" => "ç",
171
+ "232" => "è",
172
+ "233" => "é",
173
+ "234" => "ê",
174
+ "235" => "ë",
175
+ "236" => "ì",
176
+ "237" => "í",
177
+ "238" => "î",
178
+ "239" => "ï",
179
+ "240" => "ð",
180
+ "241" => "ñ",
181
+ "242" => "ò",
182
+ "243" => "ó",
183
+ "244" => "ô",
184
+ "245" => "õ",
185
+ "246" => "ö",
186
+ "247" => "÷",
187
+ "248" => "ø",
188
+ "249" => "ù",
189
+ "250" => "ú",
190
+ "251" => "û",
191
+ "252" => "ü",
192
+ "253" => "ý",
193
+ "254" => "þ",
194
+ "255" => "ÿ",
195
+ "338" => "Œ",
196
+ "339" => "œ",
197
+ "352" => "Š",
198
+ "353" => "š",
199
+ "376" => "Ÿ",
200
+ "402" => "ƒ",
201
+ "8211" => "",
202
+ "8212" => "",
203
+ "8216" => "",
204
+ "8217" => "",
205
+ "8218" => "",
206
+ "8220" => "",
207
+ "8221" => "",
208
+ "8222" => "",
209
+ "8224" => "",
210
+ "8225" => "",
211
+ "8226" => "",
212
+ "8230" => "",
213
+ "8240" => "‰",
214
+ "8364" => "€",
215
+ "8482" => "™"
216
+ }
217
+ end
@@ -1,3 +1,3 @@
1
1
  module HtmlNumberDecoder
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "html_number_decoder/mapping"
2
2
 
3
- class HtmlNumberDecoder
3
+ module HtmlNumberDecoder
4
4
  PATTERN = /(&#(\d+);)/
5
5
 
6
6
  def self.decode(string)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_number_decoder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Fatsi