string_utility_belt 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,14 @@ module General
5
5
  self.scan(/\w[\w\'\-]*/)
6
6
  end
7
7
 
8
+ def simple_space
9
+ self.strip.gsub(/\s+/, " ")
10
+ end
11
+
12
+ def simple_space!
13
+ self.strip.gsub!(/\s+/, " ")
14
+ end
15
+
8
16
  def have_this_words? words_to_match, exact_word=false
9
17
  helper_have_this_words? words_to_match, exact_word do |string, word, exact_world|
10
18
  return false if (string !~ word.regex_me_to_search_ruby(:exact_word => exact_word, :case_insensitive => true))
@@ -6,7 +6,7 @@ module Tags
6
6
  end
7
7
 
8
8
  def html_tag_cleaner
9
- self.gsub(/<\/?(a|abbr|acronym|address|applet|area|b|base|basefont|bdo|big|blockquote|body|br|button|caption|center|cite|code|col|colgroup|dd|del|dfn|dir|div|dl|dt|em|fieldset|font|form|frame|frameset|h6|head|hr|html|i|iframe|img|input|ins|isindex|kbd|label|legend|li|link|map|menu|meta|noframes|noscript|object)[^>]+??>/im, "")
9
+ self.gsub(/<\/?(a|p|abbr|acronym|address|applet|area|b|base|basefont|bdo|big|blockquote|body|br|button|caption|center|cite|code|col|colgroup|dd|del|dfn|dir|div|dl|dt|em|fieldset|font|form|frame|frameset|h6|head|hr|html|i|iframe|img|input|ins|isindex|kbd|label|legend|li|link|map|menu|meta|noframes|noscript|object)[^>]+??>/im, "")
10
10
  # TAGs disponíveis até 09/2010 - FONTE: http://www.w3schools.com/tags/default.asp
11
11
  end
12
12
 
@@ -2,7 +2,7 @@ module StringUtilityBelt
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 2
5
+ PATCH = 3
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.2"
5
+ s.version = "0.2.3"
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rodrigo Serradura
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-03 00:00:00 -03:00
18
+ date: 2010-09-14 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21