unicode-display_width 1.3.2 → 1.3.3

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: 2b7d863c89911e713e7c30e4ff3571ce0fffd32399e8620e26e1799e96aa2245
4
- data.tar.gz: b5cc4d714865edbac983825362647f2ad99dd6757c4d24de9b404fbca08c518c
3
+ metadata.gz: 13081ffa0b570a060501c5cb48b0ab25aea9558137a3e0a46f9e4599814735bb
4
+ data.tar.gz: 2a7bbe059e2f9e1c246438c1636a53fce5ee591c0ccef612772ca8794bb935c8
5
5
  SHA512:
6
- metadata.gz: cbf3ff604d707be06e88f08315e091eb8c8b65a7fa579ca578aa498c7eb24fab6c1dada8f039601d5dce2ee9efbde3ecf205fc642a088ddd24c1df1785662a97
7
- data.tar.gz: 901aa194f0168c940b7889b8b16667148e4719bb507feafe235ad49fa134e66ad9eb7d3c20f277e15fe18ec747ad8c0d6fc5e2aa0b446fd2861fb81e5989a1f3
6
+ metadata.gz: 0b3580278a9600b205029990a514a494703756a6e751d9a3b7b5cd8318382fdd0c0c64928e7221a5b53b48d4e334b4f47ac5615f74b87b7b83f84440faae2ff8
7
+ data.tar.gz: dfcbc57ebd97c33fa8d6af066c8b0e0156ca104c737e42f7a123ae632f47ccbfc53c70f9f332cc9d3ed23204d66d2f4a02542fe47637a19115be1720720d2506
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.3.3
4
+
5
+ - Replace Gem::Util.gunzip with direct zlib implementation
6
+ This removes the dependency on rubygems, fixes #17
7
+
3
8
  ## 1.3.2
4
9
 
5
10
  - Explicitly load rubygems/util, fixes regression in 1.3.1 (autoload issue)
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.2'
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 'rubygems/util'
1
+ require 'zlib'
2
2
  require_relative 'constants'
3
3
 
4
4
  module Unicode
5
5
  module DisplayWidth
6
- INDEX = Marshal.load(Gem::Util.gunzip(File.binread(INDEX_FILENAME)))
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.2
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-04-19 00:00:00.000000000 Z
11
+ date: 2018-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec