unicode-confusable 1.7.0 → 1.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f45afb4becd4f7e38fdbaeb65ad293fd4ba9afaaa9df475db59ec5ed0424908d
4
- data.tar.gz: 0aa2dd5b0e52d04527c1eafd662228ac2d1ba8cb33cd3720038b788904e2dc5c
3
+ metadata.gz: fa72e29c29ddad3e5ec3ac90a097fba32d7ae67973516c64839840ff19545347
4
+ data.tar.gz: a4c7ebe6b954586a5b2fcdf9a372bfb078fec5c0a192668b5bf40f4f85ec4951
5
5
  SHA512:
6
- metadata.gz: c353fdaf8138b9667306313329b35916b3054eac6e4c012d0ea300e9488d0f39d3e593416a431d5d7fdb90a4c1e717c560df460cef15e302b9ca4f80943ccb7b
7
- data.tar.gz: 787e0357eaa8278912bdd2c7f696686a916d6dd18e2f2d1f7643834cb1402d6f6de88f87b23d93873a5a80b9a59f4ec3c2af2bd0330b76f6fd10083c7ed5fe0c
6
+ metadata.gz: e9e7b018132a8deed7a5d79b1262f2fd9552a67fae2ffae39c9c7f4477a3e88f223c19d47bdbd7c12b70f8f76d1e8d0c9ae0b1dcf953ae1fb6fb802315a204bd
7
+ data.tar.gz: 9cdf8a1b69c4715896b3942be5d68831938a8ca80673a11b1e866f4620e49f15912e0f628c070a84ec8c9c0c6789f1fb4c97221e536b5e1af4ebbb89a9548e6e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.9.0
4
+
5
+ - Unicode 15.0
6
+
7
+ ### 1.8.0
8
+
9
+ - Unicode 14.0
10
+
3
11
  ### 1.7.0
4
12
 
5
13
  - Unicode 13
data/Gemfile.lock CHANGED
@@ -1,21 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-confusable (1.3.0)
4
+ unicode-confusable (1.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ io-console (0.5.6)
10
+ irb (1.2.9)
11
+ reline (>= 0.1.5)
9
12
  minitest (5.10.2)
10
13
  rake (12.0.0)
14
+ reline (0.1.10)
15
+ io-console (~> 0.5)
11
16
 
12
17
  PLATFORMS
13
18
  ruby
14
19
 
15
20
  DEPENDENCIES
21
+ irb
16
22
  minitest
17
23
  rake
18
24
  unicode-confusable!
19
25
 
20
26
  BUNDLED WITH
21
- 1.14.6
27
+ 2.1.4
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,14 @@
1
- # Unicode::Confusable [![[version]](https://badge.fury.io/rb/unicode-confusable.svg)](https://badge.fury.io/rb/unicode-confusable) [![[travis]](https://travis-ci.org/janlelis/unicode-confusable.png)](https://travis-ci.org/janlelis/unicode-confusable)
1
+ # Unicode::Confusable [![[version]](https://badge.fury.io/rb/unicode-confusable.svg)](https://badge.fury.io/rb/unicode-confusable) [![[ci]](https://github.com/janlelis/unicode-confusable/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-confusable/actions?query=workflow%3ATest)
2
2
 
3
3
  Compares two strings if they are visually confusable as described in [Unicode® Technical Standard #39](https://www.unicode.org/reports/tr39/#Confusable_Detection): Both strings get transformed into a skeleton format before comparing them. The skeleton is generated by normalizing the string ([NFD](http://unicode.org/reports/tr15/#Norm_Forms)), replacing [confusable characters](https://unicode.org/Public/security/12.1.0/confusables.txt), and normalizing the string again.
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
+ \* The Unicode normalization [depends on your Ruby version](https://idiosyncratic-ruby.com/73-unicode-version-mapping.html)
8
8
 
9
- Old Rubies which might still work: **2.3**, **2.2**
9
+ Supported Rubies: **3.1**, **3.0**, **2.7**
10
+
11
+ Old Rubies which might still work: **2.6**, **2.5**, **2.4**, **2.3**, **2.2**
10
12
 
11
13
  ## Usage
12
14
 
@@ -61,5 +63,5 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
61
63
 
62
64
  ## MIT License
63
65
 
64
- - Copyright (C) 2016-2020 Jan Lelis <https://janlelis.com>. Released under the MIT license.
66
+ - Copyright (C) 2016-2022 Jan Lelis <https://janlelis.com>. Released under the MIT license.
65
67
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
data/Rakefile CHANGED
@@ -32,6 +32,6 @@ 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
+ ruby "spec/unicode_confusable_spec.rb"
36
36
  end
37
37
  task default: :spec
Binary file
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Unicode
4
4
  module Confusable
5
- VERSION = "1.7.0"
6
- UNICODE_VERSION = "13.0.0"
5
+ VERSION = "1.9.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 + "/confusable.marshal.gz").freeze
9
9
  end
@@ -0,0 +1,14 @@
1
+ # Classes
2
+ module Unicode
3
+ module Confusable
4
+ VERSION: String
5
+ UNICODE_VERSION: String
6
+ DATA_DIRECTORY: String
7
+ INDEX_FILENAME: String
8
+ INDEX: Hash
9
+
10
+ def self.confusable?: (String string1, String string2) -> bool
11
+ def self.skeleton: (String string) -> String
12
+ def self.list: (String char, ?bool partial_mapping_allowed) -> Array
13
+ end
14
+ end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-confusable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.9.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: 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] Compares two strings if they are visually confusable
13
+ description: "[Unicode 15.0.0] Compares two strings if they are visually confusable
14
14
  as described in Unicode® Technical Standard #39: Both strings get transformed into
15
15
  a skeleton format before comparing them. The skeleton is generated by normalizing
16
16
  the string, replacing confusable characters, and then normalizing the string again."
@@ -21,7 +21,6 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - ".gitignore"
24
- - ".travis.yml"
25
24
  - CHANGELOG.md
26
25
  - CODE_OF_CONDUCT.md
27
26
  - Gemfile
@@ -34,6 +33,7 @@ files:
34
33
  - lib/unicode/confusable/constants.rb
35
34
  - lib/unicode/confusable/index.rb
36
35
  - lib/unicode/confusable/string_ext.rb
36
+ - sig/unicode-confusable.rbs
37
37
  - spec/unicode_confusable_spec.rb
38
38
  - unicode-confusable.gemspec
39
39
  homepage: https://github.com/janlelis/unicode-confusable
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  requirements: []
58
- rubygems_version: 3.1.2
58
+ rubygems_version: 3.3.7
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Detect characters that look visually similar.
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