mako_rss 0.2.0 → 0.2.1

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: 770630990cc3595bb157dee7f3d764d6a91b4e92
4
- data.tar.gz: add1706141f24d42b880ae7f0b2ab819c2eeed60
3
+ metadata.gz: 290598ad944edc63e67424f6a7fe9000eef34764
4
+ data.tar.gz: 4549a791353d7f41cff731aef8c8b4ded2a65d96
5
5
  SHA512:
6
- metadata.gz: 58295d6d252e28a6ed94bbac881d2b35ea69f81cb965ede92c3f32598fb5201596f5b610a3d1e54b0ca4c2ed1828bc08f8a05edde5d4345ce30505cf76598796
7
- data.tar.gz: 066590c44fb0fb8a6660f8085aa9bc24cd33986f82bacb0688522a590ed1292c67f8cd1f988b59768dc81cf7c45d1ee538412c63bfcb9524db3a8e0fb62c3070
6
+ metadata.gz: d512d6f6a001ddb3125370831fd69796b32ad69d28fb2ad6306e8f9fb6a5e294a04643fa8b22837e6674775528239825f5c553c2206f4e2f6c6dd7e4a143f5b2
7
+ data.tar.gz: 03b3a7d9f2aae435f16dff3d93ccb1a223cfee968b61e8dee27f191b71d6457846e54da565ef142982efd8c89bebca2a86f05984a8680b4a1a9d48b04568d340
@@ -58,14 +58,13 @@ module Mako
58
58
  end
59
59
  end
60
60
 
61
- # Atom and RSS Feedjira::Feed objects have different names for the
62
- # article body. Returns entry.content if Atom and entry.summary if
63
- # RSS.
61
+ # Some feeds use summary for the full article body, other feeds use content.
62
+ # This prefers content, but falls back to summary.
64
63
  #
65
64
  # @param [Feedjira::Feed]
66
65
  # @return [String] an HTML string of the source article body
67
66
  def entry_summary(entry)
68
- entry.class.to_s.include?('Atom') ? entry.content : entry.summary
67
+ !entry.content || entry.content.empty? ? entry.summary : entry.content
69
68
  end
70
69
  end
71
70
  end
data/lib/mako/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mako
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mako_rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Pike