unicode-categories 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +2 -2
- data/MIT-LICENSE.txt +1 -1
- data/README.md +5 -5
- data/Rakefile +5 -1
- data/data/categories.marshal.gz +0 -0
- data/lib/unicode/categories/constants.rb +2 -2
- data/spec/unicode_categories_spec.rb +16 -14
- metadata +4 -5
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '039ff4dee317c3dff7286bb8c65f10250bed948baeea53aec26ca1c495c27698'
|
4
|
+
data.tar.gz: aee08ab5847d86d7084c2323422f77d49245bf72d4be7ec8e2f5bb79cbcb265b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc22f38e5b0594ffdf58ba0d62e9039a31ccabb2f5f4e9a11e82740be402b205bc2d314f0518a856d1183b746871c6aa177c3266ed9566f479b2a3236ed42ed
|
7
|
+
data.tar.gz: 7ca812255e51eec4d0c1581871298f7499270c6a30d54770bc8f601f21a3a87fcfc7a57372c50970bee40019827427bdc64668922859d4651614cdeee84d0171
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
# Unicode::Categories [![[version]](https://badge.fury.io/rb/unicode-categories.svg)](https://badge.fury.io/rb/unicode-categories) [![[
|
1
|
+
# Unicode::Categories [![[version]](https://badge.fury.io/rb/unicode-categories.svg)](https://badge.fury.io/rb/unicode-categories) [![[ci]](https://github.com/janlelis/unicode-categories/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-categories/actions?query=workflow%3ATest)
|
2
2
|
|
3
3
|
Returns a list which [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category) a Unicode string belongs to.
|
4
4
|
|
5
|
-
Unicode version: **
|
5
|
+
Unicode version: **15.0.0** (September 2022)
|
6
6
|
|
7
|
-
Supported Rubies: **
|
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
|
|
@@ -95,6 +95,6 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
|
|
95
95
|
|
96
96
|
## MIT License
|
97
97
|
|
98
|
-
- Copyright (C) 2016-
|
98
|
+
- Copyright (C) 2016-2022 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
99
99
|
- Unicode data: https://www.unicode.org/copyright.html#Exhibit1
|
100
100
|
|
data/Rakefile
CHANGED
@@ -32,6 +32,10 @@ end
|
|
32
32
|
|
33
33
|
desc "#{gemspec.name} | Spec"
|
34
34
|
task :spec do
|
35
|
-
|
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
|
data/data/categories.marshal.gz
CHANGED
Binary file
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
module Unicode
|
4
4
|
module Categories
|
5
|
-
VERSION = "1.
|
6
|
-
UNICODE_VERSION = "
|
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 + "/categories.marshal.gz").freeze
|
9
9
|
end
|
@@ -21,21 +21,23 @@ describe Unicode::Categories do
|
|
21
21
|
assert_equal ["Lu", "Nd"], Unicode::Categories.of("2A")
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
if RUBY_ENGINE != "jruby"
|
25
|
+
it "will call .category for every character" do
|
26
|
+
mocked_method = MiniTest::Mock.new
|
27
|
+
if RUBY_VERSION >= "2.7"
|
28
|
+
mocked_method.expect :call, "first category", ["A"]
|
29
|
+
mocked_method.expect :call, "second category", ["2"]
|
30
|
+
else
|
31
|
+
mocked_method.expect :call, "first category", ["A", {}]
|
32
|
+
mocked_method.expect :call, "second category", ["2", {}]
|
33
|
+
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
Unicode::Categories.stub :category, mocked_method do
|
36
|
+
Unicode::Categories.of("A2")
|
37
|
+
end
|
38
|
+
mocked_method.verify
|
39
|
+
end
|
40
|
+
end
|
39
41
|
end
|
40
42
|
|
41
43
|
describe ".category" do
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-categories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.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:
|
11
|
+
date: 2022-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: '[Unicode
|
13
|
+
description: '[Unicode 15.0.0] Determine which Unicode "General Categories" a string
|
14
14
|
belongs to'
|
15
15
|
email:
|
16
16
|
- hi@ruby.consulting
|
@@ -19,7 +19,6 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- ".gitignore"
|
22
|
-
- ".travis.yml"
|
23
22
|
- CHANGELOG.md
|
24
23
|
- CODE_OF_CONDUCT.md
|
25
24
|
- Gemfile
|
@@ -53,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
52
|
- !ruby/object:Gem::Version
|
54
53
|
version: '0'
|
55
54
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
55
|
+
rubygems_version: 3.3.7
|
57
56
|
signing_key:
|
58
57
|
specification_version: 4
|
59
58
|
summary: Determine the Unicode General Categories of a string
|
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
|