spot 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,4 +2,6 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
- spec/run_spec.rb
5
+ spec/run_spec.rb
6
+ .DS_Store
7
+ .rake_tasks~
@@ -125,11 +125,11 @@ class Spot
125
125
 
126
126
  def type_of(r)
127
127
  if @type == :songs
128
- return r.name.to_s, r.artist.name.to_s
128
+ return r.name.to_s.downcase, r.artist.name.to_s.downcase
129
129
  elsif @type == :artists
130
- return r.song.title.to_s, r.name.to_s
130
+ return r.song.title.to_s.downcase, r.name.to_s.downcase
131
131
  else
132
- return "", r.artist.to_s
132
+ return "", r.artist.to_s.downcase
133
133
  end
134
134
  end
135
135
 
@@ -5,7 +5,7 @@ describe SpotContainer::Song do
5
5
  before(:each) do
6
6
  @song = SpotContainer::Song.new(JSON.load(File.read("spec/fixtures/track.json"))["tracks"].first)
7
7
  end
8
-
8
+
9
9
  context "the available? method" do
10
10
  it "should contain the AM territory" do
11
11
  @song.should be_available("AM")
@@ -55,4 +55,14 @@ describe SpotContainer::Song do
55
55
  it "should have a working to string method" do
56
56
  @song.to_s.should eq("#{@song.title} - #{@song.artist.name}")
57
57
  end
58
+
59
+ context "user requst" do
60
+ before(:all) do
61
+ WebMock.allow_net_connect!
62
+ end
63
+
64
+ it "should match user request" do
65
+ Spot.territory("SE").prime.strip.find_song("Call My Name - Tove Styrke").result.to_s.should eq("Call My Name - Tove Styrke")
66
+ end
67
+ end
58
68
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "spot"
6
- s.version = "0.1.3"
6
+ s.version = "0.1.4"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Linus Oleander"]
9
9
  s.email = ["linus@oleander.nu"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: spot
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Linus Oleander
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-06 00:00:00 +02:00
14
- default_executable:
13
+ date: 2011-09-05 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: json_pure
@@ -100,6 +99,7 @@ extensions: []
100
99
  extra_rdoc_files: []
101
100
 
102
101
  files:
102
+ - .DS_Store
103
103
  - .gitignore
104
104
  - .rspec
105
105
  - Gemfile
@@ -122,7 +122,6 @@ files:
122
122
  - spec/spec_helper.rb
123
123
  - spec/spotify_spec.rb
124
124
  - spot.gemspec
125
- has_rdoc: true
126
125
  homepage: https://github.com/oleander/Spot
127
126
  licenses: []
128
127
 
@@ -146,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
145
  requirements: []
147
146
 
148
147
  rubyforge_project: spot
149
- rubygems_version: 1.6.2
148
+ rubygems_version: 1.8.8
150
149
  signing_key:
151
150
  specification_version: 3
152
151
  summary: A Ruby implementation of the Spotify Meta API