caboodle 0.2.15 → 0.2.16

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 CHANGED
@@ -1 +1 @@
1
- 0.2.15
1
+ 0.2.16
data/lib/caboodle/kit.rb CHANGED
@@ -64,6 +64,7 @@ module Caboodle
64
64
  end
65
65
 
66
66
  def load_config p
67
+ set :config, p
67
68
  loaded = YAML.load_file(p)
68
69
  Hashie::Mash.new(loaded).each{ |k,v|
69
70
  v.strip! if v.class == String
@@ -132,7 +133,7 @@ module Caboodle
132
133
  kit_name = kit_name.downcase
133
134
  orig = Caboodle.constants
134
135
  begin
135
- require "caboodle/kits/#{kit_name}/#{kit_name}" #rescue puts "Problem loading Kit: #{kit_name}"
136
+ require "caboodle/kits/#{kit_name}/#{kit_name}"
136
137
  added = Caboodle.constants - orig
137
138
  added.each do |d|
138
139
  c = Caboodle.const_get(d)
@@ -157,7 +158,7 @@ module Caboodle
157
158
  kit_name = kit_name.downcase
158
159
  puts "Unloading Kit: #{kit_name}"
159
160
  orig = Caboodle.constants
160
- require "caboodle/kits/#{kit_name}/#{kit_name}" #rescue puts "Problem loading Kit: #{kit_name}"
161
+ require "caboodle/kits/#{kit_name}/#{kit_name}"
161
162
  added = Caboodle.constants - orig
162
163
  added.each do |d|
163
164
  c = Caboodle.const_get(d)
@@ -0,0 +1,23 @@
1
+
2
+ class Caboodle::Lastfm < Caboodle::Kit
3
+ description "Displays your recent and all time top Last.fm plays"
4
+
5
+ required [:lastfm_username]
6
+
7
+ def scrape
8
+ @last ||= Caboodle.scrape("http://www.last.fm/user/#{Caboodle::Site.lastfm_username}")
9
+ end
10
+
11
+ menu "Listening" do
12
+
13
+ @recent = scrape.css("#recentTracks .module-body").to_html
14
+ @recent.gsub!("href=\"/", 'href="http://last.fm/')
15
+ @top = scrape.css(".modulechartsartists .module-body").to_html
16
+ @top.gsub!("href=\"/", 'href="http://last.fm/')
17
+
18
+ haml :listening
19
+ end
20
+
21
+ credit "http://www.last.fm/listen/user/#{Caboodle::Site.lastfm_username}", "#{Caboodle::Site.lastfm_username} on Last.fm"
22
+
23
+ end
@@ -0,0 +1,11 @@
1
+ .page.lastfm.thin_page
2
+
3
+ %h2
4
+ Recently
5
+ %ul#recent_listening
6
+ = @recent
7
+
8
+ %h2
9
+ All time
10
+ %ul#top_listening
11
+ = @top
@@ -64,7 +64,7 @@ header#site-header {
64
64
  }
65
65
 
66
66
  #access {
67
- @include skip-link();
67
+ display: none;
68
68
  }
69
69
 
70
70
  section#main {
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: 9
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 15
10
- version: 0.2.15
9
+ - 16
10
+ version: 0.2.16
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-08-31 00:00:00 +01:00
18
+ date: 2010-09-02 00:00:00 +01:00
19
19
  default_executable: caboodle
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -301,6 +301,8 @@ files:
301
301
  - lib/caboodle/kits/identity/identity.rb
302
302
  - lib/caboodle/kits/identity/views/me.haml
303
303
  - lib/caboodle/kits/jquery/jquery.rb
304
+ - lib/caboodle/kits/lastfm/lastfm.rb
305
+ - lib/caboodle/kits/lastfm/views/listening.haml
304
306
  - lib/caboodle/kits/lazyload/lazyload.rb
305
307
  - lib/caboodle/kits/lazyload/public/jquery.lazyload.mini.js
306
308
  - lib/caboodle/kits/lazyload/public/lazyload.js