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 +4 -4
- data/README.md +3 -3
- data/lib/mojinizer/conversion.rb +2 -2
- data/lib/mojinizer/version.rb +1 -1
- data/spec/mojinizer_spec.rb +6 -6
- 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: 87dc6460a6c55e87c6f67d147a44b5bdf6f33606
|
4
|
+
data.tar.gz: 732b8b047fdb9d705bd28c66a640e3e2d4742582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
*
|
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
|
-
"
|
79
|
-
"
|
78
|
+
"アロハ!".normalize_zen_han #=> "アロハ!"
|
79
|
+
"「Aloha」".normalize_zen_han #=> "「Aloha」"
|
80
80
|
```
|
81
81
|
|
82
82
|
* Chaining conversion methods
|
data/lib/mojinizer/conversion.rb
CHANGED
data/lib/mojinizer/version.rb
CHANGED
data/spec/mojinizer_spec.rb
CHANGED
@@ -55,12 +55,12 @@ describe Mojinizer do
|
|
55
55
|
"".zen_to_han.should == ""
|
56
56
|
end
|
57
57
|
|
58
|
-
it "
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"@lo
|
62
|
-
"
|
63
|
-
"".
|
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.
|
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-
|
11
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: moji
|