mmunicode_rails 0.4.2 → 0.4.3

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: 78a19839b655a6769596e1432598cac43c46d782
4
- data.tar.gz: d513544460c2bf1b79a76f6bfe2cc9e1e6a342fc
3
+ metadata.gz: 7599cda5b99eca3be428b36f695e2be2decd8c82
4
+ data.tar.gz: 1e82a89160374300afb826f296584d61eea9815d
5
5
  SHA512:
6
- metadata.gz: 59fe15cc44f65b01a3e3fefeafd111e118ed91e8b391a4cebff105cfbc81e4cd85247c5e6d48e930d8019d7f978fa38ee565e9a1a79925136c4fad907e5181d7
7
- data.tar.gz: b1cedc83c6d3fbd0a24dfbc2ced00a4b0b78244865202820083b4a8930317de90632d6f4f8e2fffb53b5231f4b68666a11a3018325f7e73f7c673c547cd1d9e9
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:
@@ -1,3 +1,3 @@
1
1
  module MmunicodeRails
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -193,7 +193,8 @@ module MmunicodeRails
193
193
  end
194
194
 
195
195
  def detect_font(input_text)
196
- return nil if input_text.nil?
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.2
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 00:00:00.000000000 Z
11
+ date: 2015-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler