unicode-display_width 2.0.0.pre2 → 2.2.0

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: 16df472b2cba994dc42b13d90148fc976fc0a4329cc22b570dc1b38944f5a748
4
- data.tar.gz: 5d9febcb7006fb1d6edf19c4acaec72f5229ae99e9e5d1bd206e323795bf4961
3
+ metadata.gz: 7ffaa48384e0e104eeaa7b4ddd92c77c014c42670fd34b9b53c484328cfd6101
4
+ data.tar.gz: aca8e2e11f726baf9ef0dcbf7d7c6e49aa1e9e521b8daef737e043afe695f201
5
5
  SHA512:
6
- metadata.gz: b1ce5cb4e91a79d2c5549e34bb43a29d6cd0a4c80c581d4def0efce81588d19d16b74e88aec4039a7fbd02c3670490eb7218db5f74d28555a0da950fd39c0757
7
- data.tar.gz: cda1b9b21ed83462ad68a4e8abfabf6616d1646287868cfcafb30575581ccea2b83c2299d1b2194776a4e77b2bceddafeefaf8d64a8953f8e01722d21675a759
6
+ metadata.gz: bef56545861c63ac28714e9f83e31b2e37791c4695def8d8a470caec8edfbc5d04c2d09b28f478928969966f7d48d47c41a01dd9db3b7655a5926731da9292bd
7
+ data.tar.gz: 3bcdb857803a71186d5de93cebee4343b16ffddf09177dd5312013c245eb4beac5cf50c4ebdd866a13ee85004ed05a8c4a104f213ba7f5b0397ab74cf175cd10
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.0
4
+
5
+ - Add *Hangul Jamo Extended-B* block to zero-width chars, thanks @ninjalj #22
6
+
7
+ ## 2.1.0
8
+
9
+ - Unicode 14.0
10
+
11
+ ## 2.0.0
12
+
13
+ - Release 2.0.0
14
+ - Supports Ruby 3.0
15
+
3
16
  ## 2.0.0.pre2
4
17
 
5
18
  - Update 2.0 branch to Unicode 13
@@ -20,6 +33,10 @@ Refactorings / Internal Changes:
20
33
  - Freeze string literals
21
34
  - The Unicode::DisplayWidth now is class, instead of a module, this enables the new config-object API
22
35
 
36
+ ## 1.8.0
37
+
38
+ - Unicode 14.0 (last release of 1.x)
39
+
23
40
  ## 1.7.0
24
41
 
25
42
  - Unicode 13
data/MIT-LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT LICENSE
2
2
 
3
- Copyright (c) 2011, 2015-2020 Jan Lelis
3
+ Copyright (c) 2011, 2015-2022 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
@@ -1,16 +1,16 @@
1
- ## Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](https://badge.fury.io/rb/unicode-display_width) [<img src="https://travis-ci.org/janlelis/unicode-display_width.png" />](https://travis-ci.org/janlelis/unicode-display_width)
1
+ ## Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](https://badge.fury.io/rb/unicode-display_width) [<img src="https://github.com/janlelis/unicode-display_width/workflows/Test/badge.svg" />](https://github.com/janlelis/unicode-display_width/actions?query=workflow%3ATest)
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. It does not rely on the OS vendor (like [wcwidth()](https://github.com/janlelis/wcswidth-ruby)) to provide an up-to-date method for measuring string width.
4
4
 
5
- Unicode version: **13.0.0** (March 2020)
5
+ Unicode version: **14.0.0** (September 2021)
6
6
 
7
- Supported Rubies: **2.7**, **2.6**, **2.5**, **2.4**
7
+ Supported Rubies: **3.1**, **3.0**, **2.7**
8
8
 
9
- Old Rubies which might still work: **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
9
+ Old Rubies which might still work: **2.6**, **2.5**, **2.4**, **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
10
10
 
11
- ## Version 2.0.pre1 — Breaking Changes
11
+ ## Version 2.0 — Breaking Changes
12
12
 
13
- Some features of this library have been marked deprecated for a long time and will be removed with Version 2.0, which will be released December 2020:
13
+ Some features of this library were marked deprecated for a long time and have been removed with Version 2.0:
14
14
 
15
15
  - Aliases of display_width (…\_size, …\_length) have been removed
16
16
  - Auto-loading of string core extension has been removed:
@@ -18,7 +18,7 @@ Some features of this library have been marked deprecated for a long time and wi
18
18
  If you are relying on the `String#display_width` string extension to be automatically loaded (old behavior), please load it explicitly now:
19
19
 
20
20
  ```ruby
21
- require "unicode-display_width/string_ext"
21
+ require "unicode/display_width/string_ext"
22
22
  ```
23
23
 
24
24
  You could also change your `Gemfile` line to achieve this:
@@ -44,7 +44,7 @@ X | (user defined) | Overwrites any other values
44
44
  2 | `"\u{2E3A}"` | TWO-EM DASH
45
45
  3 | `"\u{2E3B}"` | THREE-EM DASH
46
46
  0 | General Categories: Mn, Me, Cf (non-arabic) | Excludes ARABIC format characters
47
- 0 | `"\u{1160}".."\u{11FF}"` | HANGUL JUNGSEONG
47
+ 0 | `"\u{1160}".."\u{11FF}"`, `"\u{D7B0}".."\u{D7FF}"` | HANGUL JUNGSEONG
48
48
  0 | `"\u{2060}".."\u{206F}"`, `"\u{FFF0}".."\u{FFF8}"`, `"\u{E0000}".."\u{E0FFF}"` | Ignorable ranges
49
49
  2 | East Asian Width: F, W | Full-width characters
50
50
  2 | `"\u{3400}".."\u{4DBF}"`, `"\u{4E00}".."\u{9FFF}"`, `"\u{F900}".."\u{FAFF}"`, `"\u{20000}".."\u{2FFFD}"`, `"\u{30000}".."\u{3FFFD}"` | Full-width ranges
@@ -91,14 +91,14 @@ Unicode::DisplayWidth.of("a\tb", 1, "\t".ord => 10)) # => tab counted as 10, so
91
91
 
92
92
  #### Emoji Support
93
93
 
94
- Experimental emoji support is included. It will adjust the string's size for modifier and zero-width joiner sequences. You will need to add the [unicode-emoji](https://github.com/janlelis/unicode-emoji) gem to your Gemfile:
94
+ Emoji width support is included, but in must be activated manually. It will adjust the string's size for modifier and zero-width joiner sequences. You also need to add the [unicode-emoji](https://github.com/janlelis/unicode-emoji) gem to your Gemfile:
95
95
 
96
96
  ```ruby
97
97
  gem 'unicode-display_width'
98
98
  gem 'unicode-emoji'
99
99
  ```
100
100
 
101
- You can then activate the emoji string width adjustments by passing `emoji: true` as fourth parameter:
101
+ Enable the emoji string width adjustments by passing `emoji: true` as fourth parameter:
102
102
 
103
103
  ```ruby
104
104
  Unicode::DisplayWidth.of "🤾🏽‍♀️" # => 5
@@ -124,7 +124,7 @@ require 'unicode/display_width'
124
124
  display_width = Unicode::DisplayWidth.new(
125
125
  # ambiguous: 1,
126
126
  overwrite: { "A".ord => 100 },
127
- emoji: true
127
+ emoji: true,
128
128
  )
129
129
 
130
130
  display_width.of "⚀" # => 1
@@ -153,7 +153,7 @@ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related
153
153
 
154
154
  ## Copyright & Info
155
155
 
156
- - Copyright (c) 2011, 2015-2020 Jan Lelis, https://janlelis.com, released under the MIT
156
+ - Copyright (c) 2011, 2015-2022 Jan Lelis, https://janlelis.com, released under the MIT
157
157
  license
158
158
  - Early versions based on runpaint's unicode-data interface: Copyright (c) 2009 Run Paint Run Run
159
159
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Unicode
4
4
  class DisplayWidth
5
- VERSION = "2.0.0.pre2"
6
- UNICODE_VERSION = "13.0.0".freeze
5
+ VERSION = "2.2.0"
6
+ UNICODE_VERSION = "14.0.0"
7
7
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/")
8
8
  INDEX_FILENAME = DATA_DIRECTORY + "/display_width.marshal.gz"
9
9
  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: 2.0.0.pre2
4
+ version: 2.2.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: 2020-03-11 00:00:00.000000000 Z
11
+ date: 2022-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -30,15 +30,15 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.4'
41
- description: "[Unicode 13.0.0] Determines the monospace display width of a string
40
+ version: '13.0'
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
43
  email:
44
44
  - hi@ruby.consulting
@@ -65,6 +65,7 @@ metadata:
65
65
  changelog_uri: https://github.com/janlelis/unicode-display_width/blob/master/CHANGELOG.md
66
66
  source_code_uri: https://github.com/janlelis/unicode-display_width
67
67
  bug_tracker_uri: https://github.com/janlelis/unicode-display_width/issues
68
+ rubygems_mfa_required: 'true'
68
69
  post_install_message:
69
70
  rdoc_options: []
70
71
  require_paths:
@@ -76,11 +77,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
77
  version: 1.9.3
77
78
  required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  requirements:
79
- - - ">"
80
+ - - ">="
80
81
  - !ruby/object:Gem::Version
81
- version: 1.3.1
82
+ version: '0'
82
83
  requirements: []
83
- rubygems_version: 3.1.2
84
+ rubygems_version: 3.3.3
84
85
  signing_key:
85
86
  specification_version: 4
86
87
  summary: Determines the monospace display width of a string in Ruby.