uc.micro-rb 1.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b06335ab60003d78ed468ecabc68c062047f3705
4
+ data.tar.gz: ec7ff8f2457838221390a3a14032df24a7aaa341
5
+ SHA512:
6
+ metadata.gz: c0395624bec44ad05ff4f22f09de97a1c7007de1533a3a38f237456c7922b9500deb9d42fcc81d0c8394629df346a392fff40016103c47c318302dbe454f5492
7
+ data.tar.gz: 4953c7e55919cdd42fa466a4b56d52c16c77e98351e30082e5c291679b1d3ad3752c70cfb764425b300ace45fd89db8eb93ba90c6eb52b225465a6bfbb634401
@@ -0,0 +1,11 @@
1
+ # uc.micro-rb
2
+
3
+ Micro subset of unicode data files for [motion-markdown-it](https://github.com/digitalmoksha/motion-markdown-it) projects, for both Ruby and RubyMotion.
4
+
5
+ This gem is a port of the [uc.micro javascript package](https://github.com/markdown-it/uc.micro) by Vitaly Puzrin, that is used for the motion-markdown-it gem.
6
+
7
+ Uses files from the [unicode-7.0.0](https://github.com/mathiasbynens/unicode-7.0.0) repository.
8
+
9
+ ## License
10
+
11
+ [WTFPL](http://www.wtfpl.net/txt/copying/)
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ if defined?(Motion::Project::Config)
4
+
5
+ lib_dir_path = File.dirname(File.expand_path(__FILE__))
6
+ Motion::Project::App.setup do |app|
7
+ app.files.unshift(Dir.glob(File.join(lib_dir_path, "uc.micro-rb/**/*.rb")))
8
+ end
9
+
10
+ else
11
+
12
+ require 'uc.micro-rb/categories/Cc/regex'
13
+ require 'uc.micro-rb/categories/Cf/regex'
14
+ require 'uc.micro-rb/categories/P/regex'
15
+ require 'uc.micro-rb/categories/Z/regex'
16
+ require 'uc.micro-rb/properties/Any/regex'
17
+
18
+ end
@@ -0,0 +1,7 @@
1
+ module UCMicro
2
+ module Categories
3
+ module Cc
4
+ REGEX = /[\0-\u001F\u007F-\u009F]/
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ module UCMicro
2
+ module Categories
3
+ module Cf
4
+ # original REGEX = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
5
+
6
+ # Ruby can't handle surrogate pairs and consider those ranges (xD800-xDFFF) as "invalid". remove them for now
7
+ # http://stackoverflow.com/a/397285/2781043
8
+ REGEX = /[\u00AD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]/
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module UCMicro
2
+ module Categories
3
+ module P
4
+ # original REGEX = /[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/
5
+
6
+ # Ruby can't handle surrogate pairs and consider those ranges (xD800-xDFFF) as "invalid". remove them for now
7
+ # http://stackoverflow.com/a/397285/2781043
8
+ REGEX = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ module UCMicro
2
+ module Categories
3
+ module Z
4
+ REGEX = /[ \u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ module UCMicro
2
+ module Properties
3
+ module Any
4
+ # original REGEX = /[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/
5
+
6
+ # Ruby can't handle surrogate pairs and consider those ranges (xD800-xDFFF) as "invalid". remove them for now
7
+ # http://stackoverflow.com/a/397285/2781043
8
+ REGEX = /[\0-\uD7FF\uE000-\uFFFF]/
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module UCMicro
2
+
3
+ VERSION = '1.0.0'
4
+
5
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: uc.micro-rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Brett Walker
8
+ - Vitaly Puzrin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-03-25 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Micro subset of unicode data files for motion-markdown-it projects for
15
+ Ruby and RubyMotion
16
+ email: github@digitalmoksha.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - lib/uc.micro-rb.rb
23
+ - lib/uc.micro-rb/categories/Cc/regex.rb
24
+ - lib/uc.micro-rb/categories/Cf/regex.rb
25
+ - lib/uc.micro-rb/categories/P/regex.rb
26
+ - lib/uc.micro-rb/categories/Z/regex.rb
27
+ - lib/uc.micro-rb/properties/Any/regex.rb
28
+ - lib/uc.micro-rb/version.rb
29
+ homepage: https://github.com/digitalmoksha/uc.micro-rb
30
+ licenses:
31
+ - WTFPL
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project:
49
+ rubygems_version: 2.4.5
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Micro subset of unicode data files for motion-markdown-it projects
53
+ test_files: []