beatport 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +13 -14
- data/{README.rdoc → README.md} +6 -6
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/beatport.gemspec +6 -5
- data/lib/beatport/price.rb +22 -0
- data/spec/catalog/label_spec.rb +1 -1
- data/spec/fixtures/account_type.yml +7 -7
- data/spec/fixtures/artist.yml +217 -197
- data/spec/fixtures/audio_format.yml +10 -10
- data/spec/fixtures/autocomplete.yml +11 -11
- data/spec/fixtures/chart.yml +148 -187
- data/spec/fixtures/country.yml +4 -4
- data/spec/fixtures/currency.yml +4 -4
- data/spec/fixtures/genre.yml +61 -69
- data/spec/fixtures/item_type.yml +5 -5
- data/spec/fixtures/label.yml +115 -113
- data/spec/fixtures/mixed.yml +15 -15
- data/spec/fixtures/release.yml +647 -688
- data/spec/fixtures/search.yml +82 -83
- data/spec/fixtures/source_type.yml +5 -5
- data/spec/fixtures/track.yml +464 -480
- data/spec/price_spec.rb +31 -0
- metadata +7 -6
data/spec/price_spec.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Beatport
|
4
|
+
describe Price do
|
5
|
+
subject :price do
|
6
|
+
Price.new({"code" => "usd", "symbol" => "$", "value" => 1490})
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'defaults' do
|
10
|
+
it "should have the same rounding_mode" do
|
11
|
+
Price.rounding_mode.should eq(Money.rounding_mode)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should have the same precision" do
|
15
|
+
Price.conversion_precision.should eq(Money.conversion_precision)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#to_s' do
|
21
|
+
it "can be converted to a string" do
|
22
|
+
price.to_s.should eq('14.90')
|
23
|
+
end
|
24
|
+
|
25
|
+
it "is equivalent to a given money object" do
|
26
|
+
price.to_s.should eq(Money.new(1490, 'usd').to_s)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beatport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -161,14 +161,14 @@ executables: []
|
|
161
161
|
extensions: []
|
162
162
|
extra_rdoc_files:
|
163
163
|
- LICENSE.txt
|
164
|
-
- README.
|
164
|
+
- README.md
|
165
165
|
files:
|
166
166
|
- .document
|
167
167
|
- .rspec
|
168
168
|
- Gemfile
|
169
169
|
- Gemfile.lock
|
170
170
|
- LICENSE.txt
|
171
|
-
- README.
|
171
|
+
- README.md
|
172
172
|
- Rakefile
|
173
173
|
- VERSION
|
174
174
|
- beatport.gemspec
|
@@ -250,6 +250,7 @@ files:
|
|
250
250
|
- spec/fixtures/source_type.yml
|
251
251
|
- spec/fixtures/track.yml
|
252
252
|
- spec/item_spec.rb
|
253
|
+
- spec/price_spec.rb
|
253
254
|
- spec/spec_helper.rb
|
254
255
|
- spec/support/inflector_spec.rb
|
255
256
|
- spec/support/query_builder_spec.rb
|
@@ -268,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
268
269
|
version: '0'
|
269
270
|
segments:
|
270
271
|
- 0
|
271
|
-
hash: -
|
272
|
+
hash: -1393460495433382922
|
272
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
273
274
|
none: false
|
274
275
|
requirements:
|
@@ -277,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
278
|
version: '0'
|
278
279
|
requirements: []
|
279
280
|
rubyforge_project:
|
280
|
-
rubygems_version: 1.8.
|
281
|
+
rubygems_version: 1.8.23
|
281
282
|
signing_key:
|
282
283
|
specification_version: 3
|
283
284
|
summary: ruby gem for accessing the beatport api
|