caboodle 0.2.24 → 0.2.25
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.
- data/VERSION +1 -1
- data/lib/caboodle/kits/posterous/posterous.rb +4 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.25
|
|
@@ -55,14 +55,16 @@ module Caboodle
|
|
|
55
55
|
|
|
56
56
|
def self.from_slug(slug)
|
|
57
57
|
doc = Caboodle.scrape("http://#{Site.posterous_sitename}.posterous.com/#{slug}")
|
|
58
|
+
puts doc
|
|
58
59
|
opts = {}
|
|
59
60
|
opts["body"] = doc.css('div.bodytext').inner_html
|
|
60
61
|
opts["title"] = doc.css('title').inner_html.split(" - ").first
|
|
61
62
|
opts["link"] = "http://#{Site.posterous_sitename}.posterous.com/#{slug}"
|
|
62
63
|
perma = doc.css('.permalink').inner_html
|
|
63
|
-
date = doc.css('article time').first["datetime"]
|
|
64
|
+
date = doc.css('article time').first["datetime"] if doc.css('article time').first
|
|
65
|
+
date ||= doc.css('.date .permalink').first.inner_html if doc.css('.date .permalink').first
|
|
64
66
|
puts date
|
|
65
|
-
opts["date"] = Date.parse(date)
|
|
67
|
+
opts["date"] = Date.parse(date) if date
|
|
66
68
|
PosterousPost.new(opts)
|
|
67
69
|
end
|
|
68
70
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: caboodle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 37
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 25
|
|
10
|
+
version: 0.2.25
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Stef Lewandowski
|