Sha256: acbc9dde9ef1c6b78bd20a6507dcabbebfa9c0f2811423e8fb168b73faf25a85

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

require 'nokogiri'
require 'open-uri'

module Caboodle
  class Twitter < Caboodle::Kit
    description "Display recent tweets from a given twitter account, with infinite scrolling for looking back in time."
  
    required [:twitter_username]
  
    menu "Twitter"
  
    configure do
      if Site.logo_url.to_s.blank? && !Site.twitter_username.to_s.blank?
        xml = Nokogiri::XML(open("http://twitter.com/users/#{Site.twitter_username}.xml").read)
        Site.logo_url = xml.css("profile_image_url").children.first.to_s 
      end
    end
  
    credit "http://twitter.com/#{twitter_username}", "Follow @#{twitter_username} on Twitter"
  
    add_sass ["twitter"]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
caboodle-0.2.22 lib/caboodle/kits/twitter/twitter.rb
caboodle-0.2.21 lib/caboodle/kits/twitter/twitter.rb
caboodle-0.2.20 lib/caboodle/kits/twitter/twitter.rb
caboodle-0.2.19 lib/caboodle/kits/twitter/twitter.rb
caboodle-0.2.18 lib/caboodle/kits/twitter/twitter.rb