caboodle 0.2.14 → 0.2.15
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.rb +1 -1
- data/lib/caboodle/app/views/error.haml +2 -0
- data/lib/caboodle/kit.rb +31 -10
- data/lib/caboodle/kits/about/about.rb +8 -15
- data/lib/caboodle/kits/analytics/analytics.rb +21 -19
- data/lib/caboodle/kits/beta/beta.rb +10 -11
- data/lib/caboodle/kits/carbonmade/carbonmade.rb +2 -5
- data/lib/caboodle/kits/carbonmade/views/{carbonmade.haml → portfolio.haml} +0 -0
- data/lib/caboodle/kits/credits/credits.rb +4 -0
- data/lib/caboodle/kits/credits/views/credits.haml +3 -0
- data/lib/caboodle/kits/disqus/disqus.rb +6 -12
- data/lib/caboodle/kits/disqus/views/{disqus.haml → chat.haml} +0 -0
- data/lib/caboodle/kits/flickr/flickr.rb +8 -17
- data/lib/caboodle/kits/geo/geo.rb +9 -11
- data/lib/caboodle/kits/github/github.rb +2 -3
- data/lib/caboodle/kits/googlelocal/googlelocal.rb +3 -8
- data/lib/caboodle/kits/googlelocal/views/{googlelocal.haml → near_me.haml} +0 -0
- data/lib/caboodle/kits/gravatar/gravatar.rb +10 -12
- data/lib/caboodle/kits/history/history.rb +8 -31
- data/lib/caboodle/kits/history/views/history.scss +1 -1
- data/lib/caboodle/kits/jquery/jquery.rb +3 -5
- data/lib/caboodle/kits/lazyload/lazyload.rb +3 -5
- data/lib/caboodle/kits/linkedin/linkedin.rb +4 -5
- data/lib/caboodle/kits/linkedin/views/linkedin.scss +1 -1
- data/lib/caboodle/kits/onepage/onepage.rb +1 -4
- data/lib/caboodle/kits/posterous/posterous.rb +2 -4
- data/lib/caboodle/kits/seo/seo.rb +4 -6
- data/lib/caboodle/kits/soundcloud/soundcloud.rb +12 -13
- data/lib/caboodle/kits/soundcloud/views/{soundcloud.haml → music.haml} +0 -0
- data/lib/caboodle/kits/standard/standard.rb +9 -11
- data/lib/caboodle/kits/susy/views/susy/_base.scss +2 -2
- data/lib/caboodle/kits/susy/views/susy/screen.scss +1 -3
- data/lib/caboodle/kits/tumblr/tumblr.rb +30 -38
- data/lib/caboodle/kits/twitter/twitter.rb +10 -14
- data/lib/caboodle/kits/typekit/typekit.rb +1 -0
- data/lib/caboodle/kits/typekit/views/typekit.scss +17 -0
- data/lib/caboodle/kits/vimeo/views/vimeo.haml +2 -0
- data/lib/caboodle/kits/vimeo/vimeo.rb +5 -0
- metadata +13 -7
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.2. | 
| 1 | 
            +
            0.2.15
         | 
    
        data/lib/caboodle.rb
    CHANGED
    
    | @@ -1,3 +1,3 @@ | |
| 1 1 | 
             
            $:<<File.dirname(__FILE__)
         | 
| 2 2 | 
             
            $:<<File.join(File.dirname(__FILE__),"caboodle")
         | 
| 3 | 
            -
            %{sinatra/base yaml hashie haml find sinatra/base sinatra/compass sinatra/advanced_routes compass susy pp sleepy caboodle/helpers caboodle/config caboodle/kit caboodle/app caboodle/scrape}.split.each{|a| require a}
         | 
| 3 | 
            +
            %{sinatra/base yaml hashie haml maruku find sinatra/base sinatra/compass sinatra/advanced_routes compass susy pp sleepy caboodle/helpers caboodle/config caboodle/kit caboodle/app caboodle/scrape}.split.each{|a| require a}
         | 
    
        data/lib/caboodle/kit.rb
    CHANGED
    
    | @@ -27,6 +27,13 @@ module Caboodle | |
| 27 27 |  | 
| 28 28 | 
             
                Config = Hashie::Mash.new
         | 
| 29 29 |  | 
| 30 | 
            +
                def markdown sym
         | 
| 31 | 
            +
                  puts sym
         | 
| 32 | 
            +
                  md = File.expand_path(File.join(Caboodle::App.root,"config","#{sym.to_s}.md"))
         | 
| 33 | 
            +
                  @content = Maruku.new(open(md).read).to_html_document
         | 
| 34 | 
            +
                  haml ".page.about.thin_page= @content"
         | 
| 35 | 
            +
                end
         | 
| 36 | 
            +
                
         | 
| 30 37 | 
             
                class << self
         | 
| 31 38 |  | 
| 32 39 | 
             
                  attr_accessor :credit_link
         | 
| @@ -224,10 +231,20 @@ module Caboodle | |
| 224 231 | 
             
                    Caboodle::Kits.each { |p| p.start }
         | 
| 225 232 | 
             
                  end
         | 
| 226 233 |  | 
| 227 | 
            -
                  def menu display, path, &block
         | 
| 234 | 
            +
                  def menu display, path=nil, &block
         | 
| 235 | 
            +
                    #todo proper slugify
         | 
| 236 | 
            +
                    slug = display.downcase.gsub(" ","-").gsub("'","")
         | 
| 237 | 
            +
                    path = "/#{slug}" unless path
         | 
| 228 238 | 
             
                    path = "/" if Site.home_kit == self.to_s.gsub("Caboodle::","")
         | 
| 229 239 | 
             
                    Caboodle::MenuItems << {:display=>display, :link=>path, :kit=>self}
         | 
| 230 | 
            -
                    self. | 
| 240 | 
            +
                    self.before {@title = display}
         | 
| 241 | 
            +
                    if block
         | 
| 242 | 
            +
                      self.get path, &block
         | 
| 243 | 
            +
                    else
         | 
| 244 | 
            +
                      eval "self.get '#{path}' do
         | 
| 245 | 
            +
                      haml :#{slug.gsub("-","_")}
         | 
| 246 | 
            +
                      end"
         | 
| 247 | 
            +
                    end
         | 
| 231 248 | 
             
                    @@has_menu = true
         | 
| 232 249 | 
             
                  end
         | 
| 233 250 |  | 
| @@ -274,6 +291,15 @@ module Caboodle | |
| 274 291 | 
             
                    Caboodle::SASS.uniq!
         | 
| 275 292 | 
             
                  end
         | 
| 276 293 |  | 
| 294 | 
            +
                  def add_layout k, v
         | 
| 295 | 
            +
                    unless Caboodle::Layout[k.to_sym].blank?
         | 
| 296 | 
            +
                      Caboodle::Layout[k.to_sym] << "\n"
         | 
| 297 | 
            +
                      Caboodle::Layout[k.to_sym] << v
         | 
| 298 | 
            +
                    else
         | 
| 299 | 
            +
                      Caboodle::Layout[k.to_sym] = v
         | 
| 300 | 
            +
                    end
         | 
| 301 | 
            +
                  end
         | 
| 302 | 
            +
                  
         | 
| 277 303 | 
             
                  alias_method :stylesheet, :stylesheets
         | 
| 278 304 |  | 
| 279 305 | 
             
                  def javascripts array_of_js_files
         | 
| @@ -298,12 +324,7 @@ module Caboodle | |
| 298 324 |  | 
| 299 325 | 
             
                  def add_to_layout hash_of_items
         | 
| 300 326 | 
             
                    hash_of_items.each do |k,v|
         | 
| 301 | 
            -
                       | 
| 302 | 
            -
                        Caboodle::Layout[k.to_sym] << "\n"
         | 
| 303 | 
            -
                        Caboodle::Layout[k.to_sym] << v
         | 
| 304 | 
            -
                      else
         | 
| 305 | 
            -
                        Caboodle::Layout[k.to_sym] = v
         | 
| 306 | 
            -
                      end
         | 
| 327 | 
            +
                      add_layout k, v
         | 
| 307 328 | 
             
                    end
         | 
| 308 329 | 
             
                  end
         | 
| 309 330 |  | 
| @@ -313,10 +334,10 @@ module Caboodle | |
| 313 334 | 
             
                    end
         | 
| 314 335 | 
             
                  end
         | 
| 315 336 |  | 
| 316 | 
            -
                  def credit url
         | 
| 337 | 
            +
                  def credit url, title=nil
         | 
| 317 338 | 
             
                    #todo there must be an easier way
         | 
| 318 339 | 
             
                    class_eval "def credit_link
         | 
| 319 | 
            -
                    \"<a rel='me' href='#{url}'>#{self.name.split("::").last}</a>\"
         | 
| 340 | 
            +
                    \"<a rel='me' href='#{url}'>#{title || self.name.split("::").last}</a>\"
         | 
| 320 341 | 
             
                    end"
         | 
| 321 342 | 
             
                  end
         | 
| 322 343 |  | 
| @@ -1,17 +1,10 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 3 | 
            -
             | 
| 4 | 
            -
               | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
                 | 
| 9 | 
            -
                    
         | 
| 10 | 
            -
                menu "About", "/about" do
         | 
| 11 | 
            -
                  @title = "About"
         | 
| 12 | 
            -
                  md = File.expand_path(File.join(Caboodle::App.root,"config","about.md"))
         | 
| 13 | 
            -
                  @content = Maruku.new(open(md).read).to_html_document
         | 
| 14 | 
            -
                  haml ".page.about.thin_page= @content"
         | 
| 15 | 
            -
                end
         | 
| 1 | 
            +
            class Caboodle::About < Caboodle::Kit
         | 
| 2 | 
            +
              
         | 
| 3 | 
            +
              description "Gives you an About page at /about. Edit the Markdown file located in your application config directory."
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              files ["about.md"]
         | 
| 6 | 
            +
                  
         | 
| 7 | 
            +
              menu "About", "/about" do
         | 
| 8 | 
            +
                markdown :about
         | 
| 16 9 | 
             
              end
         | 
| 17 10 | 
             
            end
         | 
| @@ -1,21 +1,23 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
               | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 1 | 
            +
            class Caboodle::Analytics < Caboodle::Kit
         | 
| 2 | 
            +
              
         | 
| 3 | 
            +
              description "Adds Google Analytics to every page of the site"
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              required [:analytics_id]
         | 
| 6 | 
            +
              
         | 
| 7 | 
            +
              if ENV["RACK_ENV"] == "production"
         | 
| 8 | 
            +
                add_layout :after_body, "<script type=\"text/javascript\">
         | 
| 9 | 
            +
                  var _gaq = _gaq || [];
         | 
| 10 | 
            +
                  _gaq.push(['_setAccount', '#{Caboodle::Site.analytics_id}']);
         | 
| 11 | 
            +
                  _gaq.push(['_setDomainName', 'none']);
         | 
| 12 | 
            +
                  _gaq.push(['_setAllowLinker', true]);
         | 
| 13 | 
            +
                  _gaq.push(['_trackPageview']);
         | 
| 14 14 |  | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 15 | 
            +
                  (function() {
         | 
| 16 | 
            +
                    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
         | 
| 17 | 
            +
                    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
         | 
| 18 | 
            +
                    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
         | 
| 19 | 
            +
                  })();
         | 
| 20 20 |  | 
| 21 | 
            -
            </script>"
         | 
| 21 | 
            +
                </script>"
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
            end
         | 
| @@ -1,11 +1,10 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
               | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
            Caboodle::Layout.above_header = "<div id='beta'><p>#{Caboodle::Site.beta_message}</p></div>"
         | 
| 1 | 
            +
            class Caboodle::Beta < Caboodle::Kit
         | 
| 2 | 
            +
              
         | 
| 3 | 
            +
              description "Displays a beta message on every page of the site"
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              required [:beta_message]
         | 
| 6 | 
            +
              
         | 
| 7 | 
            +
              add_sass ["beta"]
         | 
| 8 | 
            +
              
         | 
| 9 | 
            +
              add_layout :above_header, "<div id='beta'><p>#{Caboodle::Site.beta_message}</p></div>"
         | 
| 10 | 
            +
            end
         | 
| @@ -2,14 +2,11 @@ module Caboodle | |
| 2 2 | 
             
              class Carbonmade < Caboodle::Kit
         | 
| 3 3 | 
             
                description "Embeds a Carbonmade.com portfolio."
         | 
| 4 4 |  | 
| 5 | 
            -
                menu "Portfolio" | 
| 6 | 
            -
                  @title = "Portfolio"
         | 
| 7 | 
            -
                  haml :carbonmade
         | 
| 8 | 
            -
                end
         | 
| 5 | 
            +
                menu "Portfolio"
         | 
| 9 6 |  | 
| 10 7 | 
             
                required [:carbonmade_url]
         | 
| 11 8 |  | 
| 12 | 
            -
                credit Caboodle::Site.carbonmade_url
         | 
| 9 | 
            +
                credit Caboodle::Site.carbonmade_url, "Carbonmade portfolio"
         | 
| 13 10 |  | 
| 14 11 | 
             
                add_sass ["carbonmade"]
         | 
| 15 12 | 
             
              end
         | 
| 
            File without changes
         | 
| @@ -1,13 +1,7 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
                  @title = "Chat"
         | 
| 8 | 
            -
                  haml :disqus
         | 
| 9 | 
            -
                end
         | 
| 10 | 
            -
                
         | 
| 11 | 
            -
                required [:disqus]
         | 
| 12 | 
            -
              end
         | 
| 1 | 
            +
            class Caboodle::Disqus < Caboodle::Kit  
         | 
| 2 | 
            +
              description "Adds a chat page and support for other kits that require comments"    
         | 
| 3 | 
            +
              
         | 
| 4 | 
            +
              menu "Chat"
         | 
| 5 | 
            +
              
         | 
| 6 | 
            +
              required [:disqus]
         | 
| 13 7 | 
             
            end
         | 
| 
            File without changes
         | 
| @@ -51,26 +51,17 @@ module Caboodle | |
| 51 51 |  | 
| 52 52 | 
             
                description "A browsable Flickr.com gallery with sets"
         | 
| 53 53 |  | 
| 54 | 
            -
                menu "Photography" | 
| 55 | 
            -
                   | 
| 56 | 
            -
             | 
| 57 | 
            -
                    @title = "Photography"
         | 
| 58 | 
            -
                    haml :photography
         | 
| 59 | 
            -
                  else
         | 
| 60 | 
            -
                    "<h2>Please set your Flickr username</h2>"
         | 
| 61 | 
            -
                  end
         | 
| 54 | 
            +
                menu "Photography" do
         | 
| 55 | 
            +
                  @photosets = FlickrAPI.photosets rescue []
         | 
| 56 | 
            +
                  haml :photography
         | 
| 62 57 | 
             
                end
         | 
| 63 58 |  | 
| 64 59 | 
             
                get "/photography/:set_id" do |set_id|
         | 
| 65 | 
            -
                   | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
                    haml :photography
         | 
| 71 | 
            -
                  else
         | 
| 72 | 
            -
                    "<h2>Please set your Flickr username</h2>"
         | 
| 73 | 
            -
                  end
         | 
| 60 | 
            +
                  @photosets = FlickrAPI.photosets rescue []
         | 
| 61 | 
            +
                  @set_id = set_id
         | 
| 62 | 
            +
                  @photoset = Caboodle::FlickrAPI.photoset_info(@set_id) rescue nil
         | 
| 63 | 
            +
                  @title = "Photography: #{@photoset.title if @photoset.respond_to?(:title)}"
         | 
| 64 | 
            +
                  haml :photography
         | 
| 74 65 | 
             
                end
         | 
| 75 66 |  | 
| 76 67 | 
             
                required [:flickr_username, :flickr_api_key]
         | 
| @@ -1,14 +1,12 @@ | |
| 1 1 | 
             
            require 'rack-geo'
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
               | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
                 | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
                
         | 
| 13 | 
            -
              end
         | 
| 3 | 
            +
            class Caboodle::Geo < Caboodle::Kit
         | 
| 4 | 
            +
              optional [:zip, :postcode, :address, :latitude, :longitude]
         | 
| 5 | 
            +
              
         | 
| 6 | 
            +
              before do
         | 
| 7 | 
            +
                @latitude, @longitude, @uncertainty = 37.0625, -95.677068, 100
         | 
| 8 | 
            +
                @coords = "#{@latitude};#{@longitude} epu=#{@uncertainty}"
         | 
| 9 | 
            +
                headers "HTTP_GEO_POSITION" => @coords
         | 
| 10 | 
            +
              end    
         | 
| 11 | 
            +
              
         | 
| 14 12 | 
             
            end
         | 
| @@ -3,8 +3,7 @@ module Caboodle | |
| 3 3 |  | 
| 4 4 | 
             
                description "A single page which links to all of a Github account's public repos"
         | 
| 5 5 |  | 
| 6 | 
            -
                menu "Code" | 
| 7 | 
            -
                  @title = "Code"
         | 
| 6 | 
            +
                menu "Code" do
         | 
| 8 7 | 
             
                  @repos = GithubAPI.repositories
         | 
| 9 8 |  | 
| 10 9 | 
             
                  @repos.sort!{|a, b| a.watchers <=> b.watchers}.reverse!
         | 
| @@ -19,7 +18,7 @@ module Caboodle | |
| 19 18 |  | 
| 20 19 | 
             
                required [:github_username]
         | 
| 21 20 |  | 
| 22 | 
            -
                credit "http://github.com/#{Site.github_username}"
         | 
| 21 | 
            +
                credit "http://github.com/#{Site.github_username}", "Fork #{Site.github_username} on Github"
         | 
| 23 22 | 
             
              end
         | 
| 24 23 |  | 
| 25 24 | 
             
              class GithubAPI < Weary::Base
         | 
| @@ -11,23 +11,18 @@ module Caboodle | |
| 11 11 |  | 
| 12 12 | 
             
                before do
         | 
| 13 13 | 
             
                  @locations = Config.google_local_locations
         | 
| 14 | 
            -
                end
         | 
| 15 | 
            -
                
         | 
| 16 | 
            -
                menu "Near me", "/near_me" do
         | 
| 17 | 
            -
                  @title = "Near me"
         | 
| 18 14 | 
             
                  @location = Config.google_local_locations.first
         | 
| 19 | 
            -
                  haml :googlelocal
         | 
| 20 15 | 
             
                end
         | 
| 21 16 |  | 
| 17 | 
            +
                menu "Near me"
         | 
| 18 | 
            +
                
         | 
| 22 19 | 
             
                get "/near_me/:slug" do
         | 
| 23 20 | 
             
                  Config.google_local_locations.each do |loc|
         | 
| 24 21 | 
             
                    if loc.title.downcase.gsub(" ","-") == params[:slug]
         | 
| 25 22 | 
             
                      @location = loc
         | 
| 26 23 | 
             
                    end
         | 
| 27 24 | 
             
                  end
         | 
| 28 | 
            -
             | 
| 29 | 
            -
                  puts @location.inspect
         | 
| 30 | 
            -
                  
         | 
| 25 | 
            +
                        
         | 
| 31 26 | 
             
                  if @location
         | 
| 32 27 | 
             
                    haml :googlelocal
         | 
| 33 28 | 
             
                  else
         | 
| 
            File without changes
         | 
| @@ -1,17 +1,15 @@ | |
| 1 1 | 
             
            require 'digest/md5'
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
               | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
                 | 
| 11 | 
            -
                   | 
| 12 | 
            -
             | 
| 13 | 
            -
                    Caboodle::Site.logo_url = "http://www.gravatar.com/avatar/#{hash}"
         | 
| 14 | 
            -
                  end
         | 
| 3 | 
            +
            class Caboodle::Gravatar < Caboodle::Kit
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              description "Sets the logo of the site to your gravatar.com image"
         | 
| 6 | 
            +
              
         | 
| 7 | 
            +
              optional [:email]
         | 
| 8 | 
            +
              
         | 
| 9 | 
            +
              configure do
         | 
| 10 | 
            +
                if Caboodle::Site.logo_url.to_s.blank? && !Caboodle::Site.email.to_s.blank?
         | 
| 11 | 
            +
                  hash = Digest::MD5.hexdigest(Caboodle::Site.email)
         | 
| 12 | 
            +
                  Caboodle::Site.logo_url = "http://www.gravatar.com/avatar/#{hash}"
         | 
| 15 13 | 
             
                end
         | 
| 16 14 | 
             
              end
         | 
| 17 15 | 
             
            end
         | 
| @@ -1,34 +1,11 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
            require "sinatra/compass"
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            gem "compass-susy-plugin"
         | 
| 5 | 
            -
            require "susy"
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            require "compass"
         | 
| 8 | 
            -
            require "sinatra/base"
         | 
| 9 | 
            -
            require "sinatra/sugar"
         | 
| 10 | 
            -
            require "sinatra/advanced_routes"
         | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
            module Caboodle
         | 
| 14 | 
            -
              class History < Caboodle::Kit
         | 
| 15 | 
            -
                  
         | 
| 16 | 
            -
                description "A list of things you have done in the past."
         | 
| 1 | 
            +
            class Caboodle::History < Caboodle::Kit
         | 
| 17 2 |  | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 3 | 
            +
              description "A list of things you have done in the past."
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              config_files ["history.yml"]
         | 
| 6 | 
            +
              
         | 
| 7 | 
            +
              menu "History"
         | 
| 8 | 
            +
              
         | 
| 9 | 
            +
              add_sass ["history"]
         | 
| 24 10 |  | 
| 25 | 
            -
                get("/history/:name.css") do
         | 
| 26 | 
            -
                  content_type 'text/css', :charset => 'utf-8'
         | 
| 27 | 
            -
                  options = {:sass_dir => File.join(File.dirname(__FILE__),"views"), :syntax=>:scss}
         | 
| 28 | 
            -
                  sass :"#{params[:name]}", options.merge!(::Compass.sass_engine_options)
         | 
| 29 | 
            -
                end
         | 
| 30 | 
            -
                
         | 
| 31 | 
            -
                add_sass ["history"]
         | 
| 32 | 
            -
                
         | 
| 33 | 
            -
              end
         | 
| 34 11 | 
             
            end
         | 
| @@ -1,6 +1,4 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
                javascripts ["http://ajax.googleapis.com/ajax/libs/jquery/#{Caboodle::Site.jquery_version || "1.4.2"}/jquery.min.js"]
         | 
| 5 | 
            -
              end
         | 
| 1 | 
            +
            class Caboodle::Jquery < Caboodle::Kit
         | 
| 2 | 
            +
              description "Adds Jquery to every page of the site"
         | 
| 3 | 
            +
              javascripts ["http://ajax.googleapis.com/ajax/libs/jquery/#{Caboodle::Site.jquery_version || "1.4.2"}/jquery.min.js"]
         | 
| 6 4 | 
             
            end
         | 
| @@ -1,6 +1,4 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
                javascripts ["/jquery.lazyload.mini.js","/lazyload.js"]
         | 
| 5 | 
            -
              end
         | 
| 1 | 
            +
            class Caboodle::LazyLoad < Caboodle::Kit
         | 
| 2 | 
            +
              description "Improves page load times for javascript-enabled browsers by loading images on demand as the user scrolls the page."
         | 
| 3 | 
            +
              javascripts ["/jquery.lazyload.mini.js","/lazyload.js"]
         | 
| 6 4 | 
             
            end
         | 
| @@ -17,16 +17,15 @@ module Caboodle | |
| 17 17 | 
             
              class Linkedin < Caboodle::Kit
         | 
| 18 18 |  | 
| 19 19 | 
             
                description "Displays a Linkedin profile as a CV with consistent layout with the rest of the site."
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                menu "CV" | 
| 22 | 
            -
                  @ | 
| 23 | 
            -
                  @linkedin = LinkedinAPI.new #rescue nil
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                menu "CV" do
         | 
| 22 | 
            +
                  @linkedin = LinkedinAPI.new
         | 
| 24 23 | 
             
                  haml :cv
         | 
| 25 24 | 
             
                end
         | 
| 26 25 |  | 
| 27 26 | 
             
                required [:linkedin_full_name, :linkedin_profile_url]
         | 
| 28 27 |  | 
| 29 | 
            -
                credit Caboodle::Site.linkedin_profile_url
         | 
| 28 | 
            +
                credit Caboodle::Site.linkedin_profile_url, "Linkedin profile"
         | 
| 30 29 |  | 
| 31 30 | 
             
                add_sass ["linkedin"]
         | 
| 32 31 |  | 
| @@ -162,10 +162,8 @@ module Caboodle | |
| 162 162 |  | 
| 163 163 | 
             
                rss ["feed://stef.posterous.com/rss.xml"]
         | 
| 164 164 |  | 
| 165 | 
            -
                credit "http://#{Caboodle::Site.posterous_sitename}.posterous.com"
         | 
| 165 | 
            +
                credit "http://#{Caboodle::Site.posterous_sitename}.posterous.com", "#{Caboodle::Site.posterous_sitename} on Posterous"
         | 
| 166 166 |  | 
| 167 167 | 
             
                add_sass ["posterous"]
         | 
| 168 168 | 
             
              end
         | 
| 169 | 
            -
            end
         | 
| 170 | 
            -
             | 
| 171 | 
            -
            #Caboodle::Posterous.new #gets the ID set up
         | 
| 169 | 
            +
            end
         | 
| @@ -1,7 +1,5 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
                optional [:seo_keywords,:seo_description]
         | 
| 6 | 
            -
              end
         | 
| 1 | 
            +
            class Caboodle::SEO < Caboodle::Kit
         | 
| 2 | 
            +
              description "Adds basic search engine optimisation"
         | 
| 3 | 
            +
              add_layout :meta, "<meta type='keywords' value='#{Caboodle::Site.seo_keywords}' /><meta type='description' value='#{Caboodle::Site.seo_description}' />"    
         | 
| 4 | 
            +
              optional [:seo_keywords,:seo_description]
         | 
| 7 5 | 
             
            end
         | 
| @@ -1,11 +1,10 @@ | |
| 1 1 | 
             
            module Caboodle
         | 
| 2 2 | 
             
              class Soundcloud < Caboodle::Kit
         | 
| 3 3 | 
             
                description "Displays a search of soundcloud as embedded players on a single page."
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                menu " | 
| 6 | 
            -
                  @title = "Mixes"
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                menu "Music" do
         | 
| 7 6 | 
             
                  @mixes = SoundcloudAPI.sets
         | 
| 8 | 
            -
                  haml : | 
| 7 | 
            +
                  haml :music
         | 
| 9 8 | 
             
                end
         | 
| 10 9 |  | 
| 11 10 | 
             
                required [:soundcloud_query]
         | 
| @@ -15,15 +14,15 @@ module Caboodle | |
| 15 14 |  | 
| 16 15 | 
             
              class SoundcloudAPI < Weary::Base
         | 
| 17 16 |  | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 17 | 
            +
                declare "sets" do |r|
         | 
| 18 | 
            +
                  r.url = "http://api.soundcloud.com/playlists?q=#{Site.soundcloud_query}"
         | 
| 19 | 
            +
                  r.via = :get
         | 
| 20 | 
            +
                  r.headers = {'Accept' => 'application/xml'}
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
                
         | 
| 23 | 
            +
                def self.sets
         | 
| 24 | 
            +
                  Hashie::Mash.new(SoundcloudAPI.new.sets.perform_sleepily.parse).playlists
         | 
| 25 | 
            +
                end
         | 
| 27 26 |  | 
| 28 27 | 
             
              end
         | 
| 29 28 | 
             
            end
         | 
| 
            File without changes
         | 
| @@ -1,13 +1,11 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
                 | 
| 7 | 
            -
             | 
| 8 | 
            -
                   | 
| 9 | 
            -
                    haml :standard
         | 
| 10 | 
            -
                  end
         | 
| 1 | 
            +
            class Caboodle::Standard < Caboodle::Kit
         | 
| 2 | 
            +
              description "The default home page and site options"
         | 
| 3 | 
            +
              required [:title, :description, :author]
         | 
| 4 | 
            +
              optional [:logo_url]
         | 
| 5 | 
            +
              if Caboodle::Site.home_kit.blank?
         | 
| 6 | 
            +
                puts "Using the default home kit - you will want to run 'caboodle kit:home <kit name>' to specify your own kit"
         | 
| 7 | 
            +
                get "/" do
         | 
| 8 | 
            +
                  haml :standard
         | 
| 11 9 | 
             
                end
         | 
| 12 10 | 
             
              end
         | 
| 13 | 
            -
            end
         | 
| 11 | 
            +
            end
         | 
| @@ -39,8 +39,8 @@ $alt: #ff6600; | |
| 39 39 | 
             
              font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
         | 
| 40 40 | 
             
            }
         | 
| 41 41 |  | 
| 42 | 
            -
            @mixin  | 
| 43 | 
            -
              font-family: " | 
| 42 | 
            +
            @mixin main-family {
         | 
| 43 | 
            +
              font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
         | 
| 44 44 | 
             
              font-weight: lighter;
         | 
| 45 45 | 
             
            }
         | 
| 46 46 |  | 
| @@ -30,7 +30,7 @@ header#site-header { | |
| 30 30 | 
             
              @include trailer(2,32px);
         | 
| 31 31 | 
             
              #logo {
         | 
| 32 32 | 
             
                @include columns(2,12);
         | 
| 33 | 
            -
                
         | 
| 33 | 
            +
                height: 64px;
         | 
| 34 34 | 
             
                img {
         | 
| 35 35 | 
             
                  width: 64px;
         | 
| 36 36 | 
             
                  height: auto;
         | 
| @@ -58,7 +58,6 @@ header#site-header { | |
| 58 58 | 
             
                ul {
         | 
| 59 59 | 
             
                  @include inline-block-list(12px);
         | 
| 60 60 | 
             
                  li {
         | 
| 61 | 
            -
                    @include slab-family;
         | 
| 62 61 | 
             
                  }
         | 
| 63 62 | 
             
                }
         | 
| 64 63 | 
             
              }
         | 
| @@ -107,7 +106,6 @@ section#main { | |
| 107 106 | 
             
            footer {
         | 
| 108 107 | 
             
              @include prefix(2);
         | 
| 109 108 | 
             
              @include full;
         | 
| 110 | 
            -
              @include slab-family;
         | 
| 111 109 | 
             
            }
         | 
| 112 110 |  | 
| 113 111 | 
             
            section.subsection {
         | 
| @@ -1,44 +1,36 @@ | |
| 1 1 | 
             
            gem "tumblr-rb"
         | 
| 2 2 | 
             
            require 'tumblr'
         | 
| 3 3 |  | 
| 4 | 
            -
             | 
| 5 | 
            -
               | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
                 | 
| 9 | 
            -
                   | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
                    a.join(" ")
         | 
| 17 | 
            -
                  end
         | 
| 4 | 
            +
            class Caboodle::Tumblr < Caboodle::Kit   
         | 
| 5 | 
            +
              description "Includes a tumblr.com account"
         | 
| 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(" ")
         | 
| 18 16 | 
             
                end
         | 
| 19 | 
            -
                 
         | 
| 20 | 
            -
                required [:tumblr_email, :tumblr_password, :tumblr_sitename]
         | 
| 21 | 
            -
                
         | 
| 22 | 
            -
                menu "Tumblr", "/tumblr" do
         | 
| 23 | 
            -
                  puts "Get tumblr"
         | 
| 24 | 
            -
                  tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
         | 
| 25 | 
            -
                  req = tumblr.read(Caboodle::Site.tumblr_sitename, {:num=>10}).perform_sleepily
         | 
| 26 | 
            -
                  puts req.inspect
         | 
| 27 | 
            -
                  posts = ::Tumblr::Reader.get_posts(req)
         | 
| 28 | 
            -
                  puts posts.inspect
         | 
| 29 | 
            -
             | 
| 30 | 
            -
                  #posts = tumblr.get_posts(result)
         | 
| 31 | 
            -
                  haml :tumblr, :locals => { :posts => posts }
         | 
| 32 | 
            -
                end
         | 
| 33 | 
            -
                
         | 
| 34 | 
            -
                get "/tumblr/page/:page" do
         | 
| 35 | 
            -
                  tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
         | 
| 36 | 
            -
                  result
         | 
| 37 | 
            -
                  posts = tumblr.get_posts()
         | 
| 38 | 
            -
                  haml :tumblr, :locals => { :posts => posts }
         | 
| 39 | 
            -
                end
         | 
| 40 | 
            -
                
         | 
| 41 | 
            -
                add_sass ["tumblr"]
         | 
| 42 | 
            -
                
         | 
| 43 17 | 
             
              end
         | 
| 18 | 
            +
               
         | 
| 19 | 
            +
              required [:tumblr_email, :tumblr_password, :tumblr_sitename]
         | 
| 20 | 
            +
              
         | 
| 21 | 
            +
              menu "Tumblr" do
         | 
| 22 | 
            +
                tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
         | 
| 23 | 
            +
                req = tumblr.read(Caboodle::Site.tumblr_sitename, {:num=>10}).perform_sleepily
         | 
| 24 | 
            +
                posts = ::Tumblr::Reader.get_posts(req)
         | 
| 25 | 
            +
                haml :tumblr, :locals => { :posts => posts }
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
              
         | 
| 28 | 
            +
              get "/tumblr/page/:page" do
         | 
| 29 | 
            +
                tumblr = ::Tumblr::Reader.new(Caboodle::Site.tumblr_email,Caboodle::Site.tumblr_password)
         | 
| 30 | 
            +
                posts = tumblr.get_posts()
         | 
| 31 | 
            +
                haml :tumblr, :locals => { :posts => posts }
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
              
         | 
| 34 | 
            +
              add_sass ["tumblr"]
         | 
| 35 | 
            +
              
         | 
| 44 36 | 
             
            end
         | 
| @@ -1,15 +1,11 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
                credit "http://twitter.com/#{Caboodle::Site.twitter_username}"
         | 
| 12 | 
            -
                
         | 
| 13 | 
            -
                add_sass ["twitter"]
         | 
| 14 | 
            -
              end
         | 
| 1 | 
            +
            class Caboodle::Twitter < Caboodle::Kit
         | 
| 2 | 
            +
              description "Display recent tweets from a given twitter account, with infinite scrolling for looking back in time."
         | 
| 3 | 
            +
              
         | 
| 4 | 
            +
              menu "Twitter"
         | 
| 5 | 
            +
              
         | 
| 6 | 
            +
              required [:twitter_username]
         | 
| 7 | 
            +
              
         | 
| 8 | 
            +
              credit "http://twitter.com/#{Caboodle::Site.twitter_username}", "Follow @#{Caboodle::Site.twitter_username} on Twitter"
         | 
| 9 | 
            +
              
         | 
| 10 | 
            +
              add_sass ["twitter"]
         | 
| 15 11 | 
             
            end
         | 
| @@ -0,0 +1,17 @@ | |
| 1 | 
            +
            // #todo set the family programatically
         | 
| 2 | 
            +
            @mixin main-family {
         | 
| 3 | 
            +
              font-family: "museo-slab-1", "Helvetica Neue", Arial, Helvetica, sans-serif;
         | 
| 4 | 
            +
              font-weight: lighter;
         | 
| 5 | 
            +
            }
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            footer {
         | 
| 8 | 
            +
              @include main-family;
         | 
| 9 | 
            +
            }
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            nav {
         | 
| 12 | 
            +
              ul {
         | 
| 13 | 
            +
                li {
         | 
| 14 | 
            +
                  @include main-family;
         | 
| 15 | 
            +
                }
         | 
| 16 | 
            +
              }
         | 
| 17 | 
            +
            }
         | 
    
        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: 9
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 2
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.2. | 
| 9 | 
            +
              - 15
         | 
| 10 | 
            +
              version: 0.2.15
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Stef Lewandowski
         | 
| @@ -260,6 +260,7 @@ files: | |
| 260 260 | 
             
            - lib/caboodle/app/public/images/favicon.ico
         | 
| 261 261 | 
             
            - lib/caboodle/app/public/images/grid.png
         | 
| 262 262 | 
             
            - lib/caboodle/app/public/js/application.js
         | 
| 263 | 
            +
            - lib/caboodle/app/views/error.haml
         | 
| 263 264 | 
             
            - lib/caboodle/app/views/layout.haml
         | 
| 264 265 | 
             
            - lib/caboodle/command.rb
         | 
| 265 266 | 
             
            - lib/caboodle/config.rb
         | 
| @@ -273,11 +274,13 @@ files: | |
| 273 274 | 
             
            - lib/caboodle/kits/beta/views/beta.scss
         | 
| 274 275 | 
             
            - lib/caboodle/kits/broken/broken.rb
         | 
| 275 276 | 
             
            - lib/caboodle/kits/carbonmade/carbonmade.rb
         | 
| 276 | 
            -
            - lib/caboodle/kits/carbonmade/views/carbonmade.haml
         | 
| 277 277 | 
             
            - lib/caboodle/kits/carbonmade/views/carbonmade.scss
         | 
| 278 | 
            +
            - lib/caboodle/kits/carbonmade/views/portfolio.haml
         | 
| 279 | 
            +
            - lib/caboodle/kits/credits/credits.rb
         | 
| 280 | 
            +
            - lib/caboodle/kits/credits/views/credits.haml
         | 
| 278 281 | 
             
            - lib/caboodle/kits/debugger/debugger.rb
         | 
| 279 282 | 
             
            - lib/caboodle/kits/disqus/disqus.rb
         | 
| 280 | 
            -
            - lib/caboodle/kits/disqus/views/ | 
| 283 | 
            +
            - lib/caboodle/kits/disqus/views/chat.haml
         | 
| 281 284 | 
             
            - lib/caboodle/kits/flickr/flickr.rb
         | 
| 282 285 | 
             
            - lib/caboodle/kits/flickr/public/galleria.noconflict.min.js
         | 
| 283 286 | 
             
            - lib/caboodle/kits/flickr/views/photography.haml
         | 
| @@ -288,8 +291,8 @@ files: | |
| 288 291 | 
             
            - lib/caboodle/kits/github/views/github.haml
         | 
| 289 292 | 
             
            - lib/caboodle/kits/googlelocal/config/googlelocal.yml
         | 
| 290 293 | 
             
            - lib/caboodle/kits/googlelocal/googlelocal.rb
         | 
| 291 | 
            -
            - lib/caboodle/kits/googlelocal/views/googlelocal.haml
         | 
| 292 294 | 
             
            - lib/caboodle/kits/googlelocal/views/googlelocal.scss
         | 
| 295 | 
            +
            - lib/caboodle/kits/googlelocal/views/near_me.haml
         | 
| 293 296 | 
             
            - lib/caboodle/kits/gravatar/gravatar.rb
         | 
| 294 297 | 
             
            - lib/caboodle/kits/history/config/history.yml
         | 
| 295 298 | 
             
            - lib/caboodle/kits/history/history.rb
         | 
| @@ -316,7 +319,7 @@ files: | |
| 316 319 | 
             
            - lib/caboodle/kits/seo/seo.rb
         | 
| 317 320 | 
             
            - lib/caboodle/kits/skimmed/skimmed.rb
         | 
| 318 321 | 
             
            - lib/caboodle/kits/soundcloud/soundcloud.rb
         | 
| 319 | 
            -
            - lib/caboodle/kits/soundcloud/views/ | 
| 322 | 
            +
            - lib/caboodle/kits/soundcloud/views/music.haml
         | 
| 320 323 | 
             
            - lib/caboodle/kits/standard/standard.rb
         | 
| 321 324 | 
             
            - lib/caboodle/kits/standard/views/standard.haml
         | 
| 322 325 | 
             
            - lib/caboodle/kits/susy/susy.rb
         | 
| @@ -343,6 +346,9 @@ files: | |
| 343 346 | 
             
            - lib/caboodle/kits/twitter/views/twitter.scss
         | 
| 344 347 | 
             
            - lib/caboodle/kits/typekit/public/typekit.js
         | 
| 345 348 | 
             
            - lib/caboodle/kits/typekit/typekit.rb
         | 
| 349 | 
            +
            - lib/caboodle/kits/typekit/views/typekit.scss
         | 
| 350 | 
            +
            - lib/caboodle/kits/vimeo/views/vimeo.haml
         | 
| 351 | 
            +
            - lib/caboodle/kits/vimeo/vimeo.rb
         | 
| 346 352 | 
             
            - lib/caboodle/scrape.rb
         | 
| 347 353 | 
             
            - test/helper.rb
         | 
| 348 354 | 
             
            - test/test_caboodle.rb
         |