unicode-display_width 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +4 -0
- data/lib/unicode/display_width.rb +1 -2
- data/lib/unicode/display_width/constants.rb +1 -1
- data/unicode-display_width.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39825a3fe5306451922de8c4bffb8644fe5c1a7f
|
4
|
+
data.tar.gz: 734fd44fbda2f64ee75d935f51ef5bdad1ce0aa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 170604ecddb364405fd275e84f2230a2d861e3e39b8fcf38a7a2a4baae6a7f79559d4a52505152ac34152a65ee1284ce35d5f5e6db60805fac7e013af71773cb
|
7
|
+
data.tar.gz: b7248ef38dc57d367767e408f09890e0b5416238f602fe6cc3ed3f90dd7d84e3ab5386d258c7894a5605f15d626c7ef84de11a84575bbaed657d474331973613
|
data/CHANGELOG.txt
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
require_relative 'display_width/constants'
|
2
|
+
require_relative 'display_width/index'
|
2
3
|
|
3
4
|
module Unicode
|
4
5
|
module DisplayWidth
|
5
6
|
def self.of(string, ambiguous = 1, overwrite = {})
|
6
|
-
require_relative 'display_width/index' unless defined? ::Unicode::DisplayWidth::INDEX
|
7
|
-
|
8
7
|
res = string.unpack('U*').inject(0){ |total_width, codepoint|
|
9
8
|
index_or_value = INDEX
|
10
9
|
codepoint_depth_offset = codepoint
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Unicode
|
2
2
|
module DisplayWidth
|
3
|
-
VERSION = '1.1.
|
3
|
+
VERSION = '1.1.1'
|
4
4
|
UNICODE_VERSION = "9.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
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.email = "mail@janlelis.de"
|
9
9
|
s.homepage = "http://github.com/janlelis/unicode-display_width"
|
10
10
|
s.summary = "Determines the monospace display width of a string in Ruby."
|
11
|
-
s.description = "[Unicode #{Unicode::DisplayWidth::
|
11
|
+
s.description = "[Unicode #{Unicode::DisplayWidth::UNICODE_VERSION}] Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, and other data."
|
12
12
|
s.files = Dir.glob(%w[{lib,spec}/**/*.rb [A-Z]*.{txt,rdoc} data/display_width.marshal.gz]) + %w{Rakefile unicode-display_width.gemspec}
|
13
13
|
s.extra_rdoc_files = ["README.md", "MIT-LICENSE.txt", "CHANGELOG.txt"]
|
14
14
|
s.license = 'MIT'
|
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.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.4'
|
41
|
-
description: "[Unicode
|
41
|
+
description: "[Unicode 9.0.0] Determines the monospace display width of a string using
|
42
42
|
EastAsianWidth.txt, Unicode general category, and other data."
|
43
43
|
email: mail@janlelis.de
|
44
44
|
executables: []
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.4.8
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Determines the monospace display width of a string in Ruby.
|