kyanite 0.7.7 → 0.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -114,6 +114,27 @@ class String
114
114
  str
115
115
  end
116
116
 
117
+
118
+ unless defined? MYSQL_REPLACES
119
+ MYSQL_REPLACES = [
120
+ [/ä/, 'a'],
121
+ [/ö/, 'o'],
122
+ [/ü/, 'u'],
123
+ [/Ä/, 'a'],
124
+ [/Ö/, 'o'],
125
+ [/Ü/, 'u'],
126
+ [/ss/, 'ß'],
127
+ [/SS/, 'ß']
128
+ ]
129
+ end
130
+
131
+
132
+ # Converts a string so that you can recognize with utf8_general_ci compared strings
133
+ #
134
+ def mysqlize
135
+ self.tidy_bytes.mgsub(MYSQL_REPLACES).downcase.to_s
136
+ end
137
+
117
138
 
118
139
  end
119
140
 
@@ -9,9 +9,6 @@ end
9
9
  require 'hashery'
10
10
 
11
11
 
12
-
13
-
14
-
15
12
  unless defined?(TR_UPCASE_ALL_REGEXP)
16
13
  base = Hashery::Dictionary.new
17
14
  base['a'] = ' àáâă äãā åạą æ ảấầắằ а '
data/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Kyanite
4
4
 
5
- VERSION = '0.7.7'
5
+ VERSION = '0.7.8'
6
6
 
7
7
  end
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kyanite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: