muck-engine 3.3.8 → 3.3.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.8
1
+ 3.3.9
@@ -196,6 +196,7 @@ module MuckEngineHelper
196
196
  # length - The desired number of words
197
197
  # omission - Text to add when the text is truncated ie 'read more'
198
198
  def html_summarize(text, length = 30, omission = '...')
199
+ return '' if text.blank?
199
200
  snippet(strip_tags(text), length, omission)
200
201
  end
201
202
 
@@ -206,7 +207,8 @@ module MuckEngineHelper
206
207
  # wordcount - The number of words
207
208
  # omission - Text to add when the text is truncated ie 'read more'
208
209
  def snippet(text, wordcount, omission)
209
- text.split[0..(wordcount-1)].join(" ") + (text.split.size > wordcount ? " " + omission : "")
210
+ return '' if text.blank?
211
+ text.split[0..(wordcount-1)].join(" ") + (text.split.size > wordcount ? " " + omission : "")
210
212
  end
211
213
 
212
214
  def round(flt)
data/muck-engine.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "3.3.8"
8
+ s.version = "3.3.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2011-05-30}
12
+ s.date = %q{2011-06-03}
13
13
  s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
- - 8
10
- version: 3.3.8
9
+ - 9
10
+ version: 3.3.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-30 00:00:00 -06:00
19
+ date: 2011-06-03 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency