unicode-scripts 1.2.1 → 1.3.0

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
  SHA256:
3
- metadata.gz: d4161e9c050b26f5a31a1194f144a37afe9bd3346331435cfce5a4caa637e135
4
- data.tar.gz: a5b6ebcda583856a4d9ee93ea2934b1ba097ae1cdf945fe16cde895713b370c9
3
+ metadata.gz: 4553aef6ef38f7ab727daa55ee8a3baf29848f5599f6e116f3e192bb12fecd72
4
+ data.tar.gz: 431a7deb7daab9a0651d9223cedeb0d2f4d32bd5e8e2417ca095e32251ddc0d3
5
5
  SHA512:
6
- metadata.gz: 0b39b19d5bb0021d90bec3f0f5625c0e69a38b72dada88782e5a4eb84a10fbbb942ae40466e944579444547a07d14411b073882b6a69905fb8575c9aa65f63bf
7
- data.tar.gz: 9534da8d1a492aa0214087d79e8706990b22faa588efd13203251fd2ecdadbdecaee5b8221ba6260491faf9e8691c18bf6453e4a8b4a8f5905c96d0557232497
6
+ metadata.gz: bc8d031a9f5528608dff602cb383907c3ba26c7f54ac6e9e183b3d7dd112d8697d8e8d937531015d5a8030bbefdc4027ccbcaf0a253f73784db5795a8de3b45d
7
+ data.tar.gz: df002e70c93bdb45c9c0bf8467d497a16ffa0e840539762191eea9959daebefc36e438d53555421bb936ccc587ca4bc0bce8ea683f6c48fbb7b65686ff3fcd73
@@ -1,5 +1,14 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.3.0
4
+
5
+ * Unicode 11
6
+ * Do not depend on rubygems (only use zlib stdlib for unzipping)
7
+
8
+ ### 1.2.2
9
+
10
+ * Explicitly load rubygems/util, fixes regression in 1.2.1
11
+
3
12
  ### 1.2.1
4
13
 
5
14
  * Use `Gem::Util` for `gunzip`, removes deprecation warning
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016 Jan Lelis, mail@janlelis.de
1
+ Copyright (c) 2016-2018 Jan Lelis, mail@janlelis.de
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Retrieve the [Unicode script(s)](https://en.wikipedia.org/wiki/Script_%28Unicode%29) a string belongs to. Can also return the *Script_Extension* property which is defined as characters which are "commonly used with more than one script, but with a limited number of scripts".
4
4
 
5
- Unicode version: **10.0.0**
5
+ Unicode version: **11.0.0**
6
6
 
7
7
  Supported Rubies: **2.5**, **2.4**, **2.3**
8
8
 
@@ -28,11 +28,11 @@ Unicode::Scripts.scripts("СC", format: :short) # => ["Cyrl", "Latn"]
28
28
  Unicode::Scripts.script("ᴦ") # => "Greek"
29
29
 
30
30
  # Script_Extension property
31
- Unicode::Scripts.script_extensions("॥") # => ["Bengali", "Devanagari", "Grantha", "Gujarati",
32
- "Gurmukhi", "Kannada", "Khudawadi", "Limbu",
33
- "Mahajani", "Malayalam", "Oriya", "Sinhala",
34
- "Syloti_Nagri", "Takri", "Tamil", "Telugu",
35
- "Tirhuta"]
31
+ Unicode::Scripts.script_extensions("॥")
32
+ # => ["Bengali", "Devanagari", "Dogra", "Grantha", "Gujarati",
33
+ "Gunjala_Gondi", "Gurmukhi", "Kannada", "Khudawadi", "Limbu",
34
+ "Mahajani", "Malayalam", "Oriya", "Sinhala", "Syloti_Nagri",
35
+ "Takri", "Tamil", "Telugu", "Tirhuta"]
36
36
  ```
37
37
 
38
38
  ## Hints
@@ -84,6 +84,7 @@ Cypriot
84
84
  Cyrillic
85
85
  Deseret
86
86
  Devanagari
87
+ Dogra
87
88
  Duployan
88
89
  Egyptian_Hieroglyphs
89
90
  Elbasan
@@ -94,9 +95,11 @@ Gothic
94
95
  Grantha
95
96
  Greek
96
97
  Gujarati
98
+ Gunjala_Gondi
97
99
  Gurmukhi
98
100
  Han
99
101
  Hangul
102
+ Hanifi_Rohingya
100
103
  Hanunoo
101
104
  Hatran
102
105
  Hebrew
@@ -125,11 +128,13 @@ Lisu
125
128
  Lycian
126
129
  Lydian
127
130
  Mahajani
131
+ Makasar
128
132
  Malayalam
129
133
  Mandaic
130
134
  Manichaean
131
135
  Marchen
132
136
  Masaram_Gondi
137
+ Medefaidrin
133
138
  Meetei_Mayek
134
139
  Mende_Kikakui
135
140
  Meroitic_Cursive
@@ -152,6 +157,7 @@ Old_Italic
152
157
  Old_North_Arabian
153
158
  Old_Permic
154
159
  Old_Persian
160
+ Old_Sogdian
155
161
  Old_South_Arabian
156
162
  Old_Turkic
157
163
  Oriya
@@ -172,6 +178,7 @@ Shavian
172
178
  Siddham
173
179
  SignWriting
174
180
  Sinhala
181
+ Sogdian
175
182
  Sora_Sompeng
176
183
  Soyombo
177
184
  Sundanese
@@ -236,6 +243,7 @@ Copt
236
243
  Cprt
237
244
  Cyrl
238
245
  Deva
246
+ Dogr
239
247
  Dsrt
240
248
  Dupl
241
249
  Egyp
@@ -243,6 +251,7 @@ Elba
243
251
  Ethi
244
252
  Geor
245
253
  Glag
254
+ Gong
246
255
  Gonm
247
256
  Goth
248
257
  Gran
@@ -279,9 +288,11 @@ Lisu
279
288
  Lyci
280
289
  Lydi
281
290
  Mahj
291
+ Maka
282
292
  Mand
283
293
  Mani
284
294
  Marc
295
+ Medf
285
296
  Mend
286
297
  Merc
287
298
  Mero
@@ -315,6 +326,7 @@ Prti
315
326
  Qaac
316
327
  Qaai
317
328
  Rjng
329
+ Rohg
318
330
  Runr
319
331
  Samr
320
332
  Sarb
@@ -325,6 +337,8 @@ Shrd
325
337
  Sidd
326
338
  Sind
327
339
  Sinh
340
+ Sogd
341
+ Sogo
328
342
  Sora
329
343
  Soyo
330
344
  Sund
@@ -360,5 +374,5 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
360
374
 
361
375
  ## MIT License
362
376
 
363
- - Copyright (C) 2016 Jan Lelis <http://janlelis.com>. Released under the MIT license.
377
+ - Copyright (C) 2016-2018 Jan Lelis <http://janlelis.com>. Released under the MIT license.
364
378
  - Unicode data: http://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -1,7 +1,7 @@
1
1
  module Unicode
2
2
  module Scripts
3
- VERSION = "1.2.1".freeze
4
- UNICODE_VERSION = "10.0.0".freeze
3
+ VERSION = "1.3.0".freeze
4
+ UNICODE_VERSION = "11.0.0".freeze
5
5
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
6
6
  INDEX_FILENAME = (DATA_DIRECTORY + '/scripts.marshal.gz').freeze
7
7
  end
@@ -1,7 +1,14 @@
1
- require_relative 'constants'
1
+ # frozen_string_literal: true
2
+
3
+ require "zlib"
4
+ require_relative "constants"
2
5
 
3
6
  module Unicode
4
7
  module Scripts
5
- INDEX = Marshal.load(Gem::Util.gunzip(File.binread(INDEX_FILENAME)))
8
+ File.open(INDEX_FILENAME, "rb") do |file|
9
+ serialized_data = Zlib::GzipReader.new(file).read
10
+ serialized_data.force_encoding Encoding::BINARY
11
+ INDEX = Marshal.load(serialized_data)
12
+ end
6
13
  end
7
14
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-scripts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: "[Unicode 10.0.0] Retrieve the Unicode script(s) a string belongs to.
13
+ description: "[Unicode 11.0.0] Retrieve the Unicode script(s) a string belongs to.
14
14
  Can also return the Script_Extension property which is defined as characters which
15
15
  are 'commonly used with more than one script, but with a limited number of scripts'. "
16
16
  email: