itunes-client 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/itunes/track.rb +1 -1
- data/lib/itunes/version.rb +1 -1
- data/scripts/track/convert.scpt +2 -1
- data/spec/itunes/track_spec.rb +4 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79c089f2ddb09b0aa2309fe3f3402f6e329c2d7d
|
4
|
+
data.tar.gz: ab12e3c68a3f6a170c431cd0ee18ff7b1ddb62a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d7b9346b6d7094eef7a595095eb441d8818137d3cb45b3e91c55d36e106b9ba95342998ab00a23aaedc584f1c7c21660e132b6d10601dcf19c87904990b0f08
|
7
|
+
data.tar.gz: 0890c651c6994ea78f94d9397366899b42a07283428aaec02e7a0631f7bd17f2f62c6fc141ecc5945dfff3db251b7b46e25b636a35a8be37e08ca4b0287057be
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0-
|
1
|
+
2.0.0-p247
|
data/lib/itunes/track.rb
CHANGED
@@ -35,7 +35,7 @@ module Itunes
|
|
35
35
|
|
36
36
|
def convert
|
37
37
|
converted_persistent_id = execute_script('track/convert.scpt', self.persistent_id)
|
38
|
-
Track.find_by(persistent_id: converted_persistent_id)
|
38
|
+
Track.find_by(persistent_id: converted_persistent_id).first
|
39
39
|
end
|
40
40
|
|
41
41
|
def delete!
|
data/lib/itunes/version.rb
CHANGED
data/scripts/track/convert.scpt
CHANGED
@@ -4,7 +4,8 @@ on run argv
|
|
4
4
|
set specified_track to (some track whose persistent ID is persistent_id)
|
5
5
|
set loc to (get location of specified_track)
|
6
6
|
|
7
|
-
set
|
7
|
+
set converted_tracks to (convert specified_track)
|
8
|
+
set converted_track to item 1 of converted_tracks
|
8
9
|
return persistent ID of converted_track
|
9
10
|
end tell
|
10
11
|
end run
|
data/spec/itunes/track_spec.rb
CHANGED
@@ -40,11 +40,10 @@ describe Track do
|
|
40
40
|
and_return([Track.new(persistent_id: new_persistent_id)])
|
41
41
|
end
|
42
42
|
|
43
|
-
it 'returns
|
44
|
-
|
45
|
-
expect(
|
46
|
-
expect(
|
47
|
-
expect(converted_tracks.first.persistent_id).to eq(new_persistent_id)
|
43
|
+
it 'returns a new Track' do
|
44
|
+
converted_track = convert
|
45
|
+
expect(converted_track).to be_a(Track)
|
46
|
+
expect(converted_track.persistent_id).to eq(new_persistent_id)
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itunes-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryo katsuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.0.
|
210
|
+
rubygems_version: 2.0.3
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: itunes-client provides a high level API like ActiveRecord style to control
|