caboodle 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/caboodle/app/config/site.yml +3 -1
- data/lib/caboodle/app/views/stylesheets/screen.scss +4 -3
- data/lib/caboodle/kits/posterous/posterous.rb +5 -3
- data/lib/caboodle/kits/seo/seo.rb +1 -1
- data/lib/caboodle/kits/susy/susy.rb +0 -6
- data/lib/caboodle/kits/tumblr/tumblr.rb +43 -0
- data/lib/caboodle/kits/tumblr/views/_audio.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_conversation.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_image.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_link.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_photo.haml +5 -0
- data/lib/caboodle/kits/tumblr/views/_quote.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_regular.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/_video.haml +0 -0
- data/lib/caboodle/kits/tumblr/views/tumblr.haml +16 -0
- metadata +27 -3
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.11
|
@@ -51,9 +51,6 @@ header#site-header {
|
|
51
51
|
color: #ddd;
|
52
52
|
}
|
53
53
|
}
|
54
|
-
#access {
|
55
|
-
@include skip-link();
|
56
|
-
}
|
57
54
|
nav {
|
58
55
|
@include trailer(1,32px);
|
59
56
|
@include prefix(2);
|
@@ -66,6 +63,10 @@ header#site-header {
|
|
66
63
|
}
|
67
64
|
}
|
68
65
|
|
66
|
+
#access {
|
67
|
+
@include skip-link();
|
68
|
+
}
|
69
|
+
|
69
70
|
section#main {
|
70
71
|
@include full;
|
71
72
|
header#page_title
|
@@ -15,7 +15,6 @@ module Caboodle
|
|
15
15
|
|
16
16
|
sites.each do |site|
|
17
17
|
if site.url.include?("http://#{Caboodle::Site.posterous_sitename}.posterous.com")
|
18
|
-
puts "GOT SITE ID: #{site.id}"
|
19
18
|
Caboodle::Site.posterous_site_id = site.id
|
20
19
|
end
|
21
20
|
end
|
@@ -105,6 +104,7 @@ module Caboodle
|
|
105
104
|
a << "y#{date.year}"
|
106
105
|
a << "m#{date.month}"
|
107
106
|
a << "d#{date.day}"
|
107
|
+
a
|
108
108
|
end
|
109
109
|
|
110
110
|
def url
|
@@ -152,8 +152,10 @@ module Caboodle
|
|
152
152
|
haml :posts.to_sym
|
153
153
|
end
|
154
154
|
|
155
|
-
required [:posterous_sitename, :posterous_username, :posterous_password
|
156
|
-
|
155
|
+
required [:posterous_sitename, :posterous_username, :posterous_password]
|
156
|
+
|
157
|
+
optional [:disqus]
|
158
|
+
|
157
159
|
stylesheets ["http://disqus.com/stylesheets/#{Caboodle::Site.disqus}/disqus.css?v=2.0"]
|
158
160
|
|
159
161
|
rss ["feed://stef.posterous.com/rss.xml"]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Caboodle
|
2
2
|
class SEO < Caboodle::Kit
|
3
3
|
add_to_layout "meta" => "<meta type='keywords' value='#{Caboodle::Site.seo_keywords}' /><meta type='description' value='#{Caboodle::Site.seo_description}' />"
|
4
|
-
|
4
|
+
optional [:seo_keywords,:seo_description]
|
5
5
|
end
|
6
6
|
end
|
@@ -13,13 +13,9 @@ module Caboodle
|
|
13
13
|
class Susy < Caboodle::Kit
|
14
14
|
|
15
15
|
get("/susy/:name.css") do
|
16
|
-
puts "*** root"
|
17
|
-
puts Caboodle::App.root
|
18
16
|
content_type 'text/css', :charset => 'utf-8'
|
19
17
|
sass_dir = File.expand_path(File.join(File.dirname(__FILE__),"views","susy"))
|
20
|
-
#puts sass_dir
|
21
18
|
load_paths = [Caboodle::App.root, File.join(Caboodle::App.root,"views"), File.join(Caboodle::App.root,"views","stylesheets"), sass_dir] + ::Compass.sass_engine_options[:load_paths]
|
22
|
-
#puts load_paths.inspect
|
23
19
|
Caboodle::Kits.each do |name|
|
24
20
|
kit_name = name.to_s.split("::").last || name
|
25
21
|
kit_name = kit_name.downcase
|
@@ -31,13 +27,11 @@ module Caboodle
|
|
31
27
|
Caboodle::SASS.each do |s|
|
32
28
|
the_sass << "\n"
|
33
29
|
add_file = "@import \"#{s}\";"
|
34
|
-
puts add_file
|
35
30
|
the_sass << add_file
|
36
31
|
end
|
37
32
|
|
38
33
|
opts = options.merge!(::Compass.sass_engine_options)
|
39
34
|
opts[:load_paths] = load_paths
|
40
|
-
puts opts.inspect
|
41
35
|
sass the_sass, opts
|
42
36
|
end
|
43
37
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
gem "tumblr-rb"
|
2
|
+
require 'tumblr'
|
3
|
+
|
4
|
+
module Caboodle
|
5
|
+
class Tumblr < Caboodle::Kit
|
6
|
+
|
7
|
+
helpers do
|
8
|
+
def semantic_date post
|
9
|
+
date = Date.parse(post.date)
|
10
|
+
a = []
|
11
|
+
a << "slug-#{post.slug}"
|
12
|
+
a << "y#{date.year}"
|
13
|
+
a << "m#{date.month}"
|
14
|
+
a << "d#{date.day}"
|
15
|
+
a.join(" ")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
required [:tumblr_email, :tumblr_password, :tumblr_sitename]
|
20
|
+
|
21
|
+
menu "Tumblr", "/tumblr" do
|
22
|
+
puts "Get tumblr"
|
23
|
+
tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
|
24
|
+
req = tumblr.read(Caboodle::Site.tumblr_sitename, {:num=>10}).perform_sleepily
|
25
|
+
puts req.inspect
|
26
|
+
posts = ::Tumblr::Reader.get_posts(req)
|
27
|
+
puts posts.inspect
|
28
|
+
|
29
|
+
#posts = tumblr.get_posts(result)
|
30
|
+
haml :tumblr, :locals => { :posts => posts }
|
31
|
+
end
|
32
|
+
|
33
|
+
get "/tumblr/page/:page" do
|
34
|
+
tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
|
35
|
+
result
|
36
|
+
posts = tumblr.get_posts()
|
37
|
+
haml :tumblr, :locals => { :posts => posts }
|
38
|
+
end
|
39
|
+
|
40
|
+
add_sass ["tumblr"]
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#tumblr.page
|
2
|
+
%section.tumblr_posts
|
3
|
+
- posts.each do |post|
|
4
|
+
%article{:id=>"tumblr_#{post.post_id}", :class=>"hentry tumblr_post #{post.format} #{post.type} #{post.slug} #{semantic_date(post)}"}
|
5
|
+
= haml :"_#{post.type}", :layout=>false, :locals=>{:post=>post}
|
6
|
+
%aside.entry-meta
|
7
|
+
%span.meta-prep.meta-prep-author By
|
8
|
+
%span.author.vcard
|
9
|
+
%a.url.fn.n{:href => "/about", :title => "About the author"}= Caboodle::Site.author
|
10
|
+
%span.meta-sep.meta-sep-entry-date |
|
11
|
+
%span.meta-prep.meta-prep-entry-date Published:
|
12
|
+
%span.entry-date
|
13
|
+
%abbr.published{:title => Date.parse(post.date).strftime("%d")}= Date.parse(post.date).strftime("%b")
|
14
|
+
%small
|
15
|
+
%span.tag-links
|
16
|
+
= post.type
|
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: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stef Lewandowski
|
@@ -177,6 +177,20 @@ dependencies:
|
|
177
177
|
version: 0.1.4
|
178
178
|
type: :runtime
|
179
179
|
version_requirements: *id010
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: tumblr-rb
|
182
|
+
prerelease: false
|
183
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
hash: 3
|
189
|
+
segments:
|
190
|
+
- 0
|
191
|
+
version: "0"
|
192
|
+
type: :runtime
|
193
|
+
version_requirements: *id011
|
180
194
|
description: Caboodle is a Rack and Sinatra-based framework for creating websites which combine information from various online services. There are Kits for many of the larger services, which provide a way to retrieve and display photos, videos, blog posts, status updates and so on. Caboodle normalises the display of all of these discrete Kits so that you can create a website which looks seamless but is made up of a variety of things from a variety of sources.
|
181
195
|
email: stef@stef.io
|
182
196
|
executables:
|
@@ -277,6 +291,16 @@ files:
|
|
277
291
|
- lib/caboodle/kits/susy/views/susy/ie.scss
|
278
292
|
- lib/caboodle/kits/susy/views/susy/print.scss
|
279
293
|
- lib/caboodle/kits/susy/views/susy/screen.scss
|
294
|
+
- lib/caboodle/kits/tumblr/tumblr.rb
|
295
|
+
- lib/caboodle/kits/tumblr/views/_audio.haml
|
296
|
+
- lib/caboodle/kits/tumblr/views/_conversation.haml
|
297
|
+
- lib/caboodle/kits/tumblr/views/_image.haml
|
298
|
+
- lib/caboodle/kits/tumblr/views/_link.haml
|
299
|
+
- lib/caboodle/kits/tumblr/views/_photo.haml
|
300
|
+
- lib/caboodle/kits/tumblr/views/_quote.haml
|
301
|
+
- lib/caboodle/kits/tumblr/views/_regular.haml
|
302
|
+
- lib/caboodle/kits/tumblr/views/_video.haml
|
303
|
+
- lib/caboodle/kits/tumblr/views/tumblr.haml
|
280
304
|
- lib/caboodle/kits/twitter/public/images/ajax-loader.gif
|
281
305
|
- lib/caboodle/kits/twitter/public/images/link.png
|
282
306
|
- lib/caboodle/kits/twitter/twitter.rb
|