concerto_simple_rss 0.9 → 1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9fc6d839196db17c36d2636980bf1a187b7fb4d
4
- data.tar.gz: d49fa4df1c95194e538e06fe2fe6c6d8965d906b
3
+ metadata.gz: 920510da98f4e29a6a78743863b87b13b831e157
4
+ data.tar.gz: c86fdb040da61171251108ba49236eb2bbd9c0cb
5
5
  SHA512:
6
- metadata.gz: fe13c8a0d3adbfbb7f07c454c8aa51754c46dc6b0ebaf097b13998bf2ec3add8301bf1528a684f812405cdbbb1e193c16ed0cb1e892f2a5127670e13d6913ef2
7
- data.tar.gz: 37f05cbb3786df58e666ac88a6a11ddbf46aa464000edbd6df77e06039ee70974c7e60772fdbbe9944cf152b47588c60669916490eeb73ec71661d0ec6c97bb3
6
+ metadata.gz: dce49c410e3b9013aa6847127eabecd895536c685290b7aa6c64b2d8ce097a0f4a1a20aa820555995d54f9b939a650b36e1439190c191ab98b5458d40e3be532
7
+ data.tar.gz: 9a938eed7e5bb4ec47c6dea41c58ae0829f3e659d82c787028fd72d5e7a3a00580327603a9b174cf25cfe2014312b520005d4e0a56ff214fa0a01e378183a5e5
@@ -125,7 +125,7 @@ class SimpleRss < DynamicContent
125
125
  htmltext = HtmlText.new()
126
126
  htmltext.name = "#{feed_title}"
127
127
  htmltext.data = sanitize(data)
128
- contents << htmltext
128
+ contents << htmltext if !htmltext.data.blank?
129
129
  else
130
130
  # if there are any content-items then add each one as a separate content
131
131
  # and strip off the content-item wrapper
@@ -133,21 +133,21 @@ class SimpleRss < DynamicContent
133
133
  htmltext = HtmlText.new()
134
134
  htmltext.name = "#{feed_title}"
135
135
  htmltext.data = sanitize(n.to_s.gsub(/^\s*\<content-item\>/, '').gsub(/\<\/content-item\>\s*$/,''))
136
- contents << htmltext
136
+ contents << htmltext if !htmltext.data.blank?
137
137
  end
138
138
  end
139
139
  rescue => e
140
140
  # maybe the html was not xml compliant-- this happens frequently in rss feed descriptions
141
141
  # look for another separator and use it, if it exists
142
142
 
143
- if data.include?("</content-item>")
143
+ if data.present? and data.include?("</content-item>")
144
144
  # if there are any content-items then add each one as a separate content
145
145
  # and strip off the content-item wrapper
146
146
  data.split("</content-item>").each do |n|
147
147
  htmltext = HtmlText.new()
148
148
  htmltext.name = "#{feed_title}"
149
- htmltext.data = sanitize(n.sub("<content-item>", ""))
150
- contents << htmltext if !htmltext.data.strip.blank?
149
+ htmltext.data = sanitize(n.sub("<content-item>", ""))
150
+ contents << htmltext if !htmltext.data.blank?
151
151
  end
152
152
 
153
153
  else
@@ -157,7 +157,7 @@ class SimpleRss < DynamicContent
157
157
  htmltext = HtmlText.new()
158
158
  htmltext.name = "#{feed_title}"
159
159
  htmltext.data = sanitize(data)
160
- contents << htmltext
160
+ contents << htmltext if !htmltext.data.blank?
161
161
  end
162
162
  end
163
163
  else
@@ -1,3 +1,3 @@
1
1
  module ConcertoSimpleRss
2
- VERSION = "0.9"
2
+ VERSION = "1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concerto_simple_rss
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Michalski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.4.5
131
+ rubygems_version: 2.4.5.1
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: RSS Dynamic Concerto for Concerto 2.