beatport 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/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +44 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +23 -0
- data/Rakefile +55 -0
- data/VERSION +1 -0
- data/beatport.gemspec +129 -0
- data/lib/beatport.rb +15 -0
- data/lib/beatport/catalog.rb +93 -0
- data/lib/beatport/catalog/account_type.rb +11 -0
- data/lib/beatport/catalog/artist.rb +20 -0
- data/lib/beatport/catalog/audio_format.rb +10 -0
- data/lib/beatport/catalog/audio_format_fee.rb +8 -0
- data/lib/beatport/catalog/autocomplete.rb +11 -0
- data/lib/beatport/catalog/chart.rb +27 -0
- data/lib/beatport/catalog/chart_overview.rb +12 -0
- data/lib/beatport/catalog/country.rb +16 -0
- data/lib/beatport/catalog/currency.rb +9 -0
- data/lib/beatport/catalog/feature.rb +16 -0
- data/lib/beatport/catalog/genre.rb +32 -0
- data/lib/beatport/catalog/home.rb +13 -0
- data/lib/beatport/catalog/image.rb +7 -0
- data/lib/beatport/catalog/images.rb +13 -0
- data/lib/beatport/catalog/item_type.rb +9 -0
- data/lib/beatport/catalog/key.rb +7 -0
- data/lib/beatport/catalog/keys.rb +7 -0
- data/lib/beatport/catalog/label.rb +29 -0
- data/lib/beatport/catalog/list.rb +7 -0
- data/lib/beatport/catalog/mixed.rb +9 -0
- data/lib/beatport/catalog/recommendations.rb +7 -0
- data/lib/beatport/catalog/release.rb +32 -0
- data/lib/beatport/catalog/search.rb +11 -0
- data/lib/beatport/catalog/slide.rb +17 -0
- data/lib/beatport/catalog/slideshow.rb +30 -0
- data/lib/beatport/catalog/source_type.rb +9 -0
- data/lib/beatport/catalog/state.rb +7 -0
- data/lib/beatport/catalog/track.rb +43 -0
- data/lib/beatport/client.rb +22 -0
- data/lib/beatport/collection.rb +37 -0
- data/lib/beatport/inflector.rb +44 -0
- data/lib/beatport/item.rb +81 -0
- data/lib/beatport/parser.rb +8 -0
- data/lib/beatport/price.rb +8 -0
- data/lib/beatport/query_builder.rb +74 -0
- data/spec/catalog/account_type_spec.rb +16 -0
- data/spec/catalog/artist_spec.rb +83 -0
- data/spec/catalog/audio_format_spec.rb +14 -0
- data/spec/catalog/autocomplete_spec.rb +25 -0
- data/spec/catalog/chart_overview_spec.rb +15 -0
- data/spec/catalog/chart_spec.rb +96 -0
- data/spec/catalog/country_spec.rb +22 -0
- data/spec/catalog/currency_spec.rb +13 -0
- data/spec/catalog/genre_spec.rb +118 -0
- data/spec/catalog/home_spec.rb +16 -0
- data/spec/catalog/item_type_spec.rb +11 -0
- data/spec/catalog/label_spec.rb +103 -0
- data/spec/catalog/mixed_spec.rb +26 -0
- data/spec/catalog/release_spec.rb +138 -0
- data/spec/catalog/search_spec.rb +24 -0
- data/spec/catalog/slide_spec.rb +45 -0
- data/spec/catalog/source_type_spec.rb +11 -0
- data/spec/catalog/track_spec.rb +173 -0
- data/spec/collection_spec.rb +11 -0
- data/spec/inflector_spec.rb +34 -0
- data/spec/item_spec.rb +11 -0
- data/spec/query_builder_spec.rb +100 -0
- data/spec/spec_helper.rb +19 -0
- metadata +251 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Beatport::Catalog
|
|
4
|
+
describe Search do
|
|
5
|
+
describe '.get' do
|
|
6
|
+
it "should perform a simple search with just a string" do
|
|
7
|
+
results = Search.query('believe 2004')
|
|
8
|
+
results.length.should be >= 1
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it "should not find a release by catalogue number" do
|
|
12
|
+
results = Search.query("ANJCDCO011D")
|
|
13
|
+
results.length.should be 0
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "should find all content for Anjunadeep that has something to do with Trance" do
|
|
17
|
+
results = Search.query('anjunadeep', :facets => { :genre_name => 'Trance' })
|
|
18
|
+
results.length.should be > 1
|
|
19
|
+
|
|
20
|
+
results.grouped.keys.should == ["Track", "Chart", "Label", "Release"]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Beatport::Catalog
|
|
4
|
+
describe Slide do
|
|
5
|
+
describe '.header' do
|
|
6
|
+
it "should get the header slides for the home page" do
|
|
7
|
+
slides = Slide.header
|
|
8
|
+
slides.length.should be >= 1
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it "should get the headers slides for the trance page" do
|
|
12
|
+
slides = Slide.header
|
|
13
|
+
slides.length.should be >= 1
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe '.feature' do
|
|
18
|
+
it "should get the feature slides for the home page" do
|
|
19
|
+
slides = Slide.feature
|
|
20
|
+
slides.length.should be > 1
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "should get the feature slides for the trance page" do
|
|
24
|
+
slides = Slide.feature
|
|
25
|
+
slides.length.should be > 1
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe '.small' do
|
|
30
|
+
it "should get the small slides for the home page" do
|
|
31
|
+
slides = Slide.small
|
|
32
|
+
slides.length.should be > 1
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it "should get the small slides for the trance page" do
|
|
36
|
+
slides = Slide.small
|
|
37
|
+
slides.length.should be > 1
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Beatport::Catalog
|
|
4
|
+
describe Track do
|
|
5
|
+
describe 'lazy loading' do
|
|
6
|
+
it "should lazy load artists" do
|
|
7
|
+
pending
|
|
8
|
+
track = Track.all(:per_page => 1, :page => 1).first
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
describe 'structure' do
|
|
13
|
+
before(:all) { @track = Track.find(1217790) }
|
|
14
|
+
|
|
15
|
+
it { @track.id.should == 1217790 }
|
|
16
|
+
it { @track.type.should == 'track' }
|
|
17
|
+
it { @track.name.should == "Tonight (IMS Anthem 2009)" }
|
|
18
|
+
it { @track.mix_name.should == "Above & Beyond Remix" }
|
|
19
|
+
it { @track.slug.should == "tonight-ims-anthem-2009-above-and-beyond-remix" }
|
|
20
|
+
it { @track.title.should == "Tonight (IMS Anthem 2009) (Above & Beyond Remix)"}
|
|
21
|
+
it { @track.release_date.should == Date.new(2010,05,17) }
|
|
22
|
+
it { @track.publish_date.should == Date.new(2010,05,17) }
|
|
23
|
+
it { @track.sample_url.should == 'http://geo-samples.beatport.com/items/volumes/volume7/items/1000000/200000/10000/7000/700/90/1217790.LOFI.mp3' }
|
|
24
|
+
it { @track.rtmp_stream_url.should == 'rtmp://geo-rtmp-samples.beatport.com/beatport/_definst_/mp3:lofi_samples/items/volumes/volume7/items/1000000/200000/10000/7000/700/90/1217790.LOFI'}
|
|
25
|
+
it { @track.exclusive.should be_false }
|
|
26
|
+
it { @track.price.to_s.should == "1.49" }
|
|
27
|
+
it { @track.audio_format_fee.wav.to_s.should == "1.00" }
|
|
28
|
+
it { @track.audio_format_fee.aiff.to_s.should == "1.00" }
|
|
29
|
+
# for some reason this doesn't always return the same result
|
|
30
|
+
# it { @track.current_status.should == nil "General Content" }
|
|
31
|
+
it { @track.length.should == "07:53" }
|
|
32
|
+
it { @track.bpm.should == 128 }
|
|
33
|
+
it { @track.key.standard.letter.should == "D" }
|
|
34
|
+
it { @track.sale_type.should == "purchase" }
|
|
35
|
+
it { @track.artists.map(&:name).should == ["Above & Beyond", "Dirty Vegas"] }
|
|
36
|
+
it { @track.genres.map(&:name).should == ["Trance"]}
|
|
37
|
+
it { @track.sub_genres.map(&:name).should == ['Progressive']}
|
|
38
|
+
it { @track.charts.should == [] }
|
|
39
|
+
it { @track.release.id.should == 245137 }
|
|
40
|
+
it { @track.label.id.should == 495}
|
|
41
|
+
it { @track.images.small.url.should == 'http://geo-media.beatport.com/items/imageCatalog/0/600000/70000/4000/700/50/674759.jpg' }
|
|
42
|
+
it { @track.images.medium.url.should == 'http://geo-media.beatport.com/items/imageCatalog/0/600000/70000/4000/700/60/674760.jpg' }
|
|
43
|
+
it { @track.images.large.url.should == 'http://geo-media.beatport.com/items/imageCatalog/0/600000/70000/4000/700/60/674761.jpg' }
|
|
44
|
+
it { @track.images.waveform.url.should == 'http://geo-media.beatport.com/items/imageCatalog/1000000/200000/60000/8000/200/20/1268229.png' }
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe '.find' do
|
|
48
|
+
it "should find the track with the id 1217790" do
|
|
49
|
+
track = Track.find(1217790)
|
|
50
|
+
track.id.should == 1217790
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe '.all' do
|
|
55
|
+
it "should get arbitrary" do
|
|
56
|
+
Track.all.length.should be > 1
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it "should get the first page with 5 tracks per page" do
|
|
60
|
+
tracks = Track.all(:per_page => 5, :page => 1)
|
|
61
|
+
tracks.length.should == 5
|
|
62
|
+
tracks.page.should == 1
|
|
63
|
+
tracks.per_page.should == 5
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it "should get the first page with 5 tracks per page, sorted by publish date and release if, for the House genre" do
|
|
67
|
+
tracks = Track.all(:sort_by=> ['publishDate asc', 'releaseId asc'], :genre_id=> 5, :per_page=>5, :page=>1)
|
|
68
|
+
tracks.length.should == 5
|
|
69
|
+
|
|
70
|
+
old_id = tracks.first.id
|
|
71
|
+
old_date = tracks.first.publish_date
|
|
72
|
+
|
|
73
|
+
tracks.each do |track|
|
|
74
|
+
track.genres.first.id.should == 5
|
|
75
|
+
track.id.should be >= old_id
|
|
76
|
+
track.publish_date.should be >= old_date
|
|
77
|
+
|
|
78
|
+
old_id = track.id
|
|
79
|
+
old_date = track.publish_date
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
it "should get arbitrary tracks with filter metadata for all genre names and artist names" do
|
|
84
|
+
tracks = Track.all :return_facets => ['genre_name', 'performer_name']
|
|
85
|
+
|
|
86
|
+
tracks.facets['fields']['performer_name'].count.should be > 1
|
|
87
|
+
tracks.facets['fields']['genre_name'].count.should be > 1
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
it "should get all trance tracks for above & beyond" do
|
|
91
|
+
tracks = Track.all :facets => {:genre_name => 'Trance', :performer_name => 'Above & Beyond'}
|
|
92
|
+
|
|
93
|
+
tracks.each do |track|
|
|
94
|
+
artists = track['artists'].map { |a| a['name'] }
|
|
95
|
+
artists.should include("Above & Beyond")
|
|
96
|
+
|
|
97
|
+
genres = track['genres'].map { |a| a['name'] }
|
|
98
|
+
genres.should include('Trance')
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
describe '.most_popular' do
|
|
104
|
+
it "should get the top download for the home page" do
|
|
105
|
+
tracks = Track.most_popular
|
|
106
|
+
tracks.count.should == 100
|
|
107
|
+
tracks.length.should == 10
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
it "should get the top classics for the home page" do
|
|
111
|
+
tracks = Track.most_popular :status => 5
|
|
112
|
+
tracks.count.should == 100
|
|
113
|
+
tracks.length.should == 10
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it "should not return the same results for most_popular and classics" do
|
|
117
|
+
popular = Track.most_popular
|
|
118
|
+
classics = Track.most_popular :status => 5
|
|
119
|
+
|
|
120
|
+
popular.map(&:id).should_not == classics.map(&:id)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
describe '.most_popular_for_genre' do
|
|
125
|
+
it "should get the top download for the trance page" do
|
|
126
|
+
tracks = Track.most_popular_for_genre 7
|
|
127
|
+
|
|
128
|
+
tracks.count.should == 100
|
|
129
|
+
tracks.length.should == 10
|
|
130
|
+
tracks.each do |track|
|
|
131
|
+
track.genres.map(&:id).should include(7)
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
it "should get the top classics for the trance page" do
|
|
136
|
+
tracks = Track.most_popular_for_genre 7, :status => 5
|
|
137
|
+
|
|
138
|
+
tracks.each do |track|
|
|
139
|
+
track.genres.map(&:id).should include(7)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
it "should not return the same results for most_popular and classics" do
|
|
144
|
+
popular = Track.most_popular_for_genre 7
|
|
145
|
+
classics = Track.most_popular_for_genre 7, :status => 5
|
|
146
|
+
|
|
147
|
+
popular.map(&:id).should_not == classics.map(&:id)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
describe '.most_popular_for_artist' do
|
|
153
|
+
it "should get the top downloads for Above & Beyond" do
|
|
154
|
+
tracks = Track.most_popular_for_artist 7181
|
|
155
|
+
tracks.length.should be > 1
|
|
156
|
+
tracks.each do |track|
|
|
157
|
+
track.artists.map(&:id).should include(7181)
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
describe '.most_popular_for_label' do
|
|
163
|
+
it "should get the top downloads for Anjunabeats" do
|
|
164
|
+
tracks = Track.most_popular_for_label 804
|
|
165
|
+
tracks.length.should be > 1
|
|
166
|
+
tracks.each do |track|
|
|
167
|
+
track.label.id.should == 804
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Beatport
|
|
4
|
+
describe Inflector do
|
|
5
|
+
describe '.camelize' do
|
|
6
|
+
it "should camelize an underscored word" do
|
|
7
|
+
Inflector.camelize('foo_bar').should == "FooBar"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it "should camelize a namespaced word" do
|
|
11
|
+
Inflector.camelize('foo_bar/baz').should == "FooBar::Baz"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe '.process_keys' do
|
|
16
|
+
it "should transform all keys to camel case" do
|
|
17
|
+
h1 = {:key_one => 'a', :key_two => { :key_three => 'b'}}
|
|
18
|
+
h2 = {"KeyOne" => "a", "KeyTwo" => { "KeyThree" => "b"}}
|
|
19
|
+
|
|
20
|
+
Inflector.process_keys(h1) { |k| Inflector.camelize(k.to_s) }.should == h2
|
|
21
|
+
Inflector.process_keys(h2) { |k| Inflector.underscore(k.to_s).to_sym }.should == h1
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "should transform all keys in arrays to camel case" do
|
|
25
|
+
h1 = {:key_one => 'a', :array => [{:key_two => 'b'}, {:key_three => 'c'}]}
|
|
26
|
+
h2 = {"KeyOne" => "a", 'Array' => [{"KeyTwo" => 'b'}, {"KeyThree" => "c"}]}
|
|
27
|
+
|
|
28
|
+
Inflector.process_keys(h1) { |k| Inflector.camelize(k.to_s) }.should == h2
|
|
29
|
+
Inflector.process_keys(h2) { |k| Inflector.underscore(k.to_s).to_sym }.should == h1
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/spec/item_spec.rb
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Beatport
|
|
4
|
+
describe QueryBuilder do
|
|
5
|
+
describe '#process_sort_by' do
|
|
6
|
+
it "should handle a string" do
|
|
7
|
+
input = 'publish_date desc, chart_id desc'
|
|
8
|
+
output = 'publishDate desc,chartId desc'
|
|
9
|
+
|
|
10
|
+
QueryBuilder.new.process_sort_by(input).should == output
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "should handle an array" do
|
|
14
|
+
input = ['publish_date desc', 'chart_id desc']
|
|
15
|
+
output = 'publishDate desc,chartId desc'
|
|
16
|
+
|
|
17
|
+
QueryBuilder.new.process_sort_by(input).should == output
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should handle a hash" do
|
|
21
|
+
input = {'publish_date' => 'desc', 'chart_id' => 'desc'}
|
|
22
|
+
output = 'publishDate desc,chartId desc'
|
|
23
|
+
|
|
24
|
+
QueryBuilder.new.process_sort_by(input).should == output
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe '#process_facets' do
|
|
29
|
+
it "should handle a string" do
|
|
30
|
+
input = "genre_name:Trance, genre_name:Progressive House"
|
|
31
|
+
output = "genreName:Trance,genreName:Progressive House"
|
|
32
|
+
|
|
33
|
+
QueryBuilder.new.process_facets(input).should == output
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it "should handle an array" do
|
|
37
|
+
input = ["genre_name:Trance", "genre_name:Progressive House"]
|
|
38
|
+
output = "genreName:Trance,genreName:Progressive House"
|
|
39
|
+
|
|
40
|
+
QueryBuilder.new.process_facets(input).should == output
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it "should handle a hash with a string value" do
|
|
44
|
+
input = {"genre_name" => "Trance"}
|
|
45
|
+
output = "genreName:Trance"
|
|
46
|
+
|
|
47
|
+
QueryBuilder.new.process_facets(input).should == output
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
it "should handle a hash with an array value" do
|
|
52
|
+
input = {"genre_name" => ["Trance", "Progressive House"]}
|
|
53
|
+
output = "genreName:Trance,genreName:Progressive House"
|
|
54
|
+
|
|
55
|
+
QueryBuilder.new.process_facets(input).should == output
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe '#process_return_facets' do
|
|
60
|
+
it "should handle a string" do
|
|
61
|
+
input = "genre_name, performer_name"
|
|
62
|
+
output = "genreName,performerName"
|
|
63
|
+
|
|
64
|
+
QueryBuilder.new.process_return_facets(input).should == output
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
describe ".process" do
|
|
69
|
+
it "should handle sort by" do
|
|
70
|
+
h = {:sort_by => ['publishDate asc', 'chartId asc']}
|
|
71
|
+
|
|
72
|
+
QueryBuilder.process(h).should == {'sortBy'=>"publishDate asc,chartId asc"}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
it "should handle sort by with hash syntax" do
|
|
76
|
+
h = {:sort_by => {'publish_date'=>'asc', 'chart_id'=>'asc'}}
|
|
77
|
+
|
|
78
|
+
QueryBuilder.process(h).should == {'sortBy'=>"publishDate asc,chartId asc"}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
it "should handle return facets" do
|
|
82
|
+
h = {:return_facets => ['genre_name', 'performer_name']}
|
|
83
|
+
|
|
84
|
+
QueryBuilder.process(h).should == {'returnFacets'=>"genreName,performerName"}
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
it "should handle return facets" do
|
|
88
|
+
h = {:return_facets => ['genre_name', 'performer_name']}
|
|
89
|
+
|
|
90
|
+
QueryBuilder.process(h).should == {'returnFacets'=>"genreName,performerName"}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it "should handle facets" do
|
|
94
|
+
h = {:facets => {:genre_name => ['Trance', 'Progessive House']}}
|
|
95
|
+
|
|
96
|
+
QueryBuilder.process(h).should == {'facets'=>"genreName:Trance,genreName:Progessive House"}
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'bundler'
|
|
3
|
+
begin
|
|
4
|
+
Bundler.setup(:default, :development)
|
|
5
|
+
rescue Bundler::BundlerError => e
|
|
6
|
+
$stderr.puts e.message
|
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
|
8
|
+
exit e.status_code
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
12
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
13
|
+
require 'beatport'
|
|
14
|
+
require 'pp'
|
|
15
|
+
require 'log_buddy'
|
|
16
|
+
|
|
17
|
+
RSpec.configure do |config|
|
|
18
|
+
# some (optional) config here
|
|
19
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: beatport
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 25
|
|
5
|
+
prerelease:
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 1
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.1.1
|
|
11
|
+
platform: ruby
|
|
12
|
+
authors:
|
|
13
|
+
- Mateo Murphy
|
|
14
|
+
autorequire:
|
|
15
|
+
bindir: bin
|
|
16
|
+
cert_chain: []
|
|
17
|
+
|
|
18
|
+
date: 2011-12-18 00:00:00 -05:00
|
|
19
|
+
default_executable:
|
|
20
|
+
dependencies:
|
|
21
|
+
- !ruby/object:Gem::Dependency
|
|
22
|
+
name: httparty
|
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
|
24
|
+
none: false
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
hash: 3
|
|
29
|
+
segments:
|
|
30
|
+
- 0
|
|
31
|
+
version: "0"
|
|
32
|
+
prerelease: false
|
|
33
|
+
type: :runtime
|
|
34
|
+
requirement: *id001
|
|
35
|
+
- !ruby/object:Gem::Dependency
|
|
36
|
+
name: money
|
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
|
38
|
+
none: false
|
|
39
|
+
requirements:
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
hash: 3
|
|
43
|
+
segments:
|
|
44
|
+
- 0
|
|
45
|
+
version: "0"
|
|
46
|
+
prerelease: false
|
|
47
|
+
type: :runtime
|
|
48
|
+
requirement: *id002
|
|
49
|
+
- !ruby/object:Gem::Dependency
|
|
50
|
+
name: rspec
|
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
|
52
|
+
none: false
|
|
53
|
+
requirements:
|
|
54
|
+
- - ">="
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
hash: 3
|
|
57
|
+
segments:
|
|
58
|
+
- 0
|
|
59
|
+
version: "0"
|
|
60
|
+
prerelease: false
|
|
61
|
+
type: :development
|
|
62
|
+
requirement: *id003
|
|
63
|
+
- !ruby/object:Gem::Dependency
|
|
64
|
+
name: bundler
|
|
65
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
|
66
|
+
none: false
|
|
67
|
+
requirements:
|
|
68
|
+
- - ~>
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
hash: 23
|
|
71
|
+
segments:
|
|
72
|
+
- 1
|
|
73
|
+
- 0
|
|
74
|
+
- 0
|
|
75
|
+
version: 1.0.0
|
|
76
|
+
prerelease: false
|
|
77
|
+
type: :development
|
|
78
|
+
requirement: *id004
|
|
79
|
+
- !ruby/object:Gem::Dependency
|
|
80
|
+
name: jeweler
|
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
|
82
|
+
none: false
|
|
83
|
+
requirements:
|
|
84
|
+
- - ~>
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
hash: 9
|
|
87
|
+
segments:
|
|
88
|
+
- 1
|
|
89
|
+
- 6
|
|
90
|
+
- 3
|
|
91
|
+
version: 1.6.3
|
|
92
|
+
prerelease: false
|
|
93
|
+
type: :development
|
|
94
|
+
requirement: *id005
|
|
95
|
+
- !ruby/object:Gem::Dependency
|
|
96
|
+
name: rcov
|
|
97
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
|
98
|
+
none: false
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
hash: 3
|
|
103
|
+
segments:
|
|
104
|
+
- 0
|
|
105
|
+
version: "0"
|
|
106
|
+
prerelease: false
|
|
107
|
+
type: :development
|
|
108
|
+
requirement: *id006
|
|
109
|
+
- !ruby/object:Gem::Dependency
|
|
110
|
+
name: yard
|
|
111
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
|
112
|
+
none: false
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
hash: 3
|
|
117
|
+
segments:
|
|
118
|
+
- 0
|
|
119
|
+
version: "0"
|
|
120
|
+
prerelease: false
|
|
121
|
+
type: :development
|
|
122
|
+
requirement: *id007
|
|
123
|
+
- !ruby/object:Gem::Dependency
|
|
124
|
+
name: log_buddy
|
|
125
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
|
126
|
+
none: false
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
hash: 3
|
|
131
|
+
segments:
|
|
132
|
+
- 0
|
|
133
|
+
version: "0"
|
|
134
|
+
prerelease: false
|
|
135
|
+
type: :development
|
|
136
|
+
requirement: *id008
|
|
137
|
+
description: A ruby gem for accessing the beatport api
|
|
138
|
+
email: mateo.murphy@gmail.com
|
|
139
|
+
executables: []
|
|
140
|
+
|
|
141
|
+
extensions: []
|
|
142
|
+
|
|
143
|
+
extra_rdoc_files:
|
|
144
|
+
- LICENSE.txt
|
|
145
|
+
- README.rdoc
|
|
146
|
+
files:
|
|
147
|
+
- .document
|
|
148
|
+
- .rspec
|
|
149
|
+
- Gemfile
|
|
150
|
+
- Gemfile.lock
|
|
151
|
+
- LICENSE.txt
|
|
152
|
+
- README.rdoc
|
|
153
|
+
- Rakefile
|
|
154
|
+
- VERSION
|
|
155
|
+
- beatport.gemspec
|
|
156
|
+
- lib/beatport.rb
|
|
157
|
+
- lib/beatport/catalog.rb
|
|
158
|
+
- lib/beatport/catalog/account_type.rb
|
|
159
|
+
- lib/beatport/catalog/artist.rb
|
|
160
|
+
- lib/beatport/catalog/audio_format.rb
|
|
161
|
+
- lib/beatport/catalog/audio_format_fee.rb
|
|
162
|
+
- lib/beatport/catalog/autocomplete.rb
|
|
163
|
+
- lib/beatport/catalog/chart.rb
|
|
164
|
+
- lib/beatport/catalog/chart_overview.rb
|
|
165
|
+
- lib/beatport/catalog/country.rb
|
|
166
|
+
- lib/beatport/catalog/currency.rb
|
|
167
|
+
- lib/beatport/catalog/feature.rb
|
|
168
|
+
- lib/beatport/catalog/genre.rb
|
|
169
|
+
- lib/beatport/catalog/home.rb
|
|
170
|
+
- lib/beatport/catalog/image.rb
|
|
171
|
+
- lib/beatport/catalog/images.rb
|
|
172
|
+
- lib/beatport/catalog/item_type.rb
|
|
173
|
+
- lib/beatport/catalog/key.rb
|
|
174
|
+
- lib/beatport/catalog/keys.rb
|
|
175
|
+
- lib/beatport/catalog/label.rb
|
|
176
|
+
- lib/beatport/catalog/list.rb
|
|
177
|
+
- lib/beatport/catalog/mixed.rb
|
|
178
|
+
- lib/beatport/catalog/recommendations.rb
|
|
179
|
+
- lib/beatport/catalog/release.rb
|
|
180
|
+
- lib/beatport/catalog/search.rb
|
|
181
|
+
- lib/beatport/catalog/slide.rb
|
|
182
|
+
- lib/beatport/catalog/slideshow.rb
|
|
183
|
+
- lib/beatport/catalog/source_type.rb
|
|
184
|
+
- lib/beatport/catalog/state.rb
|
|
185
|
+
- lib/beatport/catalog/track.rb
|
|
186
|
+
- lib/beatport/client.rb
|
|
187
|
+
- lib/beatport/collection.rb
|
|
188
|
+
- lib/beatport/inflector.rb
|
|
189
|
+
- lib/beatport/item.rb
|
|
190
|
+
- lib/beatport/parser.rb
|
|
191
|
+
- lib/beatport/price.rb
|
|
192
|
+
- lib/beatport/query_builder.rb
|
|
193
|
+
- spec/catalog/account_type_spec.rb
|
|
194
|
+
- spec/catalog/artist_spec.rb
|
|
195
|
+
- spec/catalog/audio_format_spec.rb
|
|
196
|
+
- spec/catalog/autocomplete_spec.rb
|
|
197
|
+
- spec/catalog/chart_overview_spec.rb
|
|
198
|
+
- spec/catalog/chart_spec.rb
|
|
199
|
+
- spec/catalog/country_spec.rb
|
|
200
|
+
- spec/catalog/currency_spec.rb
|
|
201
|
+
- spec/catalog/genre_spec.rb
|
|
202
|
+
- spec/catalog/home_spec.rb
|
|
203
|
+
- spec/catalog/item_type_spec.rb
|
|
204
|
+
- spec/catalog/label_spec.rb
|
|
205
|
+
- spec/catalog/mixed_spec.rb
|
|
206
|
+
- spec/catalog/release_spec.rb
|
|
207
|
+
- spec/catalog/search_spec.rb
|
|
208
|
+
- spec/catalog/slide_spec.rb
|
|
209
|
+
- spec/catalog/source_type_spec.rb
|
|
210
|
+
- spec/catalog/track_spec.rb
|
|
211
|
+
- spec/collection_spec.rb
|
|
212
|
+
- spec/inflector_spec.rb
|
|
213
|
+
- spec/item_spec.rb
|
|
214
|
+
- spec/query_builder_spec.rb
|
|
215
|
+
- spec/spec_helper.rb
|
|
216
|
+
has_rdoc: true
|
|
217
|
+
homepage: http://github.com/mateomurphy/beatport
|
|
218
|
+
licenses:
|
|
219
|
+
- MIT
|
|
220
|
+
post_install_message:
|
|
221
|
+
rdoc_options: []
|
|
222
|
+
|
|
223
|
+
require_paths:
|
|
224
|
+
- lib
|
|
225
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
226
|
+
none: false
|
|
227
|
+
requirements:
|
|
228
|
+
- - ">="
|
|
229
|
+
- !ruby/object:Gem::Version
|
|
230
|
+
hash: 3
|
|
231
|
+
segments:
|
|
232
|
+
- 0
|
|
233
|
+
version: "0"
|
|
234
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
|
+
none: false
|
|
236
|
+
requirements:
|
|
237
|
+
- - ">="
|
|
238
|
+
- !ruby/object:Gem::Version
|
|
239
|
+
hash: 3
|
|
240
|
+
segments:
|
|
241
|
+
- 0
|
|
242
|
+
version: "0"
|
|
243
|
+
requirements: []
|
|
244
|
+
|
|
245
|
+
rubyforge_project:
|
|
246
|
+
rubygems_version: 1.5.2
|
|
247
|
+
signing_key:
|
|
248
|
+
specification_version: 3
|
|
249
|
+
summary: ruby gem for accessing the beatport api
|
|
250
|
+
test_files: []
|
|
251
|
+
|