unicode-categories 1.0.0 → 1.1.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
  SHA1:
3
- metadata.gz: b5ffea705e0ea825e2da7d52510acc2d07542f34
4
- data.tar.gz: 807bf0ab0e1fee003ab34d39f20a8383573fe029
3
+ metadata.gz: 59f96c391e28d4ab5f2616788c46d6148ff64c7a
4
+ data.tar.gz: 007f619431879bbfe642d43a5795e602c3d8d28b
5
5
  SHA512:
6
- metadata.gz: 83e66060a6505ceee287bab54743ae5ff2a16719d3d4faf126b7a18448f6316660f4c0aa14d0658783d1482fe622c0e402eb948dc5b3d22ebf46b54fc867d20a
7
- data.tar.gz: 5700854254d1d80e15d6459d3fed41f0a3c69e64437408eb244e1747e23e3597b0462637af7c2fb838b670f046ab2bb89931573db12e09fc2911c902ca1d6141
6
+ metadata.gz: 799356034de49c64589f4db850b6bf7fbad99b62037e7bc3d6a5d9d312f01b36cb824dbb203f2e9a45b902d783e42e1db03c8ddb82fa570797dcfab4269c0719
7
+ data.tar.gz: 271f8d10c7e1182137b5ec07df63c741e4d8ce84086ed4323b86baa99d017eee9858c0ee9f0d4e25171e333558a1c53a6eaee258a2a0cfe85f456658badf505b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.1.0
4
+
5
+ Support Unicode 9.0
6
+
3
7
  ### 1.0.0
4
8
 
5
9
  * Inital release
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Unicode::Categories [![[version]](https://badge.fury.io/rb/unicode-categories.svg)](http://badge.fury.io/rb/unicode-categories) [![[travis]](https://travis-ci.org/janlelis/unicode-categories.png)](https://travis-ci.org/janlelis/unicode-categories)
2
2
 
3
- Returns which [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category) are contained in Unicode string.
3
+ Returns which [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category) a Unicode string contains.
4
4
 
5
- Unicode version: **8.0.0**
5
+ Unicode version: **9.0.0**
6
6
 
7
7
  Supported Rubies: **2.3**, **2.2**, **2.1**
8
8
 
@@ -47,43 +47,47 @@ You can retrieve a list of all General Categories like this:
47
47
 
48
48
  ```ruby
49
49
  require "unicode/categories"
50
- puts Unicode::Categories.names
51
-
52
- # # # Output # # #
53
-
54
- Cc
55
- Cf
56
- Cn
57
- Co
58
- Cs
59
- LC
60
- Ll
61
- Lm
62
- Lo
63
- Lt
64
- Lu
65
- Mc
66
- Me
67
- Mn
68
- Nd
69
- Nl
70
- No
71
- Pc
72
- Pd
73
- Pe
74
- Pf
75
- Pi
76
- Po
77
- Ps
78
- Sc
79
- Sk
80
- Sm
81
- So
82
- Zl
83
- Zp
84
- Zs
50
+ puts \
51
+ "Short | Long\n" +
52
+ "------|-----\n" +
53
+ Unicode::Categories.names(format: :table).to_a.map{ |r| " %s | %s" % r }.join("\n")
85
54
  ```
86
55
 
56
+ Short | Long
57
+ ------|-----
58
+ Cc | Control
59
+ Cf | Format
60
+ Cn | Unassigned
61
+ Co | Private_Use
62
+ Cs | Surrogate
63
+ LC | Cased_Letter
64
+ Ll | Lowercase_Letter
65
+ Lm | Modifier_Letter
66
+ Lo | Other_Letter
67
+ Lt | Titlecase_Letter
68
+ Lu | Uppercase_Letter
69
+ Mc | Spacing_Mark
70
+ Me | Enclosing_Mark
71
+ Mn | Nonspacing_Mark
72
+ Nd | Decimal_Number
73
+ Nl | Letter_Number
74
+ No | Other_Number
75
+ Pc | Connector_Punctuation
76
+ Pd | Dash_Punctuation
77
+ Pe | Close_Punctuation
78
+ Pf | Final_Punctuation
79
+ Pi | Initial_Punctuation
80
+ Po | Other_Punctuation
81
+ Ps | Open_Punctuation
82
+ Sc | Currency_Symbol
83
+ Sk | Modifier_Symbol
84
+ Sm | Math_Symbol
85
+ So | Other_Symbol
86
+ Zl | Line_Separator
87
+ Zp | Paragraph_Separator
88
+ Zs | Space_Separator
89
+
90
+ See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
87
91
 
88
92
  ## MIT License
89
93
 
data/Rakefile CHANGED
@@ -7,7 +7,6 @@ info = "#{gemspec.name} | #{gemspec.version} | " \
7
7
  "#{gemspec.runtime_dependencies.size} dependencies | " \
8
8
  "#{gemspec.files.size} files"
9
9
 
10
-
11
10
  # # #
12
11
  # Gem build and install task
13
12
 
@@ -20,7 +19,6 @@ task :gem do
20
19
  puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
21
20
  end
22
21
 
23
-
24
22
  # # #
25
23
  # Start an IRB session with the gem loaded
26
24
 
@@ -28,3 +26,12 @@ desc "#{gemspec.name} | IRB"
28
26
  task :irb do
29
27
  sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
30
28
  end
29
+
30
+ # # #
31
+ # Run Specs
32
+
33
+ desc "#{gemspec.name} | Spec"
34
+ task :spec do
35
+ sh "for file in spec/*.rb; do ruby $file; done"
36
+ end
37
+ task default: :spec
Binary file
@@ -1,7 +1,7 @@
1
1
  module Unicode
2
2
  module Categories
3
- VERSION = "1.0.0".freeze
4
- UNICODE_VERSION = "8.0.0".freeze
3
+ VERSION = "1.1.0".freeze
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 + '/categories.marshal.gz').freeze
7
7
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.name = "unicode-categories"
7
7
  gem.version = Unicode::Categories::VERSION
8
8
  gem.summary = "Determine the Unicode General Categories of a string."
9
- gem.description = "[Unicode version: #{Unicode::Categories::UNICODE_VERSION}] Determine which Unicode General Categories a string belongs to."
9
+ gem.description = "[Unicode #{Unicode::Categories::UNICODE_VERSION}] Determine which Unicode General Categories a string belongs to."
10
10
  gem.authors = ["Jan Lelis"]
11
11
  gem.email = ["mail@janlelis.de"]
12
12
  gem.homepage = "https://github.com/janlelis/unicode-categories"
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-categories
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: "[Unicode version: 8.0.0] Determine which Unicode General Categories
14
- a string belongs to."
13
+ description: "[Unicode 9.0.0] Determine which Unicode General Categories a string
14
+ belongs to."
15
15
  email:
16
16
  - mail@janlelis.de
17
17
  executables: []
@@ -53,10 +53,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 2.6.3
56
+ rubygems_version: 2.5.1
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: Determine the Unicode General Categories of a string.
60
60
  test_files:
61
61
  - spec/unicode_categories_spec.rb
62
- has_rdoc: