buzzcore 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1,2 @@
1
- 0.4.1
1
+ 0.4.2
2
+
data/buzzcore.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{buzzcore}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["buzzware"]
12
- s.date = %q{2010-04-30}
12
+ s.date = %q{2010-06-05}
13
13
  s.description = %q{buzzcore is the ruby core library developed and used by Buzzware Solutions.}
14
14
  s.email = %q{contact@buzzware.com.au}
15
15
  s.extra_rdoc_files = [
@@ -6,7 +6,7 @@ module HtmlUtils
6
6
  # Truncates HTML text. Breaks on word boundaries and closes tags.
7
7
  # valid values for aLevel are :NO_TAGS, :RESTRICTED, :BASIC and :RELAXED
8
8
  def self.word_safe_truncate(aHtmlText,aMaxLength,aSuffix='...',aLevel=:BASIC)
9
- result = StringUtils.word_safe_truncate(aHtmlText,aMaxLength)+' '+aSuffix
9
+ result = StringUtils.word_safe_truncate(aHtmlText,aMaxLength)
10
10
  level = case aLevel
11
11
  when :NO_TAGS
12
12
  nil
@@ -19,7 +19,9 @@ module HtmlUtils
19
19
  else
20
20
  Sanitize::Config::BASIC
21
21
  end
22
- return level ? Sanitize.clean(result,level) : Sanitize.clean(result)
22
+ result = level ? Sanitize.clean(result,level) : Sanitize.clean(result)
23
+ result += ' '+aSuffix
24
+ result
23
25
  end
24
26
 
25
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buzzcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzzware
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-30 00:00:00 +08:00
12
+ date: 2010-06-05 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency