spotify-charts 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ebcb11a5d72b86567c8e0bd5bfdfe286e9ab44f
4
- data.tar.gz: fa021838225282fe931e0e8937e522db344b30bc
3
+ metadata.gz: 8970a1d4ad3b28688d0815522c3f2c639fc1f74f
4
+ data.tar.gz: 4614e7fdd13a9279469fa26d99a359572198cbd8
5
5
  SHA512:
6
- metadata.gz: e1ae5490d5de419000109b25530598232a9e081abf2f122c658bb9fea56f92cd1b98b901cb957971ed2160858fb1d5bb40beab25be71954b30a4a661561296fc
7
- data.tar.gz: cc2a0840720b6df50762b62a86f9916ec2623c2d7272f0e8648d5c11f8304ce1dd6036f6a7603ca029509c5f875f14ed1bc934713f7bec9ca0e88bf5e2b0193a
6
+ metadata.gz: eb5f4f0c461948e75bd98d8b8e0218d8b5319e21588818f85b2de5f745593923de32ab21ac58ed89c9dd5b899129e1b398fac6527629c8ab26b17b50b644b6aa
7
+ data.tar.gz: 460058353f66e6d1fca5e82181f18f74178fee2f64fda50fc3700b8f63a3b9a7ceb4fd33d8a3eea51117d26a759a2d03f6150131c407f4e611231cf575a2a296
@@ -0,0 +1,18 @@
1
+ # v0.0.2
2
+ * Updated README.
3
+ * Added CHANGELOG.
4
+ * Updated LICENSE years.
5
+ * Changed all hashes to Ruby 1.9 hash syntax.
6
+ * Upgraded Ruby version to 2.2.3.
7
+ * Updated all gems.
8
+ * Stated all dependencies in the code files.
9
+ * Fixed changed Spotify API. Thanks to `Scott Hiller`.
10
+ * Renamed `most_shared` to `most_viral` to stay in sync with Spotify API.
11
+ * Migrates to container based Travis CI infrastructure.
12
+
13
+ # v0.0.1
14
+ * support for `available_countries`, `available_dates(country)`, `most_streamed(country, date)`
15
+ and `most_shared(country, date)`
16
+ * added Travis CI, Gemnasium and CodeClimate integration
17
+ * tested with `rspec` and coverage measured with `simplecov`
18
+ * initial version
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Falk Koeppe
1
+ Copyright (c) 2014-2015 Falk Koeppe
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -6,7 +6,8 @@
6
6
  [![Build Status](https://travis-ci.org/murphyslaw/spotify-charts.png)](https://travis-ci.org/murphyslaw/spotify-charts)
7
7
 
8
8
  A Ruby wrapper for the public [Spotify Charts API](http://charts.spotify.com/) to retrieve the
9
- top 50 shared or streamed tracks on Spotify.
9
+ top 50 viral or streamed tracks on Spotify.
10
+
10
11
 
11
12
  ## Installation
12
13
 
@@ -22,6 +23,11 @@ Or install it yourself as:
22
23
 
23
24
  $ gem install spotify-charts
24
25
 
26
+ And then require:
27
+
28
+ require 'spotify/charts'
29
+
30
+
25
31
  ## Usage
26
32
 
27
33
  Retrieve **Available Countries**
@@ -30,27 +36,35 @@ Retrieve **Available Countries**
30
36
  Spotify::Charts.available_countries
31
37
  ```
32
38
 
33
- Retrieve **Available Dates** for a given country. The country needs to be in the format returned
39
+ Retrieve **Available Time Window Types** for a given country. The country needs to be in the format returned
34
40
  by `available_countries` method.
35
41
 
36
42
  ```
37
- Spotify::Charts.available_dates(country)
43
+ Spotify::Charts.available_time_window_types(country)
44
+ ```
45
+
46
+ Retrieve **Available Dates** for a given country and time window type. The country and time window type need to be in the format returned
47
+ by `.available_countries` and `.available_time_window_types` methods.
48
+
49
+ ```
50
+ Spotify::Charts.available_dates(country, time_window_type)
38
51
  ```
39
52
 
40
- Retrieve **Most Shared** tracks for a given country and date. The country and date need to be in the
41
- format returned by `available_countries` and `availabe_dates` methods.
53
+ Retrieve **Most Viral** tracks for a given country, time window type and date. The country, time window type and date need to be in the
54
+ format returned by `.available_countries`, `.available_time_window_types` and `.availabe_dates` methods.
42
55
 
43
56
  ```
44
- Spotify::Charts.most_shared(country, date)
57
+ Spotify::Charts.most_viral(country, time_window_type, date)
45
58
  ```
46
59
 
47
- Retrieve **Most Streamed** tracks for a given country and date. The country and date need to be in
48
- the format returned by `available_countries` and `availabe_dates` methods.
60
+ Retrieve **Most Streamed** tracks for a given country, time window type and date. The country, time window type and date need to be in
61
+ the format returned by `.available_countries`, `.available_time_window_types` and `.availabe_dates` methods.
49
62
 
50
63
  ```
51
- Spotify::Charts.most_streamed(country, date)
64
+ Spotify::Charts.most_streamed(country, time_window_type date)
52
65
  ```
53
66
 
67
+
54
68
  ## Testing
55
69
 
56
70
  The default `rake` task is configured to run all tests.
@@ -62,6 +76,7 @@ rake
62
76
  `ZenTest` is used for continous testing. Run `autotest` to start.
63
77
  `simplecov` is used for test coverage. Run `open coverage/index.html` to open the results.
64
78
 
79
+
65
80
  ## Contributing
66
81
 
67
82
  1. Fork it (https://github.com/murphyslaw/spotify-charts/fork)
@@ -6,20 +6,28 @@ require 'spotify/charts/track_parser'
6
6
  module Spotify
7
7
  module Charts
8
8
  class << self
9
+ def available_metrics
10
+ client.request('/')
11
+ end
12
+
9
13
  def available_countries
10
- client.request('/most_shared/')
14
+ client.request('/most_viral/')
15
+ end
16
+
17
+ def available_time_window_types(country)
18
+ client.request("/most_viral/#{country}/")
11
19
  end
12
20
 
13
- def available_dates(country)
14
- client.request("/most_shared/#{country}/")
21
+ def available_dates(country, time_window_type)
22
+ client.request("/most_viral/#{country}/#{time_window_type}/")
15
23
  end
16
24
 
17
- def most_shared(country, date)
18
- extract_tracks("/most_shared/#{country}/#{date}")
25
+ def most_viral(country, time_window_type, date)
26
+ extract_tracks("/most_viral/#{country}/#{time_window_type}/#{date}")
19
27
  end
20
28
 
21
- def most_streamed(country, date)
22
- extract_tracks("/most_streamed/#{country}/#{date}")
29
+ def most_streamed(country, time_window_type, date)
30
+ extract_tracks("/most_streamed/#{country}/#{time_window_type}/#{date}")
23
31
  end
24
32
 
25
33
  private
@@ -6,7 +6,7 @@ module Spotify
6
6
  module Charts
7
7
  class Client
8
8
  def self.base_uri
9
- 'http://charts.spotify.com/api/charts'
9
+ 'http://charts.spotify.com/api/tracks'
10
10
  end
11
11
 
12
12
  def request(endpoint)
@@ -1,8 +1,16 @@
1
1
  module Spotify
2
2
  module Charts
3
3
  class Track
4
- attr_accessor :date, :country, :track_url, :track_name, :artist_name, :artist_url,
5
- :album_name, :album_url, :artwork_url, :num_streams
4
+ attr_accessor :date
5
+ attr_accessor :country
6
+ attr_accessor :track_url
7
+ attr_accessor :track_name
8
+ attr_accessor :artist_name
9
+ attr_accessor :artist_url
10
+ attr_accessor :album_name
11
+ attr_accessor :album_url
12
+ attr_accessor :artwork_url
13
+ attr_accessor :num_streams
6
14
 
7
15
  def ==(other)
8
16
  other.class == self.class && other.state == state
@@ -12,7 +20,16 @@ module Spotify
12
20
  protected
13
21
 
14
22
  def state
15
- [date, country, track_url, track_name, artist_name, album_name, artwork_url, num_streams]
23
+ [
24
+ date,
25
+ country,
26
+ track_url,
27
+ track_name,
28
+ artist_name,
29
+ album_name,
30
+ artwork_url,
31
+ num_streams
32
+ ]
16
33
  end
17
34
  end
18
35
  end
@@ -1,5 +1,5 @@
1
1
  module Spotify
2
2
  module Charts
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -0,0 +1,41 @@
1
+ example_id | status | run_time |
2
+ ------------------------------------------------------ | ------ | --------------- |
3
+ ./spec/lib/spotify/charts/client_spec.rb[1:1:1] | passed | 0.0001 seconds |
4
+ ./spec/lib/spotify/charts/client_spec.rb[1:2:1] | passed | 0.00054 seconds |
5
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:1] | passed | 0.00007 seconds |
6
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:1] | passed | 0.00022 seconds |
7
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:2] | passed | 0.00023 seconds |
8
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:3] | passed | 0.00023 seconds |
9
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:4] | passed | 0.00025 seconds |
10
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:5] | passed | 0.00023 seconds |
11
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:6] | passed | 0.00022 seconds |
12
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:7] | passed | 0.0002 seconds |
13
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:8] | passed | 0.00036 seconds |
14
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:9] | passed | 0.00024 seconds |
15
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:10] | passed | 0.00025 seconds |
16
+ ./spec/lib/spotify/charts/track_parser_spec.rb[1:2:11] | passed | 0.00026 seconds |
17
+ ./spec/lib/spotify/charts/track_spec.rb[1:1] | passed | 0.00022 seconds |
18
+ ./spec/lib/spotify/charts/track_spec.rb[1:2] | passed | 0.00018 seconds |
19
+ ./spec/lib/spotify/charts/track_spec.rb[1:3] | passed | 0.00018 seconds |
20
+ ./spec/lib/spotify/charts/track_spec.rb[1:4] | passed | 0.00019 seconds |
21
+ ./spec/lib/spotify/charts/track_spec.rb[1:5] | passed | 0.00019 seconds |
22
+ ./spec/lib/spotify/charts/track_spec.rb[1:6] | passed | 0.00025 seconds |
23
+ ./spec/lib/spotify/charts/track_spec.rb[1:7] | passed | 0.00023 seconds |
24
+ ./spec/lib/spotify/charts/track_spec.rb[1:8] | passed | 0.00024 seconds |
25
+ ./spec/lib/spotify/charts/track_spec.rb[1:9] | passed | 0.00024 seconds |
26
+ ./spec/lib/spotify/charts/track_spec.rb[1:10] | passed | 0.00019 seconds |
27
+ ./spec/lib/spotify/charts/track_spec.rb[1:11] | passed | 0.00019 seconds |
28
+ ./spec/lib/spotify/charts_spec.rb[1:1:1] | passed | 0.00046 seconds |
29
+ ./spec/lib/spotify/charts_spec.rb[1:1:2] | passed | 0.00037 seconds |
30
+ ./spec/lib/spotify/charts_spec.rb[1:1:3] | passed | 0.00117 seconds |
31
+ ./spec/lib/spotify/charts_spec.rb[1:2:1] | passed | 0.00042 seconds |
32
+ ./spec/lib/spotify/charts_spec.rb[1:2:2] | passed | 0.00041 seconds |
33
+ ./spec/lib/spotify/charts_spec.rb[1:2:3] | passed | 0.00035 seconds |
34
+ ./spec/lib/spotify/charts_spec.rb[1:3:1] | passed | 0.00042 seconds |
35
+ ./spec/lib/spotify/charts_spec.rb[1:3:2] | passed | 0.00039 seconds |
36
+ ./spec/lib/spotify/charts_spec.rb[1:4:1] | passed | 0.0005 seconds |
37
+ ./spec/lib/spotify/charts_spec.rb[1:4:2] | passed | 0.00038 seconds |
38
+ ./spec/lib/spotify/charts_spec.rb[1:5:1] | passed | 0.00645 seconds |
39
+ ./spec/lib/spotify/charts_spec.rb[1:5:2] | passed | 0.0013 seconds |
40
+ ./spec/lib/spotify/charts_spec.rb[1:6:1] | passed | 0.00053 seconds |
41
+ ./spec/lib/spotify/charts_spec.rb[1:6:2] | passed | 0.00064 seconds |
@@ -1,29 +1,24 @@
1
1
  require 'uri'
2
2
  require 'net/http'
3
+ require 'spotify/charts/client'
3
4
 
4
- require 'spec_helper.rb'
5
-
6
- module Spotify
7
- module Charts
8
- describe Client do
9
- describe '.base_uri' do
10
- it 'returns the Spotify Charts API base uri' do
11
- expect(subject.class.base_uri).to eq('http://charts.spotify.com/api/charts')
12
- end
13
- end
5
+ RSpec.describe Spotify::Charts::Client do
6
+ describe '.base_uri' do
7
+ it 'returns the Spotify Charts API base uri' do
8
+ expect(subject.class.base_uri).to eq('http://charts.spotify.com/api/tracks')
9
+ end
10
+ end
14
11
 
15
- describe '#request' do
16
- let(:endpoint) { '/most_shared/global/latest' }
12
+ describe '#request' do
13
+ let(:endpoint) { '/most_viral/global/latest' }
17
14
 
18
- before do
19
- uri = URI(subject.class.base_uri + endpoint)
20
- allow(Net::HTTP).to receive(:get).with(uri).once { '{"example":"json"}' }
21
- end
15
+ before do
16
+ uri = URI(subject.class.base_uri + endpoint)
17
+ allow(Net::HTTP).to receive(:get).with(uri).once { '{"example":"json"}' }
18
+ end
22
19
 
23
- it 'parses JSON response' do
24
- expect(subject.request(endpoint)).to eq({'example' => 'json'})
25
- end
26
- end
20
+ it 'parses JSON response' do
21
+ expect(subject.request(endpoint)).to eq({'example' => 'json'})
27
22
  end
28
23
  end
29
24
  end
@@ -1,86 +1,85 @@
1
- require 'spec_helper.rb'
1
+ require 'date'
2
+ require 'uri'
3
+ require 'spotify/charts/track'
4
+ require 'spotify/charts/track_parser'
2
5
 
3
- module Spotify
4
- module Charts
5
- describe TrackParser do
6
- subject { TrackParser.new('example') }
6
+ RSpec.describe Spotify::Charts::TrackParser do
7
+ subject { described_class.new('example') }
7
8
 
8
- it 'stores the attributes' do
9
- expect(subject.attributes).to eq('example')
10
- end
9
+ it 'stores the attributes' do
10
+ expect(subject.attributes).to eq('example')
11
+ end
11
12
 
12
- describe '#track' do
13
- subject { TrackParser.new(attributes).track }
13
+ describe '#track' do
14
+ subject { described_class.new(attributes).track }
14
15
 
15
- let(:attributes) {
16
- {
17
- 'date' => '2013-12-15',
18
- 'country' => 'global',
19
- 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
20
- 'track_name' => 'I See Fire',
21
- 'artist_name' => 'Howard Shore',
22
- 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
23
- 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
24
- 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
25
- 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
26
- 'num_streams' => 515608,
27
- }
28
- }
16
+ let(:attributes) do
17
+ {
18
+ 'date' => '2013-12-15',
19
+ 'country' => 'global',
20
+ 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
21
+ 'track_name' => 'I See Fire',
22
+ 'artist_name' => 'Howard Shore',
23
+ 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
24
+ 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
25
+ 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
26
+ 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
27
+ 'num_streams' => 515608,
28
+ }
29
+ end
29
30
 
30
- it 'creates a track from JSON data' do
31
- expect(subject).to be_a(Track)
32
- end
31
+ it 'creates a track from JSON data' do
32
+ expect(subject).to be_a(Spotify::Charts::Track)
33
+ end
33
34
 
34
- it 'transforms the date' do
35
- expect(subject.date).to be_a(Date)
36
- expect(subject.date).to eq(Date.parse('2013-12-15'))
37
- end
35
+ it 'transforms the date' do
36
+ expect(subject.date).to be_a(Date)
37
+ expect(subject.date).to eq(Date.parse('2013-12-15'))
38
+ end
38
39
 
39
- it 'transforms the country' do
40
- expect(subject.country).to be_a(String)
41
- expect(subject.country).to eq('global')
42
- end
40
+ it 'transforms the country' do
41
+ expect(subject.country).to be_a(String)
42
+ expect(subject.country).to eq('global')
43
+ end
43
44
 
44
- it 'transforms the track url' do
45
- expect(subject.track_url).to be_a(URI)
46
- expect(subject.track_url).to eq(URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7'))
47
- end
45
+ it 'transforms the track url' do
46
+ expect(subject.track_url).to be_a(URI)
47
+ expect(subject.track_url).to eq(URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7'))
48
+ end
48
49
 
49
- it 'transforms the track name' do
50
- expect(subject.track_name).to be_a(String)
51
- expect(subject.track_name).to eq('I See Fire')
52
- end
50
+ it 'transforms the track name' do
51
+ expect(subject.track_name).to be_a(String)
52
+ expect(subject.track_name).to eq('I See Fire')
53
+ end
53
54
 
54
- it 'transforms the artist name' do
55
- expect(subject.artist_name).to be_a(String)
56
- expect(subject.artist_name).to eq('Howard Shore')
57
- end
55
+ it 'transforms the artist name' do
56
+ expect(subject.artist_name).to be_a(String)
57
+ expect(subject.artist_name).to eq('Howard Shore')
58
+ end
58
59
 
59
- it 'transforms the artist url' do
60
- expect(subject.artist_url).to be_a(URI)
61
- expect(subject.artist_url).to eq(URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V'))
62
- end
60
+ it 'transforms the artist url' do
61
+ expect(subject.artist_url).to be_a(URI)
62
+ expect(subject.artist_url).to eq(URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V'))
63
+ end
63
64
 
64
- it 'transforms the album name' do
65
- expect(subject.album_name).to be_a(String)
66
- expect(subject.album_name).to eq('The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)')
67
- end
65
+ it 'transforms the album name' do
66
+ expect(subject.album_name).to be_a(String)
67
+ expect(subject.album_name).to eq('The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)')
68
+ end
68
69
 
69
- it 'transforms the album url' do
70
- expect(subject.album_url).to be_a(URI)
71
- expect(subject.album_url).to eq(URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr'))
72
- end
70
+ it 'transforms the album url' do
71
+ expect(subject.album_url).to be_a(URI)
72
+ expect(subject.album_url).to eq(URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr'))
73
+ end
73
74
 
74
- it 'transforms the artwork url' do
75
- expect(subject.artwork_url).to be_a(URI)
76
- expect(subject.artwork_url).to eq(URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec'))
77
- end
75
+ it 'transforms the artwork url' do
76
+ expect(subject.artwork_url).to be_a(URI)
77
+ expect(subject.artwork_url).to eq(URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec'))
78
+ end
78
79
 
79
- it 'transforms the num_streams' do
80
- expect(subject.num_streams).to be_a(Integer)
81
- expect(subject.num_streams).to eq(515608)
82
- end
83
- end
80
+ it 'transforms the num_streams' do
81
+ expect(subject.num_streams).to be_a(Integer)
82
+ expect(subject.num_streams).to eq(515608)
84
83
  end
85
84
  end
86
85
  end
@@ -1,64 +1,64 @@
1
+ require 'date'
1
2
  require 'uri'
3
+ require 'spotify/charts/track'
2
4
 
3
- require 'spec_helper.rb'
5
+ RSpec.describe Spotify::Charts::Track do
6
+ subject do
7
+ described_class.new.tap do |t|
8
+ t.date = Date.parse('2013-12-15')
9
+ t.country = 'global'
10
+ t.track_url = URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7')
11
+ t.track_name = 'I See Fire'
12
+ t.artist_name = 'Howard Shore'
13
+ t.artist_url = URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V')
14
+ t.album_name = 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)'
15
+ t.album_url = URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr')
16
+ t.artwork_url = URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec')
17
+ t.num_streams = 515608
18
+ end
19
+ end
4
20
 
5
- module Spotify
6
- module Charts
7
- describe Track do
8
- subject {
9
- Track.new.tap do |t|
10
- t.date = Date.parse('2013-12-15')
11
- t.country = 'global'
12
- t.track_url = URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7')
13
- t.track_name = 'I See Fire'
14
- t.artist_name = 'Howard Shore'
15
- t.artist_url = URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V')
16
- t.album_name = 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)'
17
- t.album_url = URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr')
18
- t.artwork_url = URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec')
19
- t.num_streams = 515608
20
- end
21
- }
21
+ it 'initializes the date' do
22
+ expect(subject.date).to eq(Date.parse('2013-12-15'))
23
+ end
22
24
 
23
- it 'initializes the date' do
24
- expect(subject.date).to eq(Date.parse('2013-12-15'))
25
- end
25
+ it 'initializes the country' do
26
+ expect(subject.country).to eq('global')
27
+ end
26
28
 
27
- it 'initializes the country' do
28
- expect(subject.country).to eq('global')
29
- end
29
+ it 'initializes the track url' do
30
+ expect(subject.track_url).to eq(URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7'))
31
+ end
30
32
 
31
- it 'initializes the track url' do
32
- expect(subject.track_url).to eq(URI('https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7'))
33
- end
33
+ it 'initializes the track name' do
34
+ expect(subject.track_name).to eq('I See Fire')
35
+ end
34
36
 
35
- it 'initializes the track name' do
36
- expect(subject.track_name).to eq('I See Fire')
37
- end
37
+ it 'initializes the artist name' do
38
+ expect(subject.artist_name).to eq('Howard Shore')
39
+ end
38
40
 
39
- it 'initializes the artist name' do
40
- expect(subject.artist_name).to eq('Howard Shore')
41
- end
41
+ it 'initializes the artist url' do
42
+ expect(subject.artist_url).to eq(URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V'))
43
+ end
42
44
 
43
- it 'initializes the artist url' do
44
- expect(subject.artist_url).to eq(URI('https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V'))
45
- end
45
+ it 'initializes the album name' do
46
+ expect(subject.album_name).to eq('The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)')
47
+ end
46
48
 
47
- it 'initializes the album name' do
48
- expect(subject.album_name).to eq('The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)')
49
- end
49
+ it 'initializes the album url' do
50
+ expect(subject.album_url).to eq(URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr'))
51
+ end
50
52
 
51
- it 'initializes the album url' do
52
- expect(subject.album_url).to eq(URI('https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr'))
53
- end
53
+ it 'initializes the artwork url' do
54
+ expect(subject.artwork_url).to eq(URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec'))
55
+ end
54
56
 
55
- it 'initializes the artwork url' do
56
- expect(subject.artwork_url).to eq(URI('http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec'))
57
- end
57
+ it 'initializes the number of streams' do
58
+ expect(subject.num_streams).to eq(515608)
59
+ end
58
60
 
59
- it 'initializes the number of streams' do
60
- expect(subject.num_streams).to eq(515608)
61
- end
62
- end
61
+ it 'equals the same object' do
62
+ expect(subject).to eq(subject)
63
63
  end
64
64
  end
@@ -1,167 +1,209 @@
1
1
  require 'net/http'
2
+ require 'spotify/charts'
3
+ require 'spotify/charts/client'
4
+ require 'spotify/charts/track'
5
+ require 'spotify/charts/track_parser'
2
6
 
3
- require 'spec_helper.rb'
7
+ RSpec.describe Spotify::Charts do
8
+ subject { described_class }
4
9
 
5
- module Spotify
6
- describe Charts do
7
- subject { Charts }
10
+ describe '.available_metrics' do
11
+ let(:response) { %w(most_viral most_streamed) }
8
12
 
9
- describe '.available_countries' do
10
- let(:response) {
11
- %w(ar at au be bg ch cl co cr cz de dk ec ee es fi fr gb gr gt hk hu ie is it li lt lu lv mx
12
- my nl no nz pe pl pt se sg sk sv tr tw us uy global)
13
- }
13
+ before do
14
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
15
+ .with('/') { response }
16
+ end
14
17
 
15
- before do
16
- allow_any_instance_of(Charts::Client).to receive(:request)
17
- .with('/most_shared/') { response }
18
- end
18
+ it 'lists available metrcis' do
19
+ expect(subject.available_metrics).to be_a(Enumerable)
20
+ end
19
21
 
20
- it 'lists available countries' do
21
- expect(subject.available_countries).to be_a(Enumerable)
22
- end
22
+ it 'includes the "most_viral" metric' do
23
+ expect(subject.available_metrics).to include('most_viral')
24
+ end
23
25
 
24
- it 'includes the "global" country' do
25
- expect(subject.available_countries).to include('global')
26
- end
26
+ it 'includes the "most_streamed" metric' do
27
+ expect(subject.available_metrics).to include('most_streamed')
27
28
  end
29
+ end
28
30
 
29
- describe '.available_dates' do
30
- let(:response) {
31
- %w(latest 2013-12-08 2013-12-01 2013-11-24 2013-11-17 2013-11-10 2013-11-03 2013-10-27
32
- 2013-10-20 2013-10-13 2013-10-06 2013-09-29 2013-09-22 2013-09-15 2013-09-08 2013-09-01
33
- 2013-08-25 2013-08-18 2013-08-11 2013-08-04 2013-07-28 2013-07-21 2013-07-14 2013-07-07
34
- 2013-06-30 2013-06-23 2013-06-16 2013-06-09 2013-06-02 2013-05-26 2013-05-19 2013-05-12
35
- 2013-05-05 2013-04-28)
36
- }
31
+ describe '.available_time_window_types' do
32
+ let(:response) { %w(daily weekly) }
37
33
 
38
- before do
39
- allow_any_instance_of(Charts::Client).to receive(:request)
40
- .with('/most_shared/global/') { response }
41
- end
34
+ before do
35
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
36
+ .with('/most_viral/global/') { response }
37
+ end
42
38
 
43
- it 'lists available dates' do
44
- expect(subject.available_dates('global')).to be_a(Enumerable)
45
- end
39
+ it 'lists available time window types' do
40
+ expect(subject.available_time_window_types('global')).to be_a(Enumerable)
41
+ end
46
42
 
47
- it 'includes the "latest" date' do
48
- expect(subject.available_dates('global')).to include('latest')
49
- end
43
+ it 'includes the "daily" metric' do
44
+ expect(subject.available_time_window_types('global')).to include('daily')
50
45
  end
51
46
 
52
- describe '.most shared' do
53
- subject { Charts.most_shared('global', 'latest') }
54
-
55
- let(:response) {
56
- {
57
- 'tracks' => [
58
- {
59
- 'date' => '2013-12-15',
60
- 'country' => 'global',
61
- 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
62
- 'track_name' => 'I See Fire',
63
- 'artist_name' => 'Howard Shore',
64
- 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
65
- 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
66
- 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
67
- 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
68
- 'num_streams' => 515608
69
- },
70
- {
71
- 'date' => '2013-12-15',
72
- 'country' => 'global',
73
- 'track_url' => 'https://play.spotify.com/track/44GgIVlmRsD1qMWONOWOS3',
74
- 'track_name' => 'Waiting Game',
75
- 'artist_name' => 'BANKS',
76
- 'artist_url' => 'https://play.spotify.com/artist/2xe8IXgCTpwHE3eA9hTs4n',
77
- 'album_name' => 'LONDON',
78
- 'album_url' => 'https://play.spotify.com/album/4xG1FKMIQPGYRujVBtMAqm',
79
- 'artwork_url' => 'http://o.scdn.co/300/4027ebaa3c0ff4161020cb37a546f25929249166',
80
- 'num_streams' => 182325
81
- }
82
- ]
83
- }
84
- }
47
+ it 'includes the "weekly" metric' do
48
+ expect(subject.available_time_window_types('global')).to include('weekly')
49
+ end
50
+ end
51
+
52
+ describe '.available_countries' do
53
+ let(:response) do
54
+ %w(ar at au be bg ch cl co cr cz de dk ec ee es fi fr gb gr gt hk hu ie is it li lt lu lv mx
55
+ my nl no nz pe pl pt se sg sk sv tr tw us uy global)
56
+ end
57
+
58
+ before do
59
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
60
+ .with('/most_viral/') { response }
61
+ end
62
+
63
+ it 'lists available countries' do
64
+ expect(subject.available_countries).to be_a(Enumerable)
65
+ end
66
+
67
+ it 'includes the "global" country' do
68
+ expect(subject.available_countries).to include('global')
69
+ end
70
+ end
71
+
72
+ describe '.available_dates' do
73
+ let(:response) do
74
+ %w(latest 2013-12-08 2013-12-01 2013-11-24 2013-11-17 2013-11-10 2013-11-03 2013-10-27
75
+ 2013-10-20 2013-10-13 2013-10-06 2013-09-29 2013-09-22 2013-09-15 2013-09-08 2013-09-01
76
+ 2013-08-25 2013-08-18 2013-08-11 2013-08-04 2013-07-28 2013-07-21 2013-07-14 2013-07-07
77
+ 2013-06-30 2013-06-23 2013-06-16 2013-06-09 2013-06-02 2013-05-26 2013-05-19 2013-05-12
78
+ 2013-05-05 2013-04-28)
79
+ end
80
+
81
+ before do
82
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
83
+ .with('/most_viral/global/weekly/') { response }
84
+ end
85
85
 
86
- let(:tracks) {
87
- response['tracks'].inject([]) do |tracks, item|
88
- tracks << Charts::TrackParser.new(item).track
89
- end
86
+ it 'lists available dates' do
87
+ expect(subject.available_dates('global', 'weekly')).to be_a(Enumerable)
88
+ end
89
+
90
+ it 'includes the "latest" date' do
91
+ expect(subject.available_dates('global', 'weekly')).to include('latest')
92
+ end
93
+ end
94
+
95
+ describe '.most_viral' do
96
+ subject { described_class.most_viral('global', 'weekly', 'latest') }
97
+
98
+ let(:response) do
99
+ {
100
+ 'tracks' => [
101
+ {
102
+ 'date' => '2013-12-15',
103
+ 'country' => 'global',
104
+ 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
105
+ 'track_name' => 'I See Fire',
106
+ 'artist_name' => 'Howard Shore',
107
+ 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
108
+ 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
109
+ 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
110
+ 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
111
+ 'num_streams' => 515608
112
+ },
113
+ {
114
+ 'date' => '2013-12-15',
115
+ 'country' => 'global',
116
+ 'track_url' => 'https://play.spotify.com/track/44GgIVlmRsD1qMWONOWOS3',
117
+ 'track_name' => 'Waiting Game',
118
+ 'artist_name' => 'BANKS',
119
+ 'artist_url' => 'https://play.spotify.com/artist/2xe8IXgCTpwHE3eA9hTs4n',
120
+ 'album_name' => 'LONDON',
121
+ 'album_url' => 'https://play.spotify.com/album/4xG1FKMIQPGYRujVBtMAqm',
122
+ 'artwork_url' => 'http://o.scdn.co/300/4027ebaa3c0ff4161020cb37a546f25929249166',
123
+ 'num_streams' => 182325
124
+ }
125
+ ]
90
126
  }
127
+ end
91
128
 
92
- before do
93
- allow_any_instance_of(Charts::Client).to receive(:request)
94
- .with('/most_shared/global/latest') { response }
129
+ let(:tracks) do
130
+ response['tracks'].inject([]) do |tracks, item|
131
+ tracks << Spotify::Charts::TrackParser.new(item).track
95
132
  end
133
+ end
96
134
 
97
- it 'returns a list of tracks' do
98
- subject.each do |track|
99
- expect(track).to be_a(Charts::Track)
100
- end
101
- end
135
+ before do
136
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
137
+ .with('/most_viral/global/weekly/latest') { response }
138
+ end
102
139
 
103
- it 'tracks correspond to webservice response' do
104
- subject.each_with_index do |track, index|
105
- expect(track).to eq(tracks[index])
106
- end
140
+ it 'returns a list of tracks' do
141
+ subject.each do |track|
142
+ expect(track).to be_a(Spotify::Charts::Track)
107
143
  end
108
144
  end
109
145
 
110
- describe '.most streamed' do
111
- subject { Charts.most_streamed('global', 'latest') }
112
-
113
- let(:response) {
114
- {
115
- 'tracks' => [
116
- {
117
- 'date' => '2013-12-15',
118
- 'country' => 'global',
119
- 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
120
- 'track_name' => 'I See Fire',
121
- 'artist_name' => 'Howard Shore',
122
- 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
123
- 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
124
- 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
125
- 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
126
- 'num_streams' => 515608
127
- },
128
- {
129
- 'date' => '2013-12-15',
130
- 'country' => 'global',
131
- 'track_url' => 'https://play.spotify.com/track/44GgIVlmRsD1qMWONOWOS3',
132
- 'track_name' => 'Waiting Game',
133
- 'artist_name' => 'BANKS',
134
- 'artist_url' => 'https://play.spotify.com/artist/2xe8IXgCTpwHE3eA9hTs4n',
135
- 'album_name' => 'LONDON',
136
- 'album_url' => 'https://play.spotify.com/album/4xG1FKMIQPGYRujVBtMAqm',
137
- 'artwork_url' => 'http://o.scdn.co/300/4027ebaa3c0ff4161020cb37a546f25929249166',
138
- 'num_streams' => 182325
139
- }
140
- ]
141
- }
142
- }
146
+ it 'tracks correspond to webservice response' do
147
+ subject.each_with_index do |track, index|
148
+ expect(track).to eq(tracks[index])
149
+ end
150
+ end
151
+ end
143
152
 
144
- let(:tracks) {
145
- response['tracks'].inject([]) do |tracks, item|
146
- tracks << Charts::TrackParser.new(item).track
147
- end
153
+ describe '.most_streamed' do
154
+ subject { described_class.most_streamed('global', 'weekly', 'latest') }
155
+
156
+ let(:response) do
157
+ {
158
+ 'tracks' => [
159
+ {
160
+ 'date' => '2013-12-15',
161
+ 'country' => 'global',
162
+ 'track_url' => 'https://play.spotify.com/track/7DyuZtvlGT0z5Xz8peiLN7',
163
+ 'track_name' => 'I See Fire',
164
+ 'artist_name' => 'Howard Shore',
165
+ 'artist_url' => 'https://play.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V',
166
+ 'album_name' => 'The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)',
167
+ 'album_url' => 'https://play.spotify.com/album/5kqgALc3cz9P3VclmSmHfr',
168
+ 'artwork_url' => 'http://o.scdn.co/300/be7d523ea35aeb10f561712420d3429f0ec68eec',
169
+ 'num_streams' => 515608
170
+ },
171
+ {
172
+ 'date' => '2013-12-15',
173
+ 'country' => 'global',
174
+ 'track_url' => 'https://play.spotify.com/track/44GgIVlmRsD1qMWONOWOS3',
175
+ 'track_name' => 'Waiting Game',
176
+ 'artist_name' => 'BANKS',
177
+ 'artist_url' => 'https://play.spotify.com/artist/2xe8IXgCTpwHE3eA9hTs4n',
178
+ 'album_name' => 'LONDON',
179
+ 'album_url' => 'https://play.spotify.com/album/4xG1FKMIQPGYRujVBtMAqm',
180
+ 'artwork_url' => 'http://o.scdn.co/300/4027ebaa3c0ff4161020cb37a546f25929249166',
181
+ 'num_streams' => 182325
182
+ }
183
+ ]
148
184
  }
185
+ end
149
186
 
150
- before do
151
- allow_any_instance_of(Charts::Client).to receive(:request)
152
- .with('/most_streamed/global/latest') { response }
187
+ let(:tracks) do
188
+ response['tracks'].inject([]) do |tracks, item|
189
+ tracks << Spotify::Charts::TrackParser.new(item).track
153
190
  end
191
+ end
154
192
 
155
- it 'returns a list of tracks' do
156
- subject.each do |track|
157
- expect(track).to be_a(Charts::Track)
158
- end
193
+ before do
194
+ allow_any_instance_of(Spotify::Charts::Client).to receive(:request)
195
+ .with('/most_streamed/global/weekly/latest') { response }
196
+ end
197
+
198
+ it 'returns a list of tracks' do
199
+ subject.each do |track|
200
+ expect(track).to be_a(Spotify::Charts::Track)
159
201
  end
202
+ end
160
203
 
161
- it 'tracks correspond to webservice response' do
162
- subject.each_with_index do |track, index|
163
- expect(track).to eq(tracks[index])
164
- end
204
+ it 'tracks correspond to webservice response' do
205
+ subject.each_with_index do |track, index|
206
+ expect(track).to eq(tracks[index])
165
207
  end
166
208
  end
167
209
  end
@@ -1,11 +1,96 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start
3
3
 
4
- require 'spotify/charts'
5
-
4
+ # This file was generated by the `rspec --init` command. Conventionally, all
5
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
6
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
7
+ # this file to always be loaded, without a need to explicitly require it in any
8
+ # files.
9
+ #
10
+ # Given that it is always loaded, you are encouraged to keep this file as
11
+ # light-weight as possible. Requiring heavyweight dependencies from this file
12
+ # will add to the boot time of your test suite on EVERY test run, even for an
13
+ # individual file that may not need all of that loaded. Instead, consider making
14
+ # a separate helper file that requires the additional dependencies and performs
15
+ # the additional setup, and require it from the spec files that actually need
16
+ # it.
17
+ #
18
+ # The `.rspec` file also contains a few flags that are not defaults but that
19
+ # users commonly want.
20
+ #
21
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
6
22
  RSpec.configure do |config|
7
- config.treat_symbols_as_metadata_keys_with_true_values = true
8
- config.run_all_when_everything_filtered = true
23
+ # rspec-expectations config goes here. You can use an alternate
24
+ # assertion/expectation library such as wrong or the stdlib/minitest
25
+ # assertions if you prefer.
26
+ config.expect_with :rspec do |expectations|
27
+ # This option will default to `true` in RSpec 4. It makes the `description`
28
+ # and `failure_message` of custom matchers include text for helper methods
29
+ # defined using `chain`, e.g.:
30
+ # be_bigger_than(2).and_smaller_than(4).description
31
+ # # => "be bigger than 2 and smaller than 4"
32
+ # ...rather than:
33
+ # # => "be bigger than 2"
34
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
35
+ end
36
+
37
+ # rspec-mocks config goes here. You can use an alternate test double
38
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
39
+ config.mock_with :rspec do |mocks|
40
+ # Prevents you from mocking or stubbing a method that does not exist on
41
+ # a real object. This is generally recommended, and will default to
42
+ # `true` in RSpec 4.
43
+ mocks.verify_partial_doubles = true
44
+ end
45
+
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
9
50
  config.filter_run :focus
10
- config.order = 'random'
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
63
+ config.disable_monkey_patching!
64
+
65
+ # This setting enables warnings. It's recommended, but in some cases may
66
+ # be too noisy due to issues in dependencies.
67
+ config.warnings = true
68
+
69
+ # Many RSpec users commonly either run the entire suite or an individual
70
+ # file, and it's useful to allow more verbose output when running an
71
+ # individual spec file.
72
+ if config.files_to_run.one?
73
+ # Use the documentation formatter for detailed output,
74
+ # unless a formatter has already been configured
75
+ # (e.g. via a command-line flag).
76
+ config.default_formatter = 'doc'
77
+ end
78
+
79
+ # Print the 10 slowest examples and example groups at the
80
+ # end of the spec run, to help surface which specs are running
81
+ # particularly slow.
82
+ config.profile_examples = 10
83
+
84
+ # Run specs in random order to surface order dependencies. If you find an
85
+ # order dependency and want to debug it, you can fix the order by providing
86
+ # the seed, which is printed after each run.
87
+ # --seed 1234
88
+ config.order = :random
89
+
90
+ # Seed global randomization in this process using the `--seed` CLI option.
91
+ # Setting this allows you to use `--seed` to deterministically reproduce
92
+ # test failures related to randomization by passing the same `--seed` value
93
+ # as the one that triggered the failure.
94
+ Kernel.srand config.seed
11
95
  end
96
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotify-charts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Falk Koeppe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2015-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -101,6 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - CHANGELOG.md
104
105
  - LICENSE
105
106
  - README.md
106
107
  - lib/spotify/charts.rb
@@ -108,6 +109,7 @@ files:
108
109
  - lib/spotify/charts/track.rb
109
110
  - lib/spotify/charts/track_parser.rb
110
111
  - lib/spotify/charts/version.rb
112
+ - spec/examples.txt
111
113
  - spec/lib/spotify/charts/client_spec.rb
112
114
  - spec/lib/spotify/charts/track_parser_spec.rb
113
115
  - spec/lib/spotify/charts/track_spec.rb
@@ -133,11 +135,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
135
  version: '0'
134
136
  requirements: []
135
137
  rubyforge_project:
136
- rubygems_version: 2.2.2
138
+ rubygems_version: 2.4.5.1
137
139
  signing_key:
138
140
  specification_version: 4
139
141
  summary: Ruby wrapper for the Spotify Charts API
140
142
  test_files:
143
+ - spec/examples.txt
141
144
  - spec/lib/spotify/charts/client_spec.rb
142
145
  - spec/lib/spotify/charts/track_parser_spec.rb
143
146
  - spec/lib/spotify/charts/track_spec.rb