smart_excerpt 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smart_excerpt/util.rb +4 -0
- data/lib/smart_excerpt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e579ce0ae17c57d6c8eb9252dc61333b33ac8df
|
4
|
+
data.tar.gz: 3ac5e53e47260f6f82f08d16c25f54d983175d78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 415216da0096f0380bd62e6b551113e363145e08dc5c7c782813c0ad244a34f446642d70e2a22f8003645f52ae33c8fe3191d2d43532ce56fdfbd09adfac4bf0
|
7
|
+
data.tar.gz: 41c04f78cf6d7d25617779765bc8620ff6a06e208426404fd296bab667bbf900d94b59ef614d942571b77587d6f288e60d0faecba64dde6335c6418bc68aa3c0
|
data/lib/smart_excerpt/util.rb
CHANGED
@@ -16,6 +16,10 @@ module SmartExcerpt
|
|
16
16
|
self.strip_tags(self.decode(str))
|
17
17
|
end
|
18
18
|
|
19
|
+
def simple_format(str)
|
20
|
+
SmartExcerpt.h.simple_format(str)
|
21
|
+
end
|
22
|
+
|
19
23
|
def truncate(str, opts = {})
|
20
24
|
return '' if str.blank?
|
21
25
|
tx = str.gsub(/<h\d[^>]*?>(.*)<\/h\d>/mi, '').gsub("\n", ' ').gsub("\r", '').gsub("\t", '').strip
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_excerpt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|