greek_string_utils 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- greek_string_utils (0.0.3)
4
+ greek_string_utils (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -2,9 +2,14 @@
2
2
 
3
3
  == Description
4
4
 
5
- In general greek strings dont preserve accents when upcase. This module simply provides a method
6
- to correct this issue. For other cases (capitalize, downcase etc) +unicode+, +mb_chars+ etc are doing
7
- their job very well. Gem's name is more ambitious than what it really provides :)
5
+ This module simply provides some methods to handle issues with greek letters
6
+
7
+ 1. upperfix: In general greek strings dont preserve accents when upcase.
8
+ 2. remove_accents: Simply removes all accents
9
+ 3. greek_sort: Simply sorts correctly greek letters
10
+
11
+ For other cases (capitalize, downcase etc) +unicode+, +mb_chars+ etc are doing
12
+ their job very well.
8
13
 
9
14
  == Install
10
15
 
@@ -18,6 +23,12 @@ gem install 'greek_string_utils'
18
23
  a = 'το 2012 η ελλάδα θα είναι δεύτερη σε ύφεση στον κόσμο'
19
24
  upperfix(a) # => 'ΤΟ 2012 Η ΕΛΛΑΔΑ ΘΑ ΕΙΝΑΙ ΔΕΥΤΕΡΗ ΣΕ ΥΦΕΣΗ ΣΤΟΝ ΚΟΣΜΟ'
20
25
 
26
+ a = %w(αβ άβ άα αα)
27
+ greek_sort(a) # => %w(άα αα άβ αβ)
28
+
29
+ a = 'κρύο'
30
+ remove_accents(a) # => 'κρυο'
31
+
21
32
  if you want to use it in a rails app:
22
33
 
23
34
  gem 'greek_string_utils'
@@ -1,6 +1,5 @@
1
1
  # encoding: utf-8
2
-
3
- require 'pry'
2
+ #require 'pry'
4
3
 
5
4
  module GreekStringUtils
6
5
  def upperfix(string)
@@ -1,3 +1,3 @@
1
1
  module GreekStringUtils
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greek_string_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-01 00:00:00.000000000 Z
12
+ date: 2012-02-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple library to correct upcase in greek
15
15
  email:
@@ -44,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
44
44
  version: '0'
45
45
  segments:
46
46
  - 0
47
- hash: 799179521
47
+ hash: -178008917700154382
48
48
  required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
@@ -53,10 +53,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: 799179521
56
+ hash: -178008917700154382
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 1.8.14
59
+ rubygems_version: 1.8.10
60
60
  signing_key:
61
61
  specification_version: 3
62
62
  summary: Simple library to correct upcase in greek