unicode-display_width 1.5.0 → 1.8.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: 6da19ce5cab748ae567235ad91d8e5c9526215e801b399691dfadc42ac794433
4
- data.tar.gz: 343aa9608ff36d4b651b671936ba1ca024f6611ec7fc4aa39e2c3af625801c71
3
+ metadata.gz: 482905db9c50997ae4a1a05a972fe17d4d7c547297b1052e61de95ca2cc8c9fa
4
+ data.tar.gz: f65af84de6f278a23626f5777d6453267cf8882b77a4752bb7bcec520b6788d1
5
5
  SHA512:
6
- metadata.gz: a2807cafb6f6e46fbf9d4d86b0f4e9d9a86b34a77d687f6fdf8284a7731000b0bcd2533eb3363b9909854d4af0f9cd1f5b9bd56b1003b83400b392e2aa777359
7
- data.tar.gz: 10abe3e664ed62d93ca3ffe1150e3ef163a53f48d324657d5c908538324473a0a77c91003cdb4ba0e840dc7053ab4ca06ec4027aeed0badb21780ee0aeec95b8
6
+ metadata.gz: cf8867e9e4d81cea462399f1a7cb00c4875806033d66d3b8744f39741f0f0d0a1bc2853abf8e02d4799bdb0f052d00293626c07f57333d9b66459fb831250771
7
+ data.tar.gz: eb82ce51aaa94fe4038f000122f2dc38f83ae93dade3183a25be60ad4018d937c3482e9bfe29d4e2ddd0679ec3c01fa89ae2eebd0a64819ce1e70e0f5f6244ca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.8.0
4
+
5
+ - Unicode 14.0 (last release of 1.x)
6
+
7
+ ## 1.7.0
8
+
9
+ - Unicode 13
10
+
11
+ ## 1.6.1
12
+
13
+ - Fix that ambiguous and overwrite options where ignored for emoji-measuring
14
+
15
+ ## 1.6.0
16
+
17
+ - Unicode 12.1
18
+
3
19
  ## 1.5.0
4
20
 
5
21
  - Unicode 12
data/MIT-LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT LICENSE
2
2
 
3
- Copyright (c) 2011, 2015-2019 Jan Lelis
3
+ Copyright (c) 2011, 2015-2020 Jan Lelis
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Determines the monospace display width of a string in Ruby. Implementation based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt) and other data, 100% in Ruby. Other than [wcwidth()](https://github.com/janlelis/wcswidth-ruby), which fulfills a similar purpose, it does not rely on the OS vendor to provide an up-to-date method for measuring string width.
4
4
 
5
- Unicode version: **12.0.0**
5
+ Unicode version: **14.0.0** (September 2021)
6
6
 
7
- Supported Rubies: **2.6**, **2.5**, **2.4**
7
+ Supported Rubies: **2.7**, **2.6**, **2.5**, **2.4**
8
8
 
9
9
  Old Rubies that might still work: **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
10
10
 
@@ -118,7 +118,7 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
118
118
 
119
119
  ## Copyright & Info
120
120
 
121
- - Copyright (c) 2011, 2015-2019 Jan Lelis, https://janlelis.com, released under the MIT
121
+ - Copyright (c) 2011, 2015-2020 Jan Lelis, https://janlelis.com, released under the MIT
122
122
  license
123
123
  - Early versions based on runpaint's unicode-data interface: Copyright (c) 2009 Run Paint Run Run
124
124
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -1,7 +1,7 @@
1
1
  module Unicode
2
2
  module DisplayWidth
3
- VERSION = '1.5.0'
4
- UNICODE_VERSION = "12.0.0".freeze
3
+ VERSION = '1.8.0'
4
+ UNICODE_VERSION = "14.0.0"
5
5
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
6
6
  INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
7
7
  end
@@ -19,7 +19,7 @@ module Unicode
19
19
  total_width + (overwrite[codepoint] || width || 1)
20
20
  }
21
21
 
22
- res -= emoji_extra_width_of(string) if options[:emoji]
22
+ res -= emoji_extra_width_of(string, ambiguous, overwrite) if options[:emoji]
23
23
  res < 0 ? 0 : res
24
24
  end
25
25
 
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.5.0
4
+ version: 1.8.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: 2019-03-05 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -38,9 +38,10 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.4'
41
- description: "[Unicode 12.0.0] Determines the monospace display width of a string
41
+ description: "[Unicode 14.0.0] Determines the monospace display width of a string
42
42
  using EastAsianWidth.txt, Unicode general category, and other data."
43
- email: mail@janlelis.de
43
+ email:
44
+ - hi@ruby.consulting
44
45
  executables: []
45
46
  extensions: []
46
47
  extra_rdoc_files:
@@ -79,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
80
  - !ruby/object:Gem::Version
80
81
  version: '0'
81
82
  requirements: []
82
- rubygems_version: 3.0.1
83
+ rubygems_version: 3.2.3
83
84
  signing_key:
84
85
  specification_version: 4
85
86
  summary: Determines the monospace display width of a string in Ruby.