apple_music 0.3.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53da4d8f4beda9db38c165a12f5dc25b4941cef9d412c10ec27687c26bdda481
4
- data.tar.gz: 6f168c26bf0137c25aa37311f39ea562aea942a0f8128400c355ec1a0fafb451
3
+ metadata.gz: 5ba3c63773f205159b6abf9fe9a39966cb19bba7aaa916267dfc478c948fe97d
4
+ data.tar.gz: 8197806169f527c68bb1da49f5cd8af196942a8d2b086794a02d11182d20723f
5
5
  SHA512:
6
- metadata.gz: 9c2c4ca26b493bc697db16d9e7c7affb965e0821c6cd472c3bc6928297f9697dd1b9bbc4493f082ae185089a6b61d40da0c831c9b39dec87f30c20ab5e9c5850
7
- data.tar.gz: 3dd7b64393d2798c815fbbce73e93655cde9fa85160646073b7a6d50a499954f72d275e0366e2327e6060940756727c36707df2012001f8cd2e02c1dca0fefd4
6
+ metadata.gz: 2c0d318eb986eb543da0b472d2f6f0d8db6882dd9124d5b8e0fcd5ba6f63d46998e95ca2252cd42746f4e0fa7322462bcb12ca43a923c34912224a03ce1365bb
7
+ data.tar.gz: ae18e5b23d13adf3edc2d9fec07f6e79da052265a630b0820376c7613007b30b14ec5b4be3e9eee41db89461656b624f27ea551e1c3a19f7871353dc6e5ba628
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apple_music (0.3.0)
4
+ apple_music (0.3.1)
5
5
  faraday
6
6
  faraday_middleware
7
7
  jwt (>= 2.2)
@@ -13,7 +13,7 @@ GEM
13
13
  coderay (1.1.3)
14
14
  diff-lcs (1.4.4)
15
15
  dotenv (2.7.6)
16
- faraday (1.5.1)
16
+ faraday (1.7.0)
17
17
  faraday-em_http (~> 1.0)
18
18
  faraday-em_synchrony (~> 1.0)
19
19
  faraday-excon (~> 1.1)
@@ -21,6 +21,7 @@ GEM
21
21
  faraday-net_http (~> 1.0)
22
22
  faraday-net_http_persistent (~> 1.1)
23
23
  faraday-patron (~> 1.0)
24
+ faraday-rack (~> 1.0)
24
25
  multipart-post (>= 1.2, < 3)
25
26
  ruby2_keywords (>= 0.0.4)
26
27
  faraday-em_http (1.0.0)
@@ -30,7 +31,8 @@ GEM
30
31
  faraday-net_http (1.0.1)
31
32
  faraday-net_http_persistent (1.2.0)
32
33
  faraday-patron (1.0.0)
33
- faraday_middleware (1.0.0)
34
+ faraday-rack (1.0.0)
35
+ faraday_middleware (1.1.0)
34
36
  faraday (~> 1.0)
35
37
  jwt (2.2.3)
36
38
  method_source (1.0.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module AppleMusic
4
4
  class Song < Resource
5
- # https://developer.apple.com/documentation/applemusicapi/song/attributes
5
+ # https://developer.apple.com/documentation/applemusicapi/songs/attributes
6
6
  class Attributes
7
7
  attr_reader :album_name, :artist_name, :artwork, :composer_name,
8
8
  :content_rating, :disc_number, :duration_in_millis,
@@ -27,7 +27,11 @@ module AppleMusic
27
27
  @name = props['name'] # required
28
28
  @play_params = PlayParameters.new(props['playParams']) if props['playParams']
29
29
  @previews = Array(props['previews']).map { |attrs| Preview.new(attrs) } # required
30
- @release_date = Date.parse(props['releaseDate']) # required
30
+ @release_date = begin
31
+ props['releaseDate'].nil? ? nil : Date.parse(props['releaseDate'])
32
+ rescue ArgumentError
33
+ Date.parse("#{props['releaseDate']}/01/01")
34
+ end
31
35
  @track_number = props['trackNumber'] # required
32
36
  @url = props['url'] # required
33
37
  @work_name = props['workName']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppleMusic
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_music
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-31 00:00:00.000000000 Z
11
+ date: 2021-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday