unicode-confusable 1.3.2 → 1.4.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: 260a5b462989d3c2c6a5c67576a0a3b468b889bb0eb2b692088736cd6399f747
4
- data.tar.gz: c15561e7ac31bb1fc86c154a2f099ac12f6444956ba7bd2688dc7c49408327e3
3
+ metadata.gz: ff7ca55c41e0ea741c409a0e98b1be63aa12b128788a04f52452dbe38a3d02a3
4
+ data.tar.gz: 8b674ed826c9199f65b39daaeb5187c85e8511066c44f513c80e24f6bb6bdb04
5
5
  SHA512:
6
- metadata.gz: 81ffe911508611ca25859df749cae0b9ff779d93c4e888910d515e83f514683e934d205976c64ca63c74d0ac285a1c8a7f325c974f7cad76b12218b8f7b710a7
7
- data.tar.gz: 32b7925b0f3e51d61a79604ea506e1eec1d7dffe55ad124b8768b6ae4536f990b829b9f9f9a71f9723854acc34c5d1b6795e88ea763d62a90b5e4f82fc108d14
6
+ metadata.gz: 0b29f5ece2f51581ff30c366f046052597a33289e2db8707d0675e12e48a747cf6cea0e4eeebac4ee41a433bccb435d395272eeff0363aad3f5ecbd67f0463ad
7
+ data.tar.gz: a6b478be06b68db144fe3ad219bf994c0e30d67bef5a56791df0f017836d2570c1023e34a642869f6b5a83bf0d902e68c98c89f8072bb6c9ed934e3dbfa7c313
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.4.0
4
+
5
+ * Unicode 11
6
+ * Do not depend on rubygems (only use zlib stdlib for unzipping)
7
+
3
8
  ### 1.3.2
4
9
 
5
10
  * Explicitly load rubygems/util, fixes regression in 1.3.1
data/MIT-LICENSE.txt CHANGED
@@ -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
  Compares two strings if they are visually confusable as described in [Unicode® Technical Standard #39](http://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](ftp://ftp.unicode.org/Public/security/10.0.0/confusables.txt), and normalizing the string again.
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
 
@@ -33,7 +33,7 @@ Unicode::Confusable.skeleton "ℜ𝘂ᖯʏ" # => "Ruby"
33
33
 
34
34
  ### List
35
35
 
36
- List all confusables of specfic character:
36
+ List all confusables of specific character:
37
37
 
38
38
  ```ruby
39
39
  Unicode::Confusable.list("o", false)
@@ -61,5 +61,5 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
61
61
 
62
62
  ## MIT License
63
63
 
64
- - Copyright (C) 2016-2017 Jan Lelis <http://janlelis.com>. Released under the MIT license.
64
+ - Copyright (C) 2016-2018 Jan Lelis <http://janlelis.com>. Released under the MIT license.
65
65
  - Unicode data: http://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -1,7 +1,7 @@
1
1
  module Unicode
2
2
  module Confusable
3
- VERSION = "1.3.2".freeze
4
- UNICODE_VERSION = "10.0.0".freeze
3
+ VERSION = "1.4.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 + '/confusable.marshal.gz').freeze
7
7
  end
@@ -1,8 +1,14 @@
1
- require 'rubygems/util'
2
- require_relative 'constants'
1
+ # frozen_string_literal: true
2
+
3
+ require "zlib"
4
+ require_relative "constants"
3
5
 
4
6
  module Unicode
5
7
  module Confusable
6
- 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
7
13
  end
8
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.3.2
4
+ version: 1.4.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] Compares two strings if they are visually confusable
13
+ description: "[Unicode 11.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 normalizing the string again."