smart_excerpt 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1e579ce0ae17c57d6c8eb9252dc61333b33ac8df
4
- data.tar.gz: 3ac5e53e47260f6f82f08d16c25f54d983175d78
2
+ SHA256:
3
+ metadata.gz: 7721eb80bb7232eed49103106b1a854863ac9d1d45f7b589b0c9b8d2a25826d9
4
+ data.tar.gz: abc0444f4e24251a22785652c75091e262032a6d167c7eb485c0f54df75a3e10
5
5
  SHA512:
6
- metadata.gz: 415216da0096f0380bd62e6b551113e363145e08dc5c7c782813c0ad244a34f446642d70e2a22f8003645f52ae33c8fe3191d2d43532ce56fdfbd09adfac4bf0
7
- data.tar.gz: 41c04f78cf6d7d25617779765bc8620ff6a06e208426404fd296bab667bbf900d94b59ef614d942571b77587d6f288e60d0faecba64dde6335c6418bc68aa3c0
6
+ metadata.gz: 90ea012681693d2b717f2a8d49c0e19e34fda17a052bfdf130ab6e412d4e4efdd9278fa2b471b3f89118f07a86752730c9e77f1b10ae1f065ea2ce056d6ee84c
7
+ data.tar.gz: 7d93e0f09fdcc2a6160a5633f61d62ef55245e84531e778c2024b7f9d3c3a188c192c3f860d060127b22c73774294f5d6b21fec0adbc03ced6d2147758c0d904
data/README.md CHANGED
@@ -60,7 +60,7 @@ All excerpts are passed through strip_tags and html entity decode.
60
60
 
61
61
  ## Contributing
62
62
 
63
- 1. Fork it ( https://github.com/[my-github-username]/smart_excerpt/fork )
63
+ 1. Fork it ( https://github.com/rs-pro/smart_excerpt/fork )
64
64
  2. Create your feature branch (`git checkout -b my-new-feature`)
65
65
  3. Commit your changes (`git commit -am 'Add some feature'`)
66
66
  4. Push to the branch (`git push origin my-new-feature`)
@@ -6,7 +6,7 @@ module SmartExcerpt
6
6
  return '' if s.blank?
7
7
  opts = {words: 25}.merge(opts)
8
8
  if opts[:sentences]
9
- return s.split(/\.(\s|$)+/)[0, opts[:sentences]].map{|s| s.strip}.join('. ') + '.'
9
+ return s.split(/\.(\s|$)+/).delete_if {|s| s.blank? }[0, opts[:sentences]].map{|s| s.strip}.join('. ') + '.'
10
10
  end
11
11
  if opts[:letters]
12
12
  return truncate(s, length: opts[:letters], separator: ' ', omission: '...')
@@ -1,3 +1,3 @@
1
1
  module SmartExcerpt
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'activesupport'
22
22
  spec.add_dependency 'htmlentities'
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.7"
25
- spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "bundler"
25
+ spec.add_development_dependency "rake"
26
26
  end
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-21 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  description: ''
70
70
  email:
71
71
  - glebtv@gmail.com
@@ -102,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.2.2
105
+ rubygems_version: 3.0.6
107
106
  signing_key:
108
107
  specification_version: 4
109
108
  summary: Allows to create intellegent excerpt fields.