unicode-display_width 1.3.2 → 1.3.3
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 +5 -0
- data/README.md +4 -0
- data/lib/unicode/display_width/constants.rb +1 -1
- data/lib/unicode/display_width/index.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13081ffa0b570a060501c5cb48b0ab25aea9558137a3e0a46f9e4599814735bb
|
4
|
+
data.tar.gz: 2a7bbe059e2f9e1c246438c1636a53fce5ee591c0ccef612772ca8794bb935c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b3580278a9600b205029990a514a494703756a6e751d9a3b7b5cd8318382fdd0c0c64928e7221a5b53b48d4e334b4f47ac5615f74b87b7b83f84440faae2ff8
|
7
|
+
data.tar.gz: dfcbc57ebd97c33fa8d6af066c8b0e0156ca104c737e42f7a123ae632f47ccbfc53c70f9f332cc9d3ed23204d66d2f4a02542fe47637a19115be1720720d2506
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,10 @@ Determines the monospace display width of a string in Ruby. Implementation based
|
|
4
4
|
|
5
5
|
Unicode version: **10.0.0**
|
6
6
|
|
7
|
+
Supported Rubies: **2.5**, **2.4**, **2.3**
|
8
|
+
|
9
|
+
Old Rubies that might still work: **2.2**, **2.1**, **2.0**, **1.9**
|
10
|
+
|
7
11
|
## Introduction to Character Widths
|
8
12
|
|
9
13
|
Guesing the correct space a character will consume on terminals is not easy. There is no single standard. Most implementations combine data from [East Asian Width](http://www.unicode.org/reports/tr11/), some [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category), and hand-picked adjustments.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Unicode
|
2
2
|
module DisplayWidth
|
3
|
-
VERSION = '1.3.
|
3
|
+
VERSION = '1.3.3'
|
4
4
|
UNICODE_VERSION = "10.0.0".freeze
|
5
5
|
DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
|
6
6
|
INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
|
@@ -1,8 +1,12 @@
|
|
1
|
-
require '
|
1
|
+
require 'zlib'
|
2
2
|
require_relative 'constants'
|
3
3
|
|
4
4
|
module Unicode
|
5
5
|
module DisplayWidth
|
6
|
-
|
6
|
+
File.open(INDEX_FILENAME, "rb") do |file|
|
7
|
+
serialized_data = Zlib::GzipReader.new(file).read
|
8
|
+
serialized_data.force_encoding Encoding::BINARY
|
9
|
+
INDEX = Marshal.load(serialized_data)
|
10
|
+
end
|
7
11
|
end
|
8
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-display_width
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
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-
|
11
|
+
date: 2018-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|