unicode-age 2.0.0 → 2.0.1

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
- SHA1:
3
- metadata.gz: 2f4e83750edf8eb6f6ad414129d80b5b0af87fee
4
- data.tar.gz: 302e96a3019e6ebfe70552b3a16360f60abe589d
2
+ SHA256:
3
+ metadata.gz: 504a0269e6357104b6ac5ec61ec78cb647b87a0549e3b02cddc31f171a5357d9
4
+ data.tar.gz: 68c0f40814a0de9401942cf17d4bc31d880f2e7c993a5ceced24a5f368441a8f
5
5
  SHA512:
6
- metadata.gz: 2a719aeccd95f190234a7deb1099a610af069138bdc789a6f8b6c20add5085a1d4f5e662d669384d502409ead15953aeacdab3bad50bed71375da00b31147151
7
- data.tar.gz: b1a935e4bfd73e0af3651e8ec0e9e3b344735f889956cd1d4c5d38c9ce438d71142e4db8bccb85efd31bec8f9601000c91d460db8d6530bbaa7ebaa9cd676265
6
+ metadata.gz: 8b153714b4eb5af0aa8f88ee1fbd46f6b732c1feedba06def94edf05f9541c93fa59a165a0f8ebb0e18237e97418310cccd71efb731516fa2aec917d16dfd5d1
7
+ data.tar.gz: 91f14e6910f70101bf6b152c54ecbe7846981aeda91ef4d01b21c2812038052143b31df1342486f537b319d6872268876461ce54b566eca22ddc816ecffea286
data/.travis.yml CHANGED
@@ -4,18 +4,19 @@ language: ruby
4
4
  script: bundle exec ruby spec/unicode_age_spec.rb
5
5
 
6
6
  rvm:
7
- - 2.4.0
8
- - 2.3.3
7
+ - 2.6.0
8
+ - 2.5.3
9
+ - 2.4.5
10
+ - 2.3.8
9
11
  - 2.2
10
12
  - 2.1
11
13
  - ruby-head
12
14
  - jruby-head
13
- - jruby-9.1.7.0
14
-
15
- cache:
16
- - bundler
15
+ - jruby-9.2.5.0
17
16
 
18
17
  matrix:
19
18
  allow_failures:
19
+ - rvm: 2.2
20
+ - rvm: 2.1
20
21
  - rvm: jruby-head
21
- - rvm: jruby-9.1.7.0
22
+ - rvm: jruby-9.2.5.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 2.0.1
4
+
5
+ * Support Unicode 11 (Ruby 2.6)
6
+
3
7
  ### 2.0.0
4
8
 
5
9
  #### Breaking change
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2017 Jan Lelis, mail@janlelis.de
1
+ Copyright (c) 2016-2018 Jan Lelis, mail@janlelis.de
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Unicode::Age [![[version]](https://badge.fury.io/rb/unicode-age.svg)](http://badge.fury.io/rb/unicode-age) [![[travis]](https://travis-ci.org/janlelis/unicode-age.svg)](https://travis-ci.org/janlelis/unicode-age)
1
+ # Unicode::Age [![[version]](https://badge.fury.io/rb/unicode-age.svg)](https://badge.fury.io/rb/unicode-age) [![[travis]](https://travis-ci.org/janlelis/unicode-age.svg)](https://travis-ci.org/janlelis/unicode-age)
2
2
 
3
3
  A micromodule to detect which Unicode version is required to display a string.
4
4
 
@@ -10,6 +10,7 @@ Unicode::Age.of "🚡" # => 6.0
10
10
  Unicode::Age.of "🛲" # => 7.0
11
11
  Unicode::Age.of "🌮 " # => 8.0
12
12
  Unicode::Age.of "🛒" # => 9.0
13
+ Unicode::Age.of "🛷" # => 10.0
13
14
  Unicode::Age.of "\u{10FFFF}" # => nil
14
15
  Unicode::Age.of "\u{10FFFD}" # => 2.0
15
16
  ```
@@ -22,6 +23,8 @@ Characters of status "Unassigned" (Unicode General Category of **Cn**) will rais
22
23
 
23
24
  Ruby version | Unicode version
24
25
  -------------|----------------
26
+ **2.6** | **11.0.0**
27
+ **2.5** | **10.0.0**
25
28
  **2.4** | **9.0.0**
26
29
  **2.3** | **8.0.0**
27
30
  **2.2** | **7.0.0**
@@ -29,4 +32,4 @@ Ruby version | Unicode version
29
32
 
30
33
  ## MIT License
31
34
 
32
- Copyright (C) 2016-2017 Jan Lelis <http://janlelis.com>. Released under the MIT license.
35
+ Copyright (C) 2016-2018 Jan Lelis <http://janlelis.com>. Released under the MIT license.
data/lib/unicode/age.rb CHANGED
@@ -23,7 +23,8 @@ module Unicode
23
23
  7.0,
24
24
  8.0,
25
25
  9.0,
26
- 10.0
26
+ 10.0,
27
+ 11.0,
27
28
  ].freeze
28
29
 
29
30
  KNOWN_UNICODE_REGEXES = KNOWN_UNICODE_VERSIONS.map{ |uv|
@@ -34,7 +35,7 @@ module Unicode
34
35
  }.compact.freeze
35
36
 
36
37
  def self.of(string)
37
- raise(UnknownAge, "The string containts unassigned codepoints, so the Unicode version required cannot be determined. Your Ruby version supports Unicode #{UNICODE_VERSION}.") if string =~ /\A\p{Unassigned}*\z/
38
+ raise(UnknownAge, "The string contains unassigned codepoints, so the Unicode version required cannot be determined. Your Ruby version supports Unicode #{UNICODE_VERSION}.") if string =~ /\A\p{Unassigned}*\z/
38
39
  KNOWN_UNICODE_VERSIONS.find.with_index{ |uv, index|
39
40
  string =~ KNOWN_UNICODE_REGEXES[index]
40
41
  }
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Unicode
2
4
  module Age
3
- VERSION = "2.0.0".freeze
4
- UNICODE_VERSION = "10.0.0".freeze
5
+ VERSION = "2.0.1"
6
+ UNICODE_VERSION = "11.0.0"
5
7
  end
6
8
  end
7
9
 
@@ -11,6 +11,7 @@ describe Unicode::Age do
11
11
  assert_equal 7.0, Unicode::Age.of("🛲 ") if RUBY_VERSION >= "2.2.0"
12
12
  assert_equal 8.0, Unicode::Age.of("🌮 ") if RUBY_VERSION >= "2.3.0"
13
13
  assert_equal 9.0, Unicode::Age.of("🛒 ") if RUBY_VERSION >= "2.4.0"
14
+ assert_equal 10.0, Unicode::Age.of("🛷 ") if RUBY_VERSION >= "2.5.0"
14
15
  end
15
16
 
16
17
  it "will raise Unicode::Age::UnknownAge exception for unassigned characters" do
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-age
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.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: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2018-12-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: "[Unicode 10.0.0] A micromodule to detect which Unicode version is required
13
+ description: "[Unicode 11.0.0] A micromodule to detect which Unicode version is required
14
14
  to display a string."
15
15
  email:
16
16
  - mail@janlelis.de
@@ -51,8 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubyforge_project:
55
- rubygems_version: 2.6.11
54
+ rubygems_version: 3.0.1
56
55
  signing_key:
57
56
  specification_version: 4
58
57
  summary: Determine required Unicode version of a string.