viljushka 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -23
- data/lib/viljushka/version.rb +1 -1
- data/spec/viljushka_spec.rb +32 -24
- data/viljushka.gemspec +0 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -17,30 +17,11 @@ $ gem install viljushka
|
|
17
17
|
|
18
18
|
```
|
19
19
|
require 'viljushka'
|
20
|
-
```
|
21
|
-
|
22
|
-
For Cyrillic
|
23
|
-
|
24
|
-
|
25
|
-
```
|
26
|
-
puts "ćirilica".to_cyr
|
27
|
-
puts "ćirilica".po_vuku
|
28
|
-
``
|
29
20
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
puts "латиница".po_gaju
|
35
|
-
```
|
36
|
-
|
37
|
-
also **downcase** & **upcase**
|
38
|
-
|
39
|
-
```
|
40
|
-
puts "ПАЗИ САД".downcase
|
41
|
-
=> "пази сад"
|
42
|
-
puts "пази сад".upcase
|
43
|
-
=> "ПАЗИ САД"
|
21
|
+
> "sarma".upcase.po_vuku # or .to_cyr
|
22
|
+
"САРМА"
|
23
|
+
> "САРМА".downcase.po_gaju # or .to_lat
|
24
|
+
"sarma"
|
44
25
|
```
|
45
26
|
|
46
27
|
### Note
|
data/lib/viljushka/version.rb
CHANGED
data/spec/viljushka_spec.rb
CHANGED
@@ -4,30 +4,34 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe "Viljushka::Boc" do
|
6
6
|
|
7
|
-
|
8
|
-
string
|
9
|
-
|
10
|
-
|
7
|
+
context "#to_cyr!" do
|
8
|
+
it "should change the original string" do
|
9
|
+
string = 'Milisav'
|
10
|
+
string.to_cyr!.should == 'Милисав'
|
11
|
+
string.should == 'Милисав'
|
12
|
+
end
|
11
13
|
end
|
12
14
|
|
13
15
|
|
14
|
-
|
15
|
-
string
|
16
|
-
|
17
|
-
|
16
|
+
context "#to_cyr" do
|
17
|
+
it "should not change the original string" do
|
18
|
+
string = 'Darinka'
|
19
|
+
string.to_cyr.should == 'Даринка'
|
20
|
+
string.should == 'Darinka'
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
context "Вук Караџић" do
|
21
|
-
context "when using
|
22
|
-
it "should change original string" do
|
25
|
+
context "when using #po_vuku!" do
|
26
|
+
it "should change the original string" do
|
23
27
|
string = 'Debelo jer'
|
24
28
|
string.to_cyr!.should == 'Дебело јер'
|
25
29
|
string.should == 'Дебело јер'
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
29
|
-
context "when using
|
30
|
-
it "should not change original string" do
|
33
|
+
context "when using #po_vuku" do
|
34
|
+
it "should not change the original string" do
|
31
35
|
string = 'Debelo jer'
|
32
36
|
string.to_cyr.should == 'Дебело јер'
|
33
37
|
string.should == 'Debelo jer'
|
@@ -35,29 +39,33 @@ describe "Viljushka::Boc" do
|
|
35
39
|
end
|
36
40
|
end
|
37
41
|
|
38
|
-
|
39
|
-
string
|
40
|
-
|
41
|
-
|
42
|
+
context "#to_lat!" do
|
43
|
+
it "should change the original string" do
|
44
|
+
string = 'Руменка'
|
45
|
+
string.to_lat!.should == 'Rumenka'
|
46
|
+
string.should == 'Rumenka'
|
47
|
+
end
|
42
48
|
end
|
43
49
|
|
44
|
-
|
45
|
-
string
|
46
|
-
|
47
|
-
|
50
|
+
context "#to_lat" do
|
51
|
+
it "should not change the original string" do
|
52
|
+
string = 'Изворка'
|
53
|
+
string.to_lat.should == 'Izvorka'
|
54
|
+
string.should == 'Изворка'
|
55
|
+
end
|
48
56
|
end
|
49
57
|
|
50
58
|
context "Ljudevit Gaj" do
|
51
|
-
context "
|
52
|
-
it "should change original string" do
|
59
|
+
context "#po_gaju!" do
|
60
|
+
it "should change the original string" do
|
53
61
|
string = 'дивно'
|
54
62
|
string.po_gaju!.should == 'divno'
|
55
63
|
string.should == 'divno'
|
56
64
|
end
|
57
65
|
end
|
58
66
|
|
59
|
-
context "
|
60
|
-
it "should not change original string" do
|
67
|
+
context "#po_gaju" do
|
68
|
+
it "should not change the original string" do
|
61
69
|
string = 'дивно'
|
62
70
|
string.po_gaju.should == 'divno'
|
63
71
|
string.should == 'дивно'
|
data/viljushka.gemspec
CHANGED
@@ -9,7 +9,6 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.version = Viljushka::VERSION
|
10
10
|
s.homepage = "http://github.com/dotemacs/viljushka"
|
11
11
|
s.authors = ["Aleksandar Simić"]
|
12
|
-
s.date = "2012-01-22"
|
13
12
|
s.summary = "Character set conversion for Serbian"
|
14
13
|
s.description = "Character conversion from Latin alphabet to Serbian Cyrillic script and vice versa"
|
15
14
|
s.email = "asimic@gmail.com"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: viljushka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-02-18 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &17202628340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.0.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *17202628340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cucumber
|
27
|
-
requirement: &
|
27
|
+
requirement: &17202695700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *17202695700
|
36
36
|
description: Character conversion from Latin alphabet to Serbian Cyrillic script and
|
37
37
|
vice versa
|
38
38
|
email: asimic@gmail.com
|