caboodle 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/caboodle/app/config/site.yml +5 -4
- data/lib/caboodle/app/views/layout.haml +56 -33
- data/lib/caboodle/command.rb +0 -1
- data/lib/caboodle/config.rb +6 -6
- data/lib/caboodle/config/defaults.yml +4 -0
- data/lib/caboodle/kit.rb +8 -19
- data/lib/caboodle/kits/flickr/flickr.rb +1 -4
- data/lib/caboodle/kits/flickr/{galleria.noconflict.min.js → public/galleria.noconflict.min.js} +0 -0
- data/lib/caboodle/kits/skimmed/skimmed.rb +4 -0
- metadata +6 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
kits:
|
2
|
+
- Flickr
|
3
|
+
- Linkedin
|
4
|
+
- Posterous
|
5
|
+
- Skimmed
|
@@ -3,6 +3,7 @@
|
|
3
3
|
%head{:profile => "http://gmpg.org/xfn/11"}
|
4
4
|
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "content-type"}/
|
5
5
|
%meta{:content => "index,follow", :name => "robots"}/
|
6
|
+
= Caboodle::Site.meta
|
6
7
|
|
7
8
|
%title= @title || Caboodle::Site.title
|
8
9
|
%link{:href => "/stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"}/
|
@@ -18,49 +19,71 @@
|
|
18
19
|
- Caboodle::Javascripts.each do |js|
|
19
20
|
%script{:charset => "utf-8", :src => js, :type => "text/javascript"}
|
20
21
|
|
21
|
-
|
22
|
-
/
|
23
|
-
/
|
24
|
-
/ = yield_content :some_key
|
22
|
+
= Caboodle::Site.head
|
25
23
|
|
26
|
-
|
27
|
-
|
24
|
+
%body.caboodle.sinatra.ruby
|
25
|
+
= Caboodle::Site.before_page
|
28
26
|
#page.hfeed
|
27
|
+
= Caboodle::Site.before_header
|
29
28
|
%header#site-header
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
#site-title
|
34
|
-
%h1
|
29
|
+
= Caboodle::Site.above_header
|
30
|
+
- if Caboodle::Site.logo_url
|
31
|
+
#logo
|
35
32
|
%a{:href => "/", :rel => "home", :title => Caboodle::Site.title }
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
%
|
45
|
-
|
46
|
-
|
47
|
-
-
|
33
|
+
%img{:src=>Caboodle::Site.logo_url, :width=>"64", :height=>"64"}
|
34
|
+
- if Caboodle::Site.title
|
35
|
+
#site-title
|
36
|
+
%h1
|
37
|
+
%a{:href => "/", :rel => "home", :title => Caboodle::Site.title }
|
38
|
+
= Caboodle::Site.title
|
39
|
+
- if Caboodle::Site.description
|
40
|
+
#site-description
|
41
|
+
%h2= Caboodle::Site.description
|
42
|
+
- if Caboodle::Site.has_access
|
43
|
+
#access
|
44
|
+
.skip-link
|
45
|
+
%a{:href => "#content", :title => "Skip navigation to the content"} Skip to content
|
46
|
+
|
47
|
+
- if Caboodle::MenuItems.size > 0
|
48
|
+
= Caboodle::Site.before_nav
|
49
|
+
%nav
|
50
|
+
%ul
|
48
51
|
%li
|
49
|
-
%a{:href=>
|
50
|
-
=
|
51
|
-
|
52
|
+
%a{:href=>"/"}
|
53
|
+
= Caboodle::Site.home_title
|
54
|
+
- Caboodle::MenuItems.each do |p|
|
55
|
+
%li
|
56
|
+
%a{:href=>p[:link]}
|
57
|
+
= p[:display]
|
58
|
+
|
59
|
+
= Caboodle::Site.below_header
|
60
|
+
= Caboodle::Site.after_header
|
61
|
+
= Caboodle::Site.before_main
|
52
62
|
%section#main
|
53
63
|
- if @title
|
54
64
|
%header#page_title
|
55
65
|
%h1
|
56
66
|
= @title
|
67
|
+
= Caboodle::Site.before_content
|
57
68
|
%section#content
|
69
|
+
= Caboodle::Site.above_content
|
58
70
|
= yield
|
71
|
+
= Caboodle::Site.below_content
|
72
|
+
= Caboodle::Site.after_content
|
73
|
+
= Caboodle::Site.after_main
|
74
|
+
= Caboodle::Site.before_footer
|
59
75
|
%footer#footer
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
76
|
+
= Caboodle::Site.above_footer
|
77
|
+
- if Caboodle::Site.has_footer
|
78
|
+
%p
|
79
|
+
\©
|
80
|
+
= Caboodle::Site.author
|
81
|
+
- if Caboodle::Site.has_caboodle_link
|
82
|
+
|
|
83
|
+
Powered by
|
84
|
+
%a{:href=>"http://github.com/steflewandowski/caboodle"}
|
85
|
+
Caboodle
|
86
|
+
= Caboodle::Site.below_footer
|
87
|
+
= Caboodle::Site.after_footer
|
88
|
+
= Caboodle::Site.after_page
|
89
|
+
= Caboodle::Site.after_body
|
data/lib/caboodle/command.rb
CHANGED
@@ -13,7 +13,6 @@ module Caboodle
|
|
13
13
|
puts `cd #{args.first} && cp #{File.expand_path(File.join(File.dirname(__FILE__), 'app'))}/.gems .`
|
14
14
|
puts `cd #{args.first} && git init`
|
15
15
|
puts `cd #{args.first} && git add .`
|
16
|
-
puts `bundle install`
|
17
16
|
puts `cd #{args.first} && git commit -m"initial setup"`
|
18
17
|
puts `cd #{args.first} && heroku create #{args.first}`
|
19
18
|
puts `cd #{args.first} && git push heroku master`
|
data/lib/caboodle/config.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
module Caboodle
|
2
|
-
MenuItems = []
|
3
|
-
Defaults = Hashie::Mash.new()
|
4
|
-
Site = Defaults.clone
|
5
|
-
RequiredSettings = Hashie::Mash.new()
|
1
|
+
module Caboodle
|
6
2
|
Kits = []
|
3
|
+
MenuItems = []
|
7
4
|
Javascripts = []
|
8
5
|
Stylesheets = []
|
6
|
+
Defaults = Hashie::Mash.new()
|
7
|
+
RequiredSettings = Hashie::Mash.new()
|
8
|
+
Site = Defaults.clone
|
9
9
|
Site.required_settings = []
|
10
10
|
Site.kits = [] unless Site.kits
|
11
|
-
Defaults.merge!(Hashie::Mash.new(YAML.load_file(File.join( File.join(File.dirname(__FILE__), 'defaults.yml')))))
|
11
|
+
Defaults.merge!(Hashie::Mash.new(YAML.load_file(File.join( File.join(File.dirname(__FILE__), 'config','defaults.yml')))))
|
12
12
|
end
|
data/lib/caboodle/kit.rb
CHANGED
@@ -11,8 +11,6 @@ module Caboodle
|
|
11
11
|
|
12
12
|
template :layout do
|
13
13
|
@@template ||= File.open(File.join(File.dirname(__FILE__),"app","views","layout.haml")).read
|
14
|
-
puts @@template.inspect
|
15
|
-
@@template
|
16
14
|
end
|
17
15
|
|
18
16
|
class << self
|
@@ -29,7 +27,7 @@ module Caboodle
|
|
29
27
|
end
|
30
28
|
|
31
29
|
def dump_config
|
32
|
-
p = File.expand_path(File.join(Caboodle::App.root,"site.yml"))
|
30
|
+
p = File.expand_path(File.join(Caboodle::App.root,"config","site.yml"))
|
33
31
|
d = Caboodle::Site.clone
|
34
32
|
e = d.to_hash
|
35
33
|
e.delete("required_settings")
|
@@ -43,11 +41,11 @@ module Caboodle
|
|
43
41
|
|
44
42
|
def load_kit name
|
45
43
|
unless name.blank?
|
46
|
-
puts "Load kit #{name}"
|
47
44
|
kit_name = name.to_s.split("::").last || name
|
48
45
|
kit_name = kit_name.downcase
|
46
|
+
puts "Loading Kit: #{kit_name}"
|
49
47
|
orig = Caboodle.constants
|
50
|
-
require "caboodle/kits/#{kit_name}/#{kit_name}" rescue puts "No such kit: #{kit_name}"
|
48
|
+
require "caboodle/kits/#{kit_name}/#{kit_name}" rescue puts "Warning! No such kit: #{kit_name}"
|
51
49
|
added = Caboodle.constants - orig
|
52
50
|
added.each do |d|
|
53
51
|
c = Caboodle.const_get(d)
|
@@ -73,19 +71,14 @@ module Caboodle
|
|
73
71
|
|
74
72
|
def require_all
|
75
73
|
if(Caboodle::Site.kits)
|
76
|
-
Caboodle::Site.kits.each
|
77
|
-
puts "Load Kit: #{k}"
|
78
|
-
load_kit k
|
79
|
-
end
|
74
|
+
Caboodle::Site.kits.each { |k| load_kit k }
|
80
75
|
else
|
81
|
-
puts "Kits not registered"
|
76
|
+
STDERR.puts "Kits not registered"
|
82
77
|
end
|
83
78
|
end
|
84
79
|
|
85
80
|
def use_all
|
86
|
-
Caboodle::Kits.each
|
87
|
-
p.start
|
88
|
-
end
|
81
|
+
Caboodle::Kits.each { |p| p.start }
|
89
82
|
end
|
90
83
|
|
91
84
|
def menu display, link
|
@@ -103,16 +96,12 @@ module Caboodle
|
|
103
96
|
end
|
104
97
|
|
105
98
|
def stylesheets array_of_css_files
|
106
|
-
array_of_css_files.each
|
107
|
-
Caboodle::Stylesheets << a
|
108
|
-
end
|
99
|
+
array_of_css_files.each { |a| Caboodle::Stylesheets << a }
|
109
100
|
Caboodle::Stylesheets.uniq!
|
110
101
|
end
|
111
102
|
|
112
103
|
def javascripts array_of_js_files
|
113
|
-
array_of_js_files.each
|
114
|
-
Caboodle::Javascripts << a
|
115
|
-
end
|
104
|
+
array_of_js_files.each { |a| Caboodle::Javascripts << a }
|
116
105
|
Caboodle::Javascripts.uniq!
|
117
106
|
end
|
118
107
|
|
@@ -35,6 +35,7 @@ module Caboodle
|
|
35
35
|
class Flickr < Caboodle::Kit
|
36
36
|
|
37
37
|
set :views, File.join(File.dirname(__FILE__), "views")
|
38
|
+
set :public, File.join(File.dirname(__FILE__), "public")
|
38
39
|
|
39
40
|
def home
|
40
41
|
@photosets = FlickrAPI.photosets rescue []
|
@@ -54,10 +55,6 @@ module Caboodle
|
|
54
55
|
haml :photography
|
55
56
|
end
|
56
57
|
|
57
|
-
get "/galleria.js" do
|
58
|
-
send_file File.join(File.dirname(__FILE__),"galleria.noconflict.min.js")
|
59
|
-
end
|
60
|
-
|
61
58
|
required [:flickr_username, :flickr_user_id, :flickr_api_key]
|
62
59
|
|
63
60
|
menu "Photography", "/photography"
|
data/lib/caboodle/kits/flickr/{galleria.noconflict.min.js → public/galleria.noconflict.min.js}
RENAMED
File without changes
|
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: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- steflewandowski
|
@@ -273,9 +273,10 @@ files:
|
|
273
273
|
- lib/caboodle/app/views/layout.haml
|
274
274
|
- lib/caboodle/command.rb
|
275
275
|
- lib/caboodle/config.rb
|
276
|
+
- lib/caboodle/config/defaults.yml
|
276
277
|
- lib/caboodle/kit.rb
|
277
278
|
- lib/caboodle/kits/flickr/flickr.rb
|
278
|
-
- lib/caboodle/kits/flickr/galleria.noconflict.min.js
|
279
|
+
- lib/caboodle/kits/flickr/public/galleria.noconflict.min.js
|
279
280
|
- lib/caboodle/kits/flickr/views/photography.haml
|
280
281
|
- lib/caboodle/kits/github/github.rb
|
281
282
|
- lib/caboodle/kits/github/views/_repo.haml
|
@@ -298,6 +299,7 @@ files:
|
|
298
299
|
- lib/caboodle/kits/posterous/views/_post.haml
|
299
300
|
- lib/caboodle/kits/posterous/views/post.haml
|
300
301
|
- lib/caboodle/kits/posterous/views/posts.haml
|
302
|
+
- lib/caboodle/kits/skimmed/skimmed.rb
|
301
303
|
- lib/caboodle/kits/soundcloud/soundcloud.rb
|
302
304
|
- lib/caboodle/kits/soundcloud/views/soundcloud.haml
|
303
305
|
- lib/caboodle/kits/twitter/public/images/ajax-loader.gif
|