caboodle 0.2.23 → 0.2.24
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/kit.rb +2 -1
- data/lib/caboodle/kits/page/page.rb +1 -0
- data/lib/caboodle/kits/posterous/posterous.rb +16 -7
- data/lib/caboodle/kits/posterous/views/posts.haml +1 -0
- data/lib/caboodle/kits/susy/views/susy/_base.scss +2 -0
- data/lib/caboodle/kits/susy/views/susy/screen.scss +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.24
|
data/lib/caboodle/kit.rb
CHANGED
@@ -96,6 +96,8 @@ module Caboodle
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def menu display, path=nil, &block
|
99
|
+
Settings.menu_items ||= []
|
100
|
+
|
99
101
|
#todo proper slugify
|
100
102
|
slug = display.downcase.gsub(" ","-").gsub("'","")
|
101
103
|
path = "/#{slug}" unless path
|
@@ -115,7 +117,6 @@ module Caboodle
|
|
115
117
|
@title = '#{display}'
|
116
118
|
end"
|
117
119
|
|
118
|
-
Settings.menu_items ||= []
|
119
120
|
Settings.menu_items << path
|
120
121
|
end
|
121
122
|
|
@@ -8,11 +8,15 @@ module Caboodle
|
|
8
8
|
|
9
9
|
def initialize(opts={})
|
10
10
|
Site.posterous_password ||= ENV["posterous_password"]
|
11
|
-
|
11
|
+
|
12
|
+
u = opts[:email] || Site.posterous_email
|
13
|
+
p = opts[:password] || Site.posterous_password
|
14
|
+
|
15
|
+
self.credentials(u, p)
|
12
16
|
sitename = opts[:sitename] || Site.posterous_sitename
|
13
17
|
unless defined?(Site.posterous_site_id)
|
14
|
-
|
15
|
-
|
18
|
+
response = Hashie::Mash.new(getsites.perform_sleepily.parse)
|
19
|
+
sites = response.rsp.site
|
16
20
|
sites.each do |site|
|
17
21
|
if site.url.include?("http://#{Site.posterous_sitename}.posterous.com")
|
18
22
|
Site.posterous_site_id = site.id
|
@@ -56,7 +60,9 @@ module Caboodle
|
|
56
60
|
opts["title"] = doc.css('title').inner_html.split(" - ").first
|
57
61
|
opts["link"] = "http://#{Site.posterous_sitename}.posterous.com/#{slug}"
|
58
62
|
perma = doc.css('.permalink').inner_html
|
59
|
-
|
63
|
+
date = doc.css('article time').first["datetime"]
|
64
|
+
puts date
|
65
|
+
opts["date"] = Date.parse(date)
|
60
66
|
PosterousPost.new(opts)
|
61
67
|
end
|
62
68
|
|
@@ -70,7 +76,9 @@ module Caboodle
|
|
70
76
|
p = PosterousAPI.new
|
71
77
|
opts[:site_id] = Site.posterous_site_id
|
72
78
|
rsp = p.all(opts).perform_sleepily.parse["rsp"]
|
73
|
-
|
79
|
+
posts = rsp["post"]
|
80
|
+
posts = [posts] if posts.class == Hash
|
81
|
+
posts.each{|a| r << PosterousPost.new(a) } if posts
|
74
82
|
r
|
75
83
|
end
|
76
84
|
|
@@ -79,6 +87,7 @@ module Caboodle
|
|
79
87
|
end
|
80
88
|
|
81
89
|
def [] k
|
90
|
+
@attributes = {} if @attributes.nil?
|
82
91
|
@attributes[k]
|
83
92
|
end
|
84
93
|
|
@@ -131,7 +140,7 @@ module Caboodle
|
|
131
140
|
|
132
141
|
description "Displays a Posterous blog with permalinks, pagination and commends if the Disqus kit is included"
|
133
142
|
|
134
|
-
required [:posterous_sitename, :
|
143
|
+
required [:posterous_sitename, :posterous_email, :posterous_password]
|
135
144
|
|
136
145
|
optional [:disqus]
|
137
146
|
|
@@ -157,7 +166,7 @@ module Caboodle
|
|
157
166
|
|
158
167
|
stylesheets ["http://disqus.com/stylesheets/#{disqus}/disqus.css?v=2.0"] if disqus
|
159
168
|
|
160
|
-
rss ["feed
|
169
|
+
rss ["feed://#{posterous_sitename}.posterous.com/rss.xml"]
|
161
170
|
|
162
171
|
credit "http://#{posterous_sitename}.posterous.com", "#{posterous_sitename} on Posterous"
|
163
172
|
|
@@ -73,7 +73,7 @@ section#main {
|
|
73
73
|
{
|
74
74
|
h1, h2 {
|
75
75
|
@include adjust-font-size-to(48px);
|
76
|
-
color:
|
76
|
+
color: $header_color;
|
77
77
|
@include prefix(2);
|
78
78
|
}
|
79
79
|
}
|
@@ -88,9 +88,9 @@ section#main {
|
|
88
88
|
article {
|
89
89
|
@include trailer(2,32px);
|
90
90
|
aside {
|
91
|
-
color:
|
91
|
+
color: $article_color;
|
92
92
|
a {
|
93
|
-
color:
|
93
|
+
color: $article_color;
|
94
94
|
}
|
95
95
|
}
|
96
96
|
}
|
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: 39
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 24
|
10
|
+
version: 0.2.24
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stef Lewandowski
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-12 00:00:00 +01:00
|
19
19
|
default_executable: caboodle
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|