kagu 3.0.8 → 3.0.9

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
  SHA256:
3
- metadata.gz: b355e1695a595ac116348aa70cbcbd5d1591b1b34a51dd48bef1f14dcb9730d3
4
- data.tar.gz: 4458cf6d141c8d5283e523f4f825f4d27330bb52c0e070a79b4a0b19cb14ab19
3
+ metadata.gz: c2b1c6ebb0b79f29eba4fe24a7dd3d79296ae91f0bbea0fb0fc7983bf835e281
4
+ data.tar.gz: ca3eccc89f387079b124934601b42d55189caeb21655dcc2ba10b4925229cf44
5
5
  SHA512:
6
- metadata.gz: e71780571d00451ec224935eb244c995e770e41616ec5e5044d39faea246505d7089fe0e43018aef26f20286cd9ece3067ad974d347abba2822b57bcf4edb18d
7
- data.tar.gz: 7e461e4b59b08fc8aec096ca3c7802aefc780cd3a25c530135734ea5bb0d39267254734e35567e7dcdbe3b7088d39b42b8d6b46bd909363f7c0b5bb02e84ed44
6
+ metadata.gz: 9342fa71cbb60dc112d72a1578b1f0e08efe82bf2fcbafe90a3bf5bf1fb481bb5cc46df116227a5fea2076f68697dcc6bcc4eb695011acdab9b17a52ff0b7e58
7
+ data.tar.gz: bf93af997250a6721bce474f3004a15721245d21ca0d8efd8d47144fc3a374b3eb46695a7b249c4c0546daad8f95be8163db80db19a9e770726d470518ed2264
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.8
1
+ 3.0.9
@@ -7,7 +7,7 @@ module Kagu
7
7
  send("#{name}=", value) if respond_to?("#{name}=", true)
8
8
  end
9
9
  self.class.const_get(:MANDATORY_ATTRIBUTES).each do |attribute|
10
- raise Error.new("#{self.class}##{attribute} is mandatory") if send(attribute).nil?
10
+ raise Error.new("#{self.class}##{attribute} is mandatory for #{inspect}") if send(attribute).nil?
11
11
  end
12
12
  end
13
13
 
@@ -77,11 +77,15 @@ module Kagu
77
77
 
78
78
  def path=(value)
79
79
  value = value.to_s.presence
80
- value = URI.unescape(URI.parse(value).path) if value.is_a?(String) && value.starts_with?('file://')
81
- value = value.encode('UTF-8', 'UTF-8-MAC') if Kagu::IS_MAC_OS
82
- @path = Pathname.new(value)
83
- raise Error.new("No such file: #{path.to_s.inspect}") if path.exist? && !exists?
84
- Kagu.logger.error('Kagu') { "No such track: #{path.inspect}" } unless exists?
80
+ value = URI.unescape(URI.parse(value).path).presence if value.is_a?(String) && value.starts_with?('file://')
81
+ value = value.encode('UTF-8', 'UTF-8-MAC') if value.present? && Kagu::IS_MAC_OS
82
+ if value.present?
83
+ @path = Pathname.new(value)
84
+ raise Error.new("No such file: #{path.to_s.inspect}") if path.exist? && !exists?
85
+ Kagu.logger.error('Kagu') { "No such track: #{path.inspect}" } unless exists?
86
+ else
87
+ @path = nil
88
+ end
85
89
  end
86
90
 
87
91
  def title=(value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kagu
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Toulotte
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -134,7 +134,7 @@ homepage: https://github.com/alexistoulotte/kagu
134
134
  licenses:
135
135
  - MIT
136
136
  metadata: {}
137
- post_install_message:
137
+ post_install_message:
138
138
  rdoc_options: []
139
139
  require_paths:
140
140
  - lib
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubygems_version: 3.0.3
153
- signing_key:
153
+ signing_key:
154
154
  specification_version: 4
155
155
  summary: API for macOS Music
156
156
  test_files: []