planet 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/planet.rb +13 -1
  2. data/lib/planet/version.rb +1 -1
  3. metadata +2 -2
data/lib/planet.rb CHANGED
@@ -114,9 +114,21 @@ class Planet
114
114
  end
115
115
 
116
116
  feed.entries.each do |entry|
117
+ ## TODO: I should probably consider using feed 'adapters' for specific
118
+ ## blog engine feeds that don't have their stuff on the standard fields.
119
+ ## Example: blogspot has the content on "summary" instead of content ¬¬.
120
+ content = if !entry.content.nil?
121
+ self.sanitize_images(entry.content.strip)
122
+ elsif !entry.summary.nil?
123
+ self.sanitize_images(entry.summary.strip)
124
+ else
125
+ abort "=> No content found on entry"
126
+ end
127
+
128
+
117
129
  self.posts << @post = Post.new(
118
130
  title: entry.title.sanitize,
119
- content: self.sanitize_images(entry.content.strip),
131
+ content: content,
120
132
  date: entry.published,
121
133
  url: self.url + entry.url,
122
134
  blog: self
@@ -2,7 +2,7 @@ module Planet
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 9
5
+ PATCH = 10
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-24 00:00:00.000000000 Z
12
+ date: 2012-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake