mojinizer 0.2.0 → 0.2.1

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: ad4aece11dbbfd367bb0985c0288db2162829a5c
4
- data.tar.gz: 10acaec7b37906f9941e6b3565df134d8b6bba7b
3
+ metadata.gz: 87dc6460a6c55e87c6f67d147a44b5bdf6f33606
4
+ data.tar.gz: 732b8b047fdb9d705bd28c66a640e3e2d4742582
5
5
  SHA512:
6
- metadata.gz: aa59d5ef7804148ed5e2c6bdaca305244667e5f6ef65339c10d42062294d200b2c2ebd09e947db608022f3b02b16d98db730be437a458275fbfe00cd3adeaa8c
7
- data.tar.gz: 48c3a5bf8232b0d066c76e6096696f6e464bd2961e201eb0651c75275af9c55886f909d0fa235f12119a916de803cd8371cf3bf7384ab400549fa8ff188e4741
6
+ metadata.gz: ff7329f641cf5d89f129f80e550c4796d38d891408fd18fcb1ff15a0338d3c14318579a3d50fc27bc4e29a979cafcc9fcaf4e580ec6e084efec7914bcbb5fa40
7
+ data.tar.gz: 065d1d2b146220d245a58810af08392c46b202202c93a8569a9358492578ddcbef1a4846dd476b80978b38234fdb1e531593fd00cc7eddeeb890a2e8e5cd2441
data/README.md CHANGED
@@ -68,15 +68,15 @@ Japanese string conversion and detection methods are added to the `String` class
68
68
 
69
69
  * Hankaku --> zenkaku conversion (半角 --> 全角 文字種変換)
70
70
  * Zenkaku --> hankaku conversion (全角 --> 半角 文字種変換)
71
- * ASCII zenkaku --> hankaku conversion (ASCII全角 --> 半角 文字種変換)
71
+ * Zenkaku <--> hankaku normalization (全角 <--> 半角 文字規準化)
72
72
 
73
73
  ```ruby
74
74
  "アロハ".han_to_zen #=> "アロハ"
75
75
  "Aloha!".han_to_zen #=> "Aloha!"
76
76
  "アロハ".zen_to_han #=> "アロハ"
77
77
  "Aloha!".zen_to_han #=> "Aloha!"
78
- "アロハ".ascii_zen_to_han #=> "アロハ"
79
- "Aloha!".ascii_zen_to_han #=> "Aloha!"
78
+ "アロハ!".normalize_zen_han #=> "アロハ!"
79
+ "「Aloha」".normalize_zen_han #=> "Aloha"
80
80
  ```
81
81
 
82
82
  * Chaining conversion methods
@@ -81,8 +81,8 @@ module Mojinizer
81
81
  Moji.zen_to_han(self)
82
82
  end
83
83
 
84
- def ascii_zen_to_han
85
- Moji.zen_to_han(self, Moji::ZEN_ALNUM | Moji::ZEN_ASYMBOL)
84
+ def normalize_zen_han
85
+ Moji.normalize_zen_han(self)
86
86
  end
87
87
 
88
88
  def roma_to_kata
@@ -1,3 +1,3 @@
1
1
  module Mojinizer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -55,12 +55,12 @@ describe Mojinizer do
55
55
  "".zen_to_han.should == ""
56
56
  end
57
57
 
58
- it "ASCII zenkaku to hankaku properly" do
59
- "あろは".ascii_zen_to_han.should == "あろは"
60
- "「アロハ!」".ascii_zen_to_han.should == "「アロハ!」"
61
- "@lo ha!".ascii_zen_to_han.should == "@lo ha!"
62
- "ALOHA!".ascii_zen_to_han.should == "ALOHA!"
63
- "".ascii_zen_to_han.should == ""
58
+ it "normalize zenkaku and hankaku properly" do
59
+ "「あろは。」".normalize_zen_han.should == "「あろは。」"
60
+ "「アロハ!」".normalize_zen_han.should == "「アロハ!」"
61
+ "@lo ハ!".normalize_zen_han.should == "@lo ハ!"
62
+ "あロHA!".normalize_zen_han.should == "あロHA!"
63
+ "".normalize_zen_han.should == ""
64
64
  end
65
65
 
66
66
  it "romaji or kana to zenkaku properly" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mojinizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ikayzo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-09 00:00:00.000000000 Z
11
+ date: 2013-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: moji