string_utility_belt 0.2.2 → 0.2.3
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.
data/lib/general/general.rb
CHANGED
@@ -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
|
|
data/string_utility_belt.gemspec
CHANGED
@@ -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.
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.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-
|
18
|
+
date: 2010-09-14 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|