scrapescrobbler 0.1 → 0.1.1

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/README.md CHANGED
@@ -18,25 +18,17 @@ RubyGems is the preferred method of installation:
18
18
 
19
19
  $ [sudo] gem install scrapescrobbler
20
20
 
21
- For the moment, this requires a forked version of the lastfm gem. Install it
22
- like so:
23
-
24
- $ git clone https://github.com/peplin/ruby-lastfm.git ruby-lastfm
25
- $ cd ruby-lastfm
26
- $ git checkout scrobblingv2
27
- $ rake install
28
-
29
21
  ## Running
30
22
 
31
23
  Whenever you're listening to the radio, run scrapescrobbler with the name of the
32
24
  station:
33
25
 
34
- $ ss listen wyep
26
+ $ scrapes listen wyep
35
27
 
36
28
  The station must be in the list of supported stations. To see a list of
37
29
  available stations, try this:
38
30
 
39
- $ ss stations
31
+ $ scrapes stations
40
32
 
41
33
  ## Configuration & Authentication
42
34
 
@@ -46,7 +38,7 @@ authenticated and spit out a URL - visit that and give scrapescrobbler the
46
38
  go-ahead, and things should work fine. If you need to re-authenticate for any
47
39
  reason, just run:
48
40
 
49
- $ ss authenticate
41
+ $ scrapes authenticate
50
42
 
51
43
  ## Contributing
52
44
 
@@ -26,12 +26,9 @@ module Scrapescrobbler
26
26
  end
27
27
 
28
28
  def scrobble song
29
- puts "Scrobbling #{song} @ #{Time.now}"
30
- if song.album then
31
- @lastfm.track.scrobble song.artist, song.title, song.album, Time.now.utc.to_i
32
- else
33
- @lastfm.track.scrobble song.artist, song.title, Time.now.utc.to_i
34
- end
29
+ puts "Scrobbling #{song} @ #{song.time || Time.now}"
30
+ @lastfm.track.scrobble(song.artist, song.title, song.album,
31
+ song.time.utc.to_i || Time.now.utc.to_i)
35
32
  end
36
33
 
37
34
  def now_playing
@@ -1,5 +1,6 @@
1
1
  require 'hpricot'
2
2
  require 'open-uri'
3
+ require 'scrapescrobbler/stations/base'
3
4
 
4
5
  module Scrapescrobbler
5
6
  module Stations
@@ -1,3 +1,3 @@
1
1
  module Scrapescrobbler
2
- VERSION = "0.1" unless defined?(::Scrapescrobbler::VERSION)
2
+ VERSION = "0.1.1" unless defined?(::Scrapescrobbler::VERSION)
3
3
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.add_development_dependency "rspec"
20
20
  s.add_development_dependency "mocha"
21
21
  s.add_dependency "hpricot"
22
- s.add_dependency "lastfm"
22
+ s.add_dependency "lastfm", ">= 0.2.0"
23
23
  s.add_dependency "dm-core"
24
24
  s.add_dependency "dm-sqlite-adapter"
25
25
  s.add_dependency "dm-migrations"
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- version: "0.1"
8
+ - 1
9
+ version: 0.1.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Christopher Peplin
@@ -13,7 +14,7 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-12-06 00:00:00 -05:00
17
+ date: 2010-12-12 00:00:00 -05:00
17
18
  default_executable: scrapescrobble
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
@@ -65,7 +66,9 @@ dependencies:
65
66
  - !ruby/object:Gem::Version
66
67
  segments:
67
68
  - 0
68
- version: "0"
69
+ - 2
70
+ - 0
71
+ version: 0.2.0
69
72
  type: :runtime
70
73
  version_requirements: *id004
71
74
  - !ruby/object:Gem::Dependency