babosa 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -165,6 +165,7 @@ Please use Babosa's [Github issue tracker](http://github.com/norman/babosa/issue
165
165
 
166
166
  ## Contributors
167
167
 
168
+ * [Tiberiu C. Turbureanu](https://gitorious.org/~tct) - Romanian support
168
169
  * [Kim Joar Bekkelund](https://github.com/kjbekkelund) - Norwegian support
169
170
  * [Alexey Shkolnikov](https://github.com/grlm) - Russian support
170
171
  * [Martin Petrov](https://github.com/martin-petrov) - Bulgarian support
@@ -174,6 +175,7 @@ Please use Babosa's [Github issue tracker](http://github.com/norman/babosa/issue
174
175
 
175
176
  ## Changelog
176
177
 
178
+ * 0.3.4 - Add Romanian support.
177
179
  * 0.3.3 - Add Norwegian support.
178
180
  * 0.3.2 - Improve Macedonian support.
179
181
  * 0.3.1 - Small fixes to Cyrillic.
@@ -13,6 +13,7 @@ module Babosa
13
13
  autoload :Latin, "babosa/transliterator/latin"
14
14
  autoload :Macedonian, "babosa/transliterator/macedonian"
15
15
  autoload :Norwegian, "babosa/transliterator/norwegian"
16
+ autoload :Romanian, "babosa/transliterator/romanian"
16
17
  autoload :Russian, "babosa/transliterator/russian"
17
18
  autoload :Serbian, "babosa/transliterator/serbian"
18
19
  autoload :Spanish, "babosa/transliterator/spanish"
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ module Babosa
3
+ module Transliterator
4
+ class Romanian < Latin
5
+ APPROXIMATIONS = {
6
+ "ș" => "s",
7
+ "ț" => "t",
8
+ "Ș" => "S",
9
+ "Ț" => "T"
10
+ }
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Babosa
2
2
  module Version
3
- STRING = "0.3.3"
3
+ STRING = "0.3.4"
4
4
  end
5
5
  end
@@ -0,0 +1,19 @@
1
+ # encoding: utf-8
2
+ require File.expand_path("../../spec_helper", __FILE__)
3
+
4
+ describe Babosa::Transliterator::Romanian do
5
+
6
+ let(:t) { described_class.instance }
7
+ it_behaves_like "a latin transliterator"
8
+
9
+ it "should transliterate various characters" do
10
+ examples = {
11
+ "Iași" => "Iasi",
12
+ "Mehedinți" => "Mehedinti",
13
+ "Țară" => "Tara",
14
+ "Șanț" => "Sant"
15
+ }
16
+ examples.each {|k, v| t.transliterate(k).should eql(v)}
17
+ end
18
+
19
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: babosa
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.3
5
+ version: 0.3.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Norman Clarke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-05 00:00:00 -03:00
13
+ date: 2011-05-10 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -64,6 +64,7 @@ files:
64
64
  - lib/babosa/transliterator/latin.rb
65
65
  - lib/babosa/transliterator/macedonian.rb
66
66
  - lib/babosa/transliterator/norwegian.rb
67
+ - lib/babosa/transliterator/romanian.rb
67
68
  - lib/babosa/transliterator/russian.rb
68
69
  - lib/babosa/transliterator/serbian.rb
69
70
  - lib/babosa/transliterator/spanish.rb
@@ -88,6 +89,7 @@ files:
88
89
  - spec/transliterators/german_spec.rb
89
90
  - spec/transliterators/macedonian_spec.rb
90
91
  - spec/transliterators/norwegian_spec.rb
92
+ - spec/transliterators/romanian_spec.rb
91
93
  - spec/transliterators/russian_spec.rb
92
94
  - spec/transliterators/serbian_spec.rb
93
95
  - spec/transliterators/spanish_spec.rb