mmunicode_rails 0.4.2 → 0.4.3
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 +4 -4
- data/README.md +2 -0
- data/lib/mmunicode_rails/version.rb +1 -1
- data/lib/mmunicode_rails.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7599cda5b99eca3be428b36f695e2be2decd8c82
|
4
|
+
data.tar.gz: 1e82a89160374300afb826f296584d61eea9815d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3fb0ee9a740971a8607c0024e1fb20fdfc53c71264726c69e7a638c5e599d1f530c6b8c9e225cb0b0f8c36b862a25d25c033f4cc4903371609974d971d902e
|
7
|
+
data.tar.gz: 956154fa10f9b7f2ba42380f4fa79a459c8213aa08a259f005b2594b96523dd9290655c28002e27611fe803aaf3ff1c82451639ad67ff8d788c6c8a97c6a891c
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@ This is by no means a complete solution. It's just a convenient helper gem.
|
|
6
6
|
|
7
7
|
"mmunicode_rails" lets you convert you rails app input data to Myanmar Unicode regardless of which fonts the users used.
|
8
8
|
|
9
|
+
Supported for rails 4.x and 3.x
|
10
|
+
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
Add this line to your application's Gemfile:
|
data/lib/mmunicode_rails.rb
CHANGED
@@ -193,7 +193,8 @@ module MmunicodeRails
|
|
193
193
|
end
|
194
194
|
|
195
195
|
def detect_font(input_text)
|
196
|
-
|
196
|
+
#do nothing if nil text or not utf8
|
197
|
+
return nil if input_text.nil? || input_text.encoding != Encoding.find("UTF-8")
|
197
198
|
whitespace = "[\s\t\n]"
|
198
199
|
priorities = {zawgyi: 2, uni: 1, eng: 3}
|
199
200
|
#Font Detecting Library
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mmunicode_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dreamingblackcat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|