brainz_releases 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/brainz_releases/search.rb +2 -2
- data/lib/brainz_releases/version.rb +1 -1
- data/spec/search_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b74942b9401e588a5c73f1e38c8936bb103b946
|
4
|
+
data.tar.gz: 099a403c05035a14242521d35a1cb7132b46796d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a56c15afe0f2ba6c025b17425a17979261f2d353bc046a31c8721c4abb3aaf7c8072a0122b5eee946596d43524aef11ba6b1cd03a8971535665733f8862c9b68
|
7
|
+
data.tar.gz: 3e039af79014cbe53b407b93582ab58aca314d948e50dbbcdbb7cac629c8ab8ca0552e479606467e84049b3fde5bbec839c037ae5f7ba3230856ded4019ca812
|
@@ -31,11 +31,11 @@ module BrainzReleases
|
|
31
31
|
@end_date ||= Date.today >> 1
|
32
32
|
end
|
33
33
|
|
34
|
-
#http://musicbrainz.org/ws/2/release/?
|
34
|
+
#http://musicbrainz.org/ws/2/release/?query=arid:2ff0dfc6-0542-4bbc-a44a-60605c074ba6
|
35
35
|
|
36
36
|
# Musicbrainz uri to request releases
|
37
37
|
def uri
|
38
|
-
URI.parse("http://musicbrainz.org/ws/2/release/?
|
38
|
+
URI.parse("http://musicbrainz.org/ws/2/release/?query=#{query}")
|
39
39
|
end
|
40
40
|
|
41
41
|
def releases_xml
|
data/spec/search_spec.rb
CHANGED
@@ -86,7 +86,7 @@ describe BrainzReleases::Search do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
it "should use the mbid" do
|
89
|
-
@brainz_search.uri.should == URI.parse("http://musicbrainz.org/ws/2/release/?
|
89
|
+
@brainz_search.uri.should == URI.parse("http://musicbrainz.org/ws/2/release/?query=arid%3A123+AND+date%3A%5B2011-01-01+TO+2011-05-05%5D")
|
90
90
|
end
|
91
91
|
|
92
92
|
end
|
@@ -113,7 +113,7 @@ describe BrainzReleases::Search do
|
|
113
113
|
@brainz_search.stub(:uri){URI.parse("http://example.com")}
|
114
114
|
end
|
115
115
|
it "should call the artists url with Nokogiri parse to get the xml" do
|
116
|
-
Nokogiri::XML::Document.should_receive(:parse).with(Net::HTTP.get(URI.parse("http://example.com")), nil, nil,
|
116
|
+
Nokogiri::XML::Document.should_receive(:parse).with(Net::HTTP.get(URI.parse("http://example.com")), nil, nil, 2049)
|
117
117
|
@brainz_search.releases_xml
|
118
118
|
end
|
119
119
|
it "should not raise the error message as an exception" do
|