itunes_api 2.3.1 → 2.3.2
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.
- checksums.yaml +5 -5
- data/.circleci/config.yml +42 -0
- data/.gitignore +0 -1
- data/.rspec +0 -0
- data/.rubocop.yml +24 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +5 -1
- data/Gemfile.lock +61 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/Rakefile +2 -0
- data/itunes_api.gemspec +2 -2
- data/lib/itunes_api/configuration.rb +3 -0
- data/lib/itunes_api/music/album.rb +2 -0
- data/lib/itunes_api/music/artist.rb +2 -0
- data/lib/itunes_api/music/requests/albums.rb +2 -0
- data/lib/itunes_api/music/requests/artist.rb +2 -0
- data/lib/itunes_api/music/requests/search.rb +2 -0
- data/lib/itunes_api/music/requests/songs.rb +2 -0
- data/lib/itunes_api/music/requests.rb +2 -0
- data/lib/itunes_api/music/results/album.rb +2 -1
- data/lib/itunes_api/music/results/artist.rb +2 -0
- data/lib/itunes_api/music/results/song.rb +3 -2
- data/lib/itunes_api/music/results.rb +2 -0
- data/lib/itunes_api/music/song.rb +2 -0
- data/lib/itunes_api/music.rb +2 -0
- data/lib/itunes_api/request.rb +2 -0
- data/lib/itunes_api/version.rb +3 -1
- data/lib/itunes_api.rb +3 -1
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9d619427a217649c40574e01b2318d7571561d836a8c1c2332746ee02689612e
|
|
4
|
+
data.tar.gz: 26115cc1ac22837f4f5aeb431e53fa6f6b006c0795e32039c88974a6db73a11b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b47579f3815b43410cc643d161105986d3498cfde0c7bf1187e9c37af52c50cff33c7d77f93e47e070a9e1c493143d99754cae3d0cd172cfde81dda00ffcd6d
|
|
7
|
+
data.tar.gz: 7384875e00282e6024fa3f26e2c0bbbc5392926f0c0e83bcf2636a67bfa62693aa8e723e0c346c28e2757476070e8cc27fafca6f62e013ced1fac899134279ac
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
jobs:
|
|
3
|
+
build:
|
|
4
|
+
docker:
|
|
5
|
+
- image: circleci/ruby:2.5.1-node-browsers
|
|
6
|
+
|
|
7
|
+
working_directory: ~/repo
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- checkout
|
|
11
|
+
|
|
12
|
+
- restore_cache:
|
|
13
|
+
keys:
|
|
14
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
15
|
+
- v1-dependencies-
|
|
16
|
+
|
|
17
|
+
- run:
|
|
18
|
+
name: install dependencies
|
|
19
|
+
command: |
|
|
20
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
21
|
+
|
|
22
|
+
- save_cache:
|
|
23
|
+
paths:
|
|
24
|
+
- ./vendor/bundle
|
|
25
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
26
|
+
|
|
27
|
+
- run:
|
|
28
|
+
name: run tests
|
|
29
|
+
command: |
|
|
30
|
+
mkdir /tmp/test-results
|
|
31
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
|
32
|
+
|
|
33
|
+
bundle exec rspec --format progress \
|
|
34
|
+
--out /tmp/test-results/rspec.xml \
|
|
35
|
+
--format progress \
|
|
36
|
+
$TEST_FILES
|
|
37
|
+
|
|
38
|
+
- store_test_results:
|
|
39
|
+
path: /tmp/test-results
|
|
40
|
+
- store_artifacts:
|
|
41
|
+
path: /tmp/test-results
|
|
42
|
+
destination: test-results
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
|
File without changes
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
DisplayCopNames: true
|
|
3
|
+
Exclude:
|
|
4
|
+
- bin/**/*
|
|
5
|
+
- vendor/**/*
|
|
6
|
+
TargetRubyVersion: 2.5.1
|
|
7
|
+
|
|
8
|
+
Metrics/BlockLength:
|
|
9
|
+
Exclude:
|
|
10
|
+
- '**/*_spec.rb'
|
|
11
|
+
|
|
12
|
+
Metrics/MethodLength:
|
|
13
|
+
Max: 15
|
|
14
|
+
|
|
15
|
+
Metrics/LineLength:
|
|
16
|
+
Max: 100
|
|
17
|
+
|
|
18
|
+
Metrics/ModuleLength:
|
|
19
|
+
Exclude:
|
|
20
|
+
- '**/*_spec.rb'
|
|
21
|
+
|
|
22
|
+
Style/FrozenStringLiteralComment:
|
|
23
|
+
Exclude:
|
|
24
|
+
- '**/*_spec.rb'
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.5.1
|
data/CODE_OF_CONDUCT.md
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
itunes_api (2.3.2)
|
|
5
|
+
faraday
|
|
6
|
+
selfies
|
|
7
|
+
|
|
8
|
+
GEM
|
|
9
|
+
remote: https://rubygems.org/
|
|
10
|
+
specs:
|
|
11
|
+
ast (2.4.0)
|
|
12
|
+
diff-lcs (1.3)
|
|
13
|
+
faraday (0.15.2)
|
|
14
|
+
multipart-post (>= 1.2, < 3)
|
|
15
|
+
jaro_winkler (1.5.1)
|
|
16
|
+
multipart-post (2.0.0)
|
|
17
|
+
parallel (1.12.1)
|
|
18
|
+
parser (2.5.1.0)
|
|
19
|
+
ast (~> 2.4.0)
|
|
20
|
+
powerpack (0.1.2)
|
|
21
|
+
rainbow (3.0.0)
|
|
22
|
+
rake (12.3.1)
|
|
23
|
+
rspec (3.7.0)
|
|
24
|
+
rspec-core (~> 3.7.0)
|
|
25
|
+
rspec-expectations (~> 3.7.0)
|
|
26
|
+
rspec-mocks (~> 3.7.0)
|
|
27
|
+
rspec-core (3.7.1)
|
|
28
|
+
rspec-support (~> 3.7.0)
|
|
29
|
+
rspec-expectations (3.7.0)
|
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
31
|
+
rspec-support (~> 3.7.0)
|
|
32
|
+
rspec-mocks (3.7.0)
|
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
34
|
+
rspec-support (~> 3.7.0)
|
|
35
|
+
rspec-support (3.7.1)
|
|
36
|
+
rubocop (0.57.2)
|
|
37
|
+
jaro_winkler (~> 1.5.1)
|
|
38
|
+
parallel (~> 1.10)
|
|
39
|
+
parser (>= 2.5)
|
|
40
|
+
powerpack (~> 0.1)
|
|
41
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
42
|
+
ruby-progressbar (~> 1.7)
|
|
43
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
44
|
+
ruby-progressbar (1.9.0)
|
|
45
|
+
selfies (1.4.2)
|
|
46
|
+
unicode-display_width (1.4.0)
|
|
47
|
+
vcr (4.0.0)
|
|
48
|
+
|
|
49
|
+
PLATFORMS
|
|
50
|
+
ruby
|
|
51
|
+
|
|
52
|
+
DEPENDENCIES
|
|
53
|
+
bundler
|
|
54
|
+
itunes_api!
|
|
55
|
+
rake
|
|
56
|
+
rspec
|
|
57
|
+
rubocop
|
|
58
|
+
vcr
|
|
59
|
+
|
|
60
|
+
BUNDLED WITH
|
|
61
|
+
1.16.2
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ItunesApi
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/rb/itunes_api) [](https://badge.fury.io/rb/itunes_api) [](https://circleci.com/gh/mariodarco/itunes-api/tree/master) [](https://codeclimate.com/github/mariodarco/itunes-api/maintainability)
|
|
4
4
|
|
|
5
5
|
A simple interface for the Itunes Api.
|
|
6
6
|
|
|
@@ -94,7 +94,7 @@ ItunesApi::Music.find_albums_by_apple_id(265766061, :es)
|
|
|
94
94
|
Ruby version:
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
|
-
2.
|
|
97
|
+
2.5.1
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Fork the project, clone the repository and bundle:
|
data/Rakefile
CHANGED
data/itunes_api.gemspec
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ItunesApi
|
|
2
4
|
module Music
|
|
3
5
|
module Results
|
|
4
6
|
# Wrapper for song search results.
|
|
5
7
|
class Song
|
|
6
8
|
attr_reader_init :data, :store
|
|
7
|
-
private :data
|
|
8
9
|
|
|
9
10
|
def album
|
|
10
11
|
@album ||= data['collectionName']
|
|
@@ -70,7 +71,7 @@ module ItunesApi
|
|
|
70
71
|
private
|
|
71
72
|
|
|
72
73
|
def track_lenght(milliseconds)
|
|
73
|
-
if milliseconds.to_i
|
|
74
|
+
if milliseconds.to_i.positive?
|
|
74
75
|
minutes, milliseconds = milliseconds.divmod(1000 * 60)
|
|
75
76
|
seconds = milliseconds / 1000
|
|
76
77
|
"#{minutes}:#{seconds}"
|
data/lib/itunes_api/music.rb
CHANGED
data/lib/itunes_api/request.rb
CHANGED
data/lib/itunes_api/version.rb
CHANGED
data/lib/itunes_api.rb
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'selfies'
|
|
2
4
|
require 'itunes_api/configuration'
|
|
3
5
|
require 'itunes_api/music'
|
|
4
6
|
|
|
5
7
|
# Interface to the Itunes Api
|
|
6
8
|
module ItunesApi
|
|
7
|
-
BASE_URL = 'https://itunes.apple.com'
|
|
9
|
+
BASE_URL = 'https://itunes.apple.com'
|
|
8
10
|
LIMIT = 200
|
|
9
11
|
|
|
10
12
|
def self.configure
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: itunes_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario D’Arco
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -115,10 +115,14 @@ executables: []
|
|
|
115
115
|
extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
|
+
- ".circleci/config.yml"
|
|
118
119
|
- ".gitignore"
|
|
119
120
|
- ".rspec"
|
|
121
|
+
- ".rubocop.yml"
|
|
122
|
+
- ".ruby-version"
|
|
120
123
|
- CODE_OF_CONDUCT.md
|
|
121
124
|
- Gemfile
|
|
125
|
+
- Gemfile.lock
|
|
122
126
|
- LICENSE.txt
|
|
123
127
|
- README.md
|
|
124
128
|
- Rakefile
|
|
@@ -163,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
167
|
version: '0'
|
|
164
168
|
requirements: []
|
|
165
169
|
rubyforge_project:
|
|
166
|
-
rubygems_version: 2.6
|
|
170
|
+
rubygems_version: 2.7.6
|
|
167
171
|
signing_key:
|
|
168
172
|
specification_version: 4
|
|
169
173
|
summary: iTunes Api
|