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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 388b49680063aa1e89739dda870f2a9d8897def7
4
- data.tar.gz: 76ad33513f9e7c231883947e300fbc6daf4c3751
3
+ metadata.gz: 39825a3fe5306451922de8c4bffb8644fe5c1a7f
4
+ data.tar.gz: 734fd44fbda2f64ee75d935f51ef5bdad1ce0aa0
5
5
  SHA512:
6
- metadata.gz: a3ace05864118bdba8c2997528e2d36a77e680ceef71910a555e706964bdd2c4e6a2d1f830fb41c29f70e5d3b26e22b2f581b89313d29e47b99d33556c5aac93
7
- data.tar.gz: 391a87d005d7a7722163836e2e7472190cf023cc8748a86408ff7bfce4a3355abab68f99428053015a3b3e0515609b6d4ca11808b556088c08e962f8c083ce4d
6
+ metadata.gz: 170604ecddb364405fd275e84f2230a2d861e3e39b8fcf38a7a2a4baae6a7f79559d4a52505152ac34152a65ee1284ce35d5f5e6db60805fac7e013af71773cb
7
+ data.tar.gz: b7248ef38dc57d367767e408f09890e0b5416238f602fe6cc3ed3f90dd7d84e3ab5386d258c7894a5605f15d626c7ef84de11a84575bbaed657d474331973613
data/CHANGELOG.txt CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.1
4
+
5
+ * Always load index into memory, fixes #9
6
+
3
7
  ## 1.1.0
4
8
 
5
9
  * Support Unicode 9.0
@@ -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.0'
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::VERSION}] Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, and other data."
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.0
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-06-22 00:00:00.000000000 Z
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 1.1.0] Determines the monospace display width of a string using
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.5.1
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.