srbovanje 1.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,13 +3,13 @@
3
3
  String.class_eval do
4
4
 
5
5
  # Preslovljava na latinicu
6
- # Params:
7
- # +charset+:: ako je :ascii preslovljava u "ošišanju" latinicu.
8
- def na_latinici(charset=:utf8)
9
- mapping = Srbovanje.latinica_map(charset)
10
- self.gsub(/.+?/) do |chr|
11
- mapping[chr] || chr
12
- end
6
+ def latinicom
7
+ Srbovanje.latinicom(self)
8
+ end
9
+
10
+ # Preslovljava na ASCII ("ošišanu") latinicu
11
+ def latinicom_ascii
12
+ Srbovanje.latinicom_ascii(self)
13
13
  end
14
14
 
15
15
  end
metadata CHANGED
@@ -1,74 +1,49 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: srbovanje
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Dejan Simic
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-02-25 00:00:00 +01:00
19
- default_executable:
11
+ date: 2020-08-30 00:00:00.000000000 Z
20
12
  dependencies: []
21
-
22
- description: "Ruby gem za transliteraciju \xC4\x87irilice na latinicu i tzv. ASCII latinicu."
13
+ description: Transliteracija ćirilice na latinicu i tzv. ASCII latinicu.
23
14
  email: desimic@gmail.com
24
15
  executables: []
25
-
26
16
  extensions: []
27
-
28
17
  extra_rdoc_files: []
29
-
30
- files:
31
- - Rakefile
18
+ files:
19
+ - CHANGELOG.md
20
+ - README.md
21
+ - lib/i18n_config.rb
22
+ - lib/srbovanje.rb
23
+ - lib/srbovanje/railtie.rb
32
24
  - lib/srbovanje/srbovanje.rb
33
25
  - lib/srbovanje/string_ext.rb
34
- - lib/srbovanje.rb
35
- - test/srbovanje_test.rb
36
- - test/string_ext_test.rb
37
- - test/test_helper.rb
38
- - README.md
39
- has_rdoc: true
40
26
  homepage: https://github.com/dejan/srbovanje
41
- licenses: []
42
-
27
+ licenses:
28
+ - MIT
29
+ metadata: {}
43
30
  post_install_message:
44
31
  rdoc_options: []
45
-
46
- require_paths:
32
+ require_paths:
47
33
  - lib
48
- required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
51
36
  - - ">="
52
- - !ruby/object:Gem::Version
53
- hash: 3
54
- segments:
55
- - 0
56
- version: "0"
57
- required_rubygems_version: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
60
41
  - - ">="
61
- - !ruby/object:Gem::Version
62
- hash: 3
63
- segments:
64
- - 0
65
- version: "0"
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
66
44
  requirements: []
67
-
68
- rubyforge_project:
69
- rubygems_version: 1.6.2
45
+ rubygems_version: 3.1.2
70
46
  signing_key:
71
- specification_version: 3
72
- summary: "Ruby gem za transliteraciju \xC4\x87irilice na latinicu i tzv. ASCII latinicu."
47
+ specification_version: 4
48
+ summary: Transliteracija ćirilice na latinicu i tzv. ASCII latinicu.
73
49
  test_files: []
74
-
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
- require 'rake/testtask'
4
-
5
- Rake::TestTask.new do |t|
6
- t.libs << "test"
7
- t.test_files = FileList['test/**/*_test.rb']
8
- t.verbose = true
9
- end
10
-
11
- task :default => :test
@@ -1,28 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- describe Srbovanje do
6
- describe '::abeceda' do
7
- it 'vraca abecedu kao niz' do
8
- assert_equal 'B', Srbovanje.abeceda[1]
9
- end
10
-
11
- it 'ima 30 slova' do
12
- assert_equal 30, Srbovanje.abeceda.size
13
- end
14
- end
15
-
16
- describe 'latinica_map' do
17
- it 'vraca potpunu mapu latinice' do
18
- assert_equal 'Š', Srbovanje.latinica_full_map['Ш']
19
- end
20
- end
21
-
22
- describe 'latinica_ascii_map' do
23
- it 'vraca mapu ascii latinice' do
24
- assert_equal 'dj', Srbovanje.latinica_ascii_map['ђ']
25
- end
26
- end
27
- end
28
-
@@ -1,18 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- describe String do
6
- it 'preslovnjava u latinicu' do
7
- assert_equal "NJEGOŠ", "ЊЕГОШ".na_latinici
8
- assert_equal "Šaban Šaulić", "Шабан Шаулић".na_latinici
9
- assert_equal "elektrodistribucija", "електродистрибуција".na_latinici
10
- assert_equal "Đurđevak", "Ђурђевак".na_latinici
11
- assert_equal "Latinica", "Latinica".na_latinici
12
- assert_equal '[]2#}(,.);2@$"', '[]2#}(,.);2@$"'.na_latinici
13
- end
14
-
15
- it 'preslovanjava u ošišanu latinicu' do
16
- assert_equal("Zeleznica Srbije", "Железница Србије".na_latinici(:ascii))
17
- end
18
- end
@@ -1,4 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
- require 'srbovanje'
4
- require 'minitest/autorun'