string_utility_belt 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,11 +28,16 @@ class String
28
28
  end
29
29
 
30
30
  def regex_builder options={}
31
+
31
32
  self.gsub!(/\*/,'.*') if options[:any]
33
+
34
+ regex_latin_ci_list if options[:latin_chars_variation]
35
+
32
36
  border_me(options[:border][:to],
33
37
  options[:border][:direction]) if options[:border]
34
- regex_latin_ci_list if options[:latin_chars_variation]
38
+
35
39
  insert_OR_in_right unless options[:delete_or]
40
+
36
41
  self
37
42
  end
38
43
 
@@ -52,10 +52,9 @@ module RegexMe
52
52
  def builder string, exact_word, border_to, latin_chars_variation, exact_phrase
53
53
 
54
54
  if exact_phrase
55
- regexp = string.gsub(/\s+/, " ").gsub(/\s/, '[^0-9a-zA-Z\_]+').regex_builder(:latin_chars_variation => latin_chars_variation,
56
- :delete_or => true,
55
+ regexp = string.gsub(/\s+/, " ").regex_latin_ci_list.gsub(/\s/, '[^0-9a-zA-Z\_]+').regex_builder(:delete_or => true,
57
56
  :border => {:to => border_to,
58
- :direction => :both})
57
+ :direction => :both})
59
58
  else
60
59
  regexp = '('
61
60
 
@@ -2,7 +2,7 @@ module StringUtilityBelt
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "string_utility_belt"
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
  s.description = "Useful methods for strings!"
7
7
  s.summary = "Useful methods for strings!"
8
8
  s.author = "Rodrigo Serradura"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string_utility_belt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rodrigo Serradura