unicode-scripts 1.6.0 → 1.8.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: 9e582b98673c3e1b3f8088c36ee372ba4354881ef1d9c3b1296eab954c3c06e3
4
- data.tar.gz: 382fcf248e48fd0c7c9de5ad183630ea7afaa91da3d100f2a2535482fce843b2
3
+ metadata.gz: 172b5d6b3faad4610c98dffad89ecd6c4ba7a3e262f928a6311be6753956173b
4
+ data.tar.gz: adcec9d7c3d3f250a073ced02e598c98bec776e6af260717268bd87e771d6730
5
5
  SHA512:
6
- metadata.gz: 859631fb96df5e7a4dabac1a5ed8940c307607743305579bae196c0a5788ddb49eb0886bee952d949173c7b1337d19a1308578de8598fc2ae36de7029fa2579b
7
- data.tar.gz: c7409a32cb58d9b7f2047a2cae281bec689971549e03bb4960391b53699378ebfbaeda16466778a06d98e4b91e5afffa0bf2bfa485e838ef294e80f14ca298a9
6
+ metadata.gz: eb57019cce6e7b1ee25c562c678803d67b3978101f9e62e5dd17f5e88a47ba453846fc54776d489dd96157c300cbf7cc2771c2a0949fb88f25c2f4d996a8b178
7
+ data.tar.gz: 07c9435f445c03944aabadbfb51d0dcff53154c173bdc312af6ac7aa7628546b475e230810ba39d088a140115aa6c9052ec868af80026e2cd6aa121db804708e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.8.0
4
+
5
+ - Unicode 15.0
6
+
7
+ ### 1.7.0
8
+
9
+ - Unicode 14.0
10
+
3
11
  ### 1.6.0
4
12
 
5
13
  * Unicode 13
data/Gemfile.lock CHANGED
@@ -1,14 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-scripts (1.5.0)
4
+ unicode-scripts (1.8.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- irb (1.0.0)
10
- minitest (5.9.0)
11
- rake (12.0.0)
9
+ io-console (0.5.11)
10
+ irb (1.4.1)
11
+ reline (>= 0.3.0)
12
+ minitest (5.16.3)
13
+ rake (13.0.6)
14
+ reline (0.3.1)
15
+ io-console (~> 0.5)
12
16
 
13
17
  PLATFORMS
14
18
  ruby
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2020 Jan Lelis, https://janlelis.com
1
+ Copyright (c) 2016-2022 Jan Lelis, https://janlelis.com
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
@@ -1,12 +1,12 @@
1
- # Unicode::Scripts [![[version]](https://badge.fury.io/rb/unicode-scripts.svg)](https://badge.fury.io/rb/unicode-scripts) [![[travis]](https://travis-ci.org/janlelis/unicode-scripts.png)](https://travis-ci.org/janlelis/unicode-scripts)
1
+ # Unicode::Scripts [![[version]](https://badge.fury.io/rb/unicode-scripts.svg)](https://badge.fury.io/rb/unicode-scripts) [![[ci]](https://github.com/janlelis/unicode-scripts/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-scripts/actions?query=workflow%3ATest)
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: **13.0.0** (March 2020)
5
+ Unicode version: **15.0.0** (September 2022)
6
6
 
7
- Supported Rubies: **2.7**, **2.6**, **2.5**, **2.4**
7
+ Supported Rubies: **3.1**, **3.0**, **2.7**
8
8
 
9
- Old Rubies that might still work: **2.3**, **2.2**, **2.1**, **2.0**
9
+ Old Rubies that might still work: **2.6**, **2.5**, **2.4**, **2.3**, **2.2**, **2.1**, **2.0**
10
10
 
11
11
  ## Gemfile
12
12
 
@@ -83,6 +83,7 @@ Common
83
83
  Coptic
84
84
  Cuneiform
85
85
  Cypriot
86
+ Cypro_Minoan
86
87
  Cyrillic
87
88
  Deseret
88
89
  Devanagari
@@ -117,6 +118,7 @@ Kaithi
117
118
  Kannada
118
119
  Katakana
119
120
  Katakana_Or_Hiragana
121
+ Kawi
120
122
  Kayah_Li
121
123
  Kharoshthi
122
124
  Khitan_Small_Script
@@ -151,6 +153,7 @@ Mro
151
153
  Multani
152
154
  Myanmar
153
155
  Nabataean
156
+ Nag_Mundari
154
157
  Nandinagari
155
158
  New_Tai_Lue
156
159
  Newa
@@ -167,6 +170,7 @@ Old_Persian
167
170
  Old_Sogdian
168
171
  Old_South_Arabian
169
172
  Old_Turkic
173
+ Old_Uyghur
170
174
  Oriya
171
175
  Osage
172
176
  Osmanya
@@ -198,6 +202,7 @@ Tai_Tham
198
202
  Tai_Viet
199
203
  Takri
200
204
  Tamil
205
+ Tangsa
201
206
  Tangut
202
207
  Telugu
203
208
  Thaana
@@ -205,9 +210,11 @@ Thai
205
210
  Tibetan
206
211
  Tifinagh
207
212
  Tirhuta
213
+ Toto
208
214
  Ugaritic
209
215
  Unknown
210
216
  Vai
217
+ Vithkuqi
211
218
  Wancho
212
219
  Warang_Citi
213
220
  Yezidi
@@ -250,6 +257,7 @@ Cham
250
257
  Cher
251
258
  Chrs
252
259
  Copt
260
+ Cpmn
253
261
  Cprt
254
262
  Cyrl
255
263
  Deva
@@ -285,6 +293,7 @@ Ital
285
293
  Java
286
294
  Kali
287
295
  Kana
296
+ Kawi
288
297
  Khar
289
298
  Khmr
290
299
  Khoj
@@ -317,6 +326,7 @@ Mroo
317
326
  Mtei
318
327
  Mult
319
328
  Mymr
329
+ Nagm
320
330
  Nand
321
331
  Narb
322
332
  Nbat
@@ -329,6 +339,7 @@ Orkh
329
339
  Orya
330
340
  Osge
331
341
  Osma
342
+ Ougr
332
343
  Palm
333
344
  Pauc
334
345
  Perm
@@ -373,8 +384,11 @@ Thaa
373
384
  Thai
374
385
  Tibt
375
386
  Tirh
387
+ Tnsa
388
+ Toto
376
389
  Ugar
377
390
  Vaii
391
+ Vith
378
392
  Wara
379
393
  Wcho
380
394
  Xpeo
@@ -391,5 +405,5 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
391
405
 
392
406
  ## MIT License
393
407
 
394
- - Copyright (C) 2016-2020 Jan Lelis <https://janlelis.com>. Released under the MIT license.
408
+ - Copyright (C) 2016-2022 Jan Lelis <https://janlelis.com>. Released under the MIT license.
395
409
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
data/Rakefile CHANGED
@@ -32,6 +32,10 @@ end
32
32
 
33
33
  desc "#{gemspec.name} | Spec"
34
34
  task :spec do
35
- sh "for file in spec/*.rb; do ruby $file; done"
35
+ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
36
+ sh "for %f in (spec/\*.rb) do ruby spec/%f"
37
+ else
38
+ sh "for file in spec/*.rb; do ruby $file; done"
39
+ end
36
40
  end
37
41
  task default: :spec
Binary file
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Unicode
4
4
  module Scripts
5
- VERSION = "1.6.0"
6
- UNICODE_VERSION = "13.0.0"
5
+ VERSION = "1.8.0"
6
+ UNICODE_VERSION = "15.0.0"
7
7
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
8
8
  INDEX_FILENAME = (DATA_DIRECTORY + "/scripts.marshal.gz").freeze
9
9
  end
@@ -16,19 +16,21 @@ describe Unicode::Scripts do
16
16
  assert_equal ["Cyrillic", "Latin"], Unicode::Scripts.of("AС")
17
17
  end
18
18
 
19
- it "will call .script for every character" do
20
- mocked_method = MiniTest::Mock.new
21
- if RUBY_VERSION >= "2.7"
22
- mocked_method.expect :call, "first script", ["С"]
23
- mocked_method.expect :call, "second script", ["A"]
24
- else
25
- mocked_method.expect :call, "first script", ["С", {}]
26
- mocked_method.expect :call, "second script", ["A", {}]
19
+ if RUBY_ENGINE != "jruby"
20
+ it "will call .script for every character" do
21
+ mocked_method = MiniTest::Mock.new
22
+ if RUBY_VERSION >= "2.7"
23
+ mocked_method.expect :call, "first script", ["С"]
24
+ mocked_method.expect :call, "second script", ["A"]
25
+ else
26
+ mocked_method.expect :call, "first script", ["С", {}]
27
+ mocked_method.expect :call, "second script", ["A", {}]
28
+ end
29
+ Unicode::Scripts.stub :script, mocked_method do
30
+ Unicode::Scripts.of("СA")
31
+ end
32
+ mocked_method.verify
27
33
  end
28
- Unicode::Scripts.stub :script, mocked_method do
29
- Unicode::Scripts.of("СA")
30
- end
31
- mocked_method.verify
32
34
  end
33
35
  end
34
36
 
@@ -110,13 +112,17 @@ describe Unicode::Scripts do
110
112
  assert_equal ["Cyrillic", "Latin"], Unicode::Scripts.script_extensions("AС")
111
113
  end
112
114
 
113
- it "will call .scripts for characters that have no explicit script extension" do
114
- mocked_method = MiniTest::Mock.new
115
- mocked_method.expect :call, ["scripts"], ["A", {format: :long}]
116
- Unicode::Scripts.stub :scripts, mocked_method do
117
- Unicode::Scripts.script_extensions("A")
115
+ if RUBY_VERSION >= "3.0" && RUBY_ENGINE != "jruby"
116
+ it "will call .scripts for characters that have no explicit script extension" do
117
+ mocked_method = MiniTest::Mock.new
118
+
119
+ mocked_method.expect(:call, ["scripts"], ["A"], format: :long)
120
+
121
+ Unicode::Scripts.stub :scripts, mocked_method do
122
+ Unicode::Scripts.script_extensions("A")
123
+ end
124
+ mocked_method.verify
118
125
  end
119
- mocked_method.verify
120
126
  end
121
127
  end
122
128
 
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-scripts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-11 00:00:00.000000000 Z
11
+ date: 2022-09-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: "[Unicode 13.0.0] Retrieve the Unicode script(s) a string belongs to.
14
- Can also return the Script_Extension property which is defined as characters which
15
- are 'commonly used with more than one script, but with a limited number of scripts'. "
13
+ description: "[Unicode 15.0.0] Retrieve the Unicode script(s) a string belongs to.\
14
+ \ Can also return the Script_Extension property which is defined as characters which\
15
+ \ are 'commonly used with more than one script, but with a limited number of scripts'. "
16
16
  email:
17
17
  - hi@ruby.consulting
18
18
  executables: []
@@ -20,7 +20,6 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - ".gitignore"
23
- - ".travis.yml"
24
23
  - CHANGELOG.md
25
24
  - CODE_OF_CONDUCT.md
26
25
  - Gemfile
@@ -39,7 +38,7 @@ homepage: https://github.com/janlelis/unicode-scripts
39
38
  licenses:
40
39
  - MIT
41
40
  metadata: {}
42
- post_install_message:
41
+ post_install_message:
43
42
  rdoc_options: []
44
43
  require_paths:
45
44
  - lib
@@ -54,8 +53,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
53
  - !ruby/object:Gem::Version
55
54
  version: '0'
56
55
  requirements: []
57
- rubygems_version: 3.1.2
58
- signing_key:
56
+ rubyforge_project:
57
+ rubygems_version: 2.7.10
58
+ signing_key:
59
59
  specification_version: 4
60
60
  summary: Which script(s) does a Unicode string belong to?
61
61
  test_files:
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- rvm:
5
- - 2.7
6
- - 2.6
7
- - 2.5
8
- - 2.4
9
- - 2.3
10
- - ruby-head
11
- - jruby-9.2.9.0
12
- - truffleruby
13
-
14
- matrix:
15
- allow_failures:
16
- - rvm: 2.3
17
- - rvm: ruby-head
18
- - rvm: jruby-2.9.2.0
19
- - rvm: truffleruby
20
- # fast_finish: true