daapclient 0.2.2 → 0.2.3
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.
- data/{CHANGELOG → CHANGELOG.txt} +6 -0
- data/{EXAMPLES → EXAMPLES.txt} +0 -0
- data/{LICENSE → LICENSE.txt} +0 -0
- data/Manifest.txt +42 -0
- data/{NOTES → NOTES.txt} +0 -0
- data/{README → README.txt} +6 -11
- data/Rakefile +46 -0
- data/eg/dl_simple.rb +28 -0
- data/eg/dl_songs.rb +37 -0
- data/eg/dl_target.rb +14 -0
- data/eg/show_artists.rb +14 -0
- data/eg/show_playlists.rb +17 -0
- data/eg/show_songs.rb +16 -0
- data/lib/net/daap.rb +24 -21
- data/lib/net/daap/song.rb +1 -1
- data/test/mock_server.rb +12 -6
- data/test/{tc_artists.rb → test_artists.rb} +2 -0
- data/test/{tc_client.rb → test_client.rb} +2 -0
- data/test/{tc_download.rb → test_download.rb} +2 -0
- data/test/{tc_playlist.rb → test_playlist.rb} +2 -0
- data/test/{tc_protocol.rb → test_protocol.rb} +4 -1
- metadata +82 -73
- data/test/test_daap.rb +0 -23
- data/test/ts_daap.rb +0 -14
data/{CHANGELOG → CHANGELOG.txt}
RENAMED
@@ -1,5 +1,11 @@
|
|
1
1
|
= Net::DAAP::Client Changelog
|
2
2
|
|
3
|
+
== 0.2.3
|
4
|
+
|
5
|
+
* Added logging optimizations
|
6
|
+
* Applied patch for connection bug [#5885]. Thanks to Rune Hammersland
|
7
|
+
* Added test for nil file name. patch [#8482] Thanks Jamie Wilkinson!
|
8
|
+
|
3
9
|
== 0.2.2
|
4
10
|
|
5
11
|
* Added Net::DAAP::Song#save which will automatically save files for you
|
data/{EXAMPLES → EXAMPLES.txt}
RENAMED
File without changes
|
data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|
data/Manifest.txt
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
CHANGELOG.txt
|
2
|
+
EXAMPLES.txt
|
3
|
+
LICENSE.txt
|
4
|
+
Manifest.txt
|
5
|
+
NOTES.txt
|
6
|
+
README.txt
|
7
|
+
Rakefile
|
8
|
+
eg/dl_simple.rb
|
9
|
+
eg/dl_songs.rb
|
10
|
+
eg/dl_target.rb
|
11
|
+
eg/show_artists.rb
|
12
|
+
eg/show_playlists.rb
|
13
|
+
eg/show_songs.rb
|
14
|
+
lib/net/daap.rb
|
15
|
+
lib/net/daap/album.rb
|
16
|
+
lib/net/daap/artist.rb
|
17
|
+
lib/net/daap/daap_version.rb
|
18
|
+
lib/net/daap/database.rb
|
19
|
+
lib/net/daap/dmap.rb
|
20
|
+
lib/net/daap/playlist.rb
|
21
|
+
lib/net/daap/song.rb
|
22
|
+
lib/net/daap/speed_hacks.rb
|
23
|
+
test/data/mt-daapd/02dd88de4b3a69c74bcc56c1acca9ae5.txt
|
24
|
+
test/data/mt-daapd/0de583b288d8ae30f89acb26d4c8535b.txt
|
25
|
+
test/data/mt-daapd/4146ec82a0f0a638db9293a0c2039e6b.txt
|
26
|
+
test/data/mt-daapd/51a2a6f2a53743bec7e79fe0d074dd28.txt
|
27
|
+
test/data/mt-daapd/6069971903eef3c8c71ec2c7b395bfeb.txt
|
28
|
+
test/data/mt-daapd/7102a16e834342b8264f1fb5226690e5.txt
|
29
|
+
test/data/mt-daapd/9d29fb31969da7757fa2f4baa3a52fe9.txt
|
30
|
+
test/data/mt-daapd/a52dd33cc99471cc156528c06b22e709.txt
|
31
|
+
test/data/mt-daapd/a600829e59b3d719b32f25323a2719b0.txt
|
32
|
+
test/data/mt-daapd/e2552df8d742fe31d6cc6e1e41e496b3.txt
|
33
|
+
test/data/mt-daapd/fc631aa54b83344df9ccf1fbaa7684b0.txt
|
34
|
+
test/data/song_data.txt
|
35
|
+
test/data/song_structure.txt
|
36
|
+
test/mock_server.rb
|
37
|
+
test/server_saver.rb
|
38
|
+
test/test_artists.rb
|
39
|
+
test/test_client.rb
|
40
|
+
test/test_download.rb
|
41
|
+
test/test_playlist.rb
|
42
|
+
test/test_protocol.rb
|
data/{NOTES → NOTES.txt}
RENAMED
File without changes
|
data/{README → README.txt}
RENAMED
@@ -1,21 +1,13 @@
|
|
1
1
|
= Net::DAAP
|
2
2
|
|
3
|
-
|
3
|
+
http://daapclient.rubyforge.org/
|
4
4
|
|
5
|
-
|
6
|
-
can be found here[http://search.cpan.org/~rclamp/].
|
5
|
+
== DESCRIPTION
|
7
6
|
|
8
|
-
|
7
|
+
This library is used for browsing iTunes DAAP servers.
|
9
8
|
|
10
9
|
== Installation
|
11
10
|
|
12
|
-
Make sure that Digest::M4P is installed before using this package. Digest::M4P
|
13
|
-
is available on the daap client ruby forge site here[http://rubyforge.org/frs/?group_id=1155].
|
14
|
-
|
15
|
-
Digest::M4P has not been turned in to a Ruby gem as of this writing.
|
16
|
-
|
17
|
-
After that, just install the gem:
|
18
|
-
|
19
11
|
sudo gem install daapclient
|
20
12
|
|
21
13
|
Also, check out the project page here[http://rubyforge.org/projects/daapclient].
|
@@ -29,6 +21,9 @@ See the EXAMPLES[link://files/EXAMPLES.html] file
|
|
29
21
|
The library is mostly a port of the Perl library, and owes most of its
|
30
22
|
communication logic to the original Perl version by Richard Clamp.
|
31
23
|
|
24
|
+
Most of this is based off the work in the perl version by Richard Clamp which
|
25
|
+
can be found here[http://search.cpan.org/~rclamp/].
|
26
|
+
|
32
27
|
== Author
|
33
28
|
|
34
29
|
This Ruby version is Copyright (c) Aaron Patterson 2005
|
data/Rakefile
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'hoe'
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
|
5
|
+
require 'net/daap'
|
6
|
+
|
7
|
+
class DAAPHoe < Hoe
|
8
|
+
def define_tasks
|
9
|
+
super
|
10
|
+
|
11
|
+
desc "Tag code"
|
12
|
+
task :tag do |p|
|
13
|
+
abort "Must supply VERSION=x.y.z" unless ENV['VERSION']
|
14
|
+
v = ENV['VERSION'].gsub(/\./, '_')
|
15
|
+
|
16
|
+
rf = RubyForge.new
|
17
|
+
user = rf.userconfig['username']
|
18
|
+
|
19
|
+
baseurl = "svn+ssh://#{user}@rubyforge.org//var/svn/#{name}/daap"
|
20
|
+
sh "svn cp -m 'tagged REL-#{v}' . #{ baseurl }/tags/REL-#{ v }"
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Branch code"
|
24
|
+
Rake::Task.define_task("branch") do |p|
|
25
|
+
abort "Must supply VERSION=x.y.z" unless ENV['VERSION']
|
26
|
+
v = ENV['VERSION'].split(/\./)[0..1].join('_')
|
27
|
+
|
28
|
+
rf = RubyForge.new
|
29
|
+
user = rf.userconfig['username']
|
30
|
+
|
31
|
+
baseurl = "svn+ssh://#{user}@rubyforge.org/var/svn/#{name}"
|
32
|
+
sh "svn cp -m'branched #{v}' #{baseurl}/trunk #{baseurl}/branches/RB-#{v}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
DAAPHoe.new('daapclient', Net::DAAP::VERSION) do |p|
|
38
|
+
p.rubyforge_name = 'daapclient'
|
39
|
+
p.author = 'Aaron Patterson'
|
40
|
+
p.email = 'aaronp@rubyforge.org'
|
41
|
+
p.summary = "Net::DAAP::Client is an iTunes share client."
|
42
|
+
p.description = p.paragraphs_of('README.txt', 3).join("\n\n")
|
43
|
+
p.url = p.paragraphs_of('README.txt', 1).first.strip
|
44
|
+
p.changes = p.paragraphs_of('CHANGELOG.txt', 0..2).join("\n\n")
|
45
|
+
p.extra_deps = ['digest-m4p']
|
46
|
+
end
|
data/eg/dl_simple.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'net/daap'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
daap = Net::DAAP::Client.new(ARGV[0])
|
7
|
+
|
8
|
+
daap.connect do |dsn|
|
9
|
+
daap.databases do |db|
|
10
|
+
puts "All songs in the database"
|
11
|
+
db.songs do |song|
|
12
|
+
bool = false
|
13
|
+
if ARGV.find { |f| song.artist.name =~ /#{f}/ }
|
14
|
+
bool = true
|
15
|
+
end
|
16
|
+
next unless bool
|
17
|
+
filename = "#{song.artist} - #{song.name}.#{song.format}"
|
18
|
+
directory = "db/#{song.album}"
|
19
|
+
FileUtils::mkdir_p(directory)
|
20
|
+
|
21
|
+
File.open("#{directory}/#{filename}", "w") do |f|
|
22
|
+
song.get do |str|
|
23
|
+
f.write str
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/eg/dl_songs.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'net/daap'
|
5
|
+
require 'fileutils'
|
6
|
+
require 'calibre/progressbar'
|
7
|
+
|
8
|
+
daap = Net::DAAP::Client.new(ARGV[0])
|
9
|
+
|
10
|
+
daap.connect do |dsn|
|
11
|
+
daap.databases.each do |db|
|
12
|
+
puts "All songs in the database"
|
13
|
+
db.songs.each do |song|
|
14
|
+
bool = false
|
15
|
+
if ARGV.find { |f| song.artist.name =~ /#{f}/ }
|
16
|
+
bool = true
|
17
|
+
end
|
18
|
+
next unless bool
|
19
|
+
filename = "#{song.artist} - #{song.name}.#{song.format}"
|
20
|
+
directory = "db/#{song.album.name.gsub(/\//, '_')}"
|
21
|
+
FileUtils::mkdir_p(directory)
|
22
|
+
|
23
|
+
File.open("#{directory}/#{filename.gsub(/\//, '_')}", "w") do |f|
|
24
|
+
bar = Console::ProgressBar.new("#{song.name}", song.size)
|
25
|
+
so_far = 0
|
26
|
+
begin
|
27
|
+
song.get do |str|
|
28
|
+
f.write str
|
29
|
+
bar.set so_far += str.length
|
30
|
+
end
|
31
|
+
bar.finish
|
32
|
+
rescue
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/eg/dl_target.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'net/daap'
|
5
|
+
require 'net/daap/speed_hacks'
|
6
|
+
|
7
|
+
daap = Net::DAAP::Client.new(ARGV[0])
|
8
|
+
daap.connect_db { |db|
|
9
|
+
db.songs.each { |song|
|
10
|
+
next unless song.artist.name =~ /Dre/
|
11
|
+
puts "#{song.artist.name} - #{song.name}"
|
12
|
+
song.save('db')
|
13
|
+
}
|
14
|
+
}
|
data/eg/show_artists.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'net/daap'
|
5
|
+
|
6
|
+
daap = Net::DAAP::Client.new(ARGV[0], :password => ARGV[1])
|
7
|
+
|
8
|
+
daap.connect do |dsn|
|
9
|
+
daap.databases do |db|
|
10
|
+
db.artists.sort.each do |artist|
|
11
|
+
puts "#{artist.name}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'net/daap'
|
4
|
+
|
5
|
+
daap = Net::DAAP::Client.new('localhost')
|
6
|
+
|
7
|
+
daap.connect do |dsn|
|
8
|
+
daap.databases do |db|
|
9
|
+
puts "List songs for each playlist"
|
10
|
+
db.playlists do |pl|
|
11
|
+
puts "Playlist name: #{pl.name}"
|
12
|
+
pl.songs do |song|
|
13
|
+
puts " #{song.artist} - #{song.name}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/eg/show_songs.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'net/daap'
|
5
|
+
|
6
|
+
daap = Net::DAAP::Client.new('localhost') { |a| a.log = Logger.new(STDERR) }
|
7
|
+
|
8
|
+
daap.connect do |dsn|
|
9
|
+
daap.databases do |db|
|
10
|
+
puts "All songs in the database"
|
11
|
+
db.songs do |song|
|
12
|
+
filename = "#{song.artist} - #{song}.#{song.format}"
|
13
|
+
puts "#{song.album}/#{filename}(#{song.size})"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/net/daap.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'digest/m4p'
|
3
3
|
require 'digest/md5'
|
4
|
-
require 'logger'
|
5
4
|
require 'net/daap/dmap'
|
6
5
|
require 'net/daap/artist'
|
7
6
|
require 'net/daap/album'
|
@@ -44,6 +43,7 @@ module Net
|
|
44
43
|
# end
|
45
44
|
#
|
46
45
|
module DAAP
|
46
|
+
VERSION = '0.2.3'
|
47
47
|
|
48
48
|
# = Synopsis
|
49
49
|
# The Client class interacts with the iTunes server to fetch lists of songs,
|
@@ -61,27 +61,26 @@ module Net
|
|
61
61
|
@server_port = params[:port]
|
62
62
|
@password = params[:password]
|
63
63
|
@validator = nil
|
64
|
-
@log =
|
64
|
+
@log = nil
|
65
65
|
@session_id = nil
|
66
66
|
@request_id = nil
|
67
|
-
@connected =
|
67
|
+
@connected = false
|
68
68
|
yield self if block_given?
|
69
69
|
end
|
70
70
|
|
71
71
|
# Connects to the iTunes server. This method should be called right after
|
72
72
|
# construction. See DAAP for an example.
|
73
73
|
def connect
|
74
|
-
|
74
|
+
log.info("Connecting to #{@server_host}:#{@server_port}") if log
|
75
75
|
@http_client = Net::HTTP.start(@server_host, @server_port)
|
76
76
|
find_validator
|
77
77
|
@dmap = Net::DAAP::DMAP.new(:daap => self)
|
78
78
|
load_server_info
|
79
|
-
|
80
|
-
@connected =
|
79
|
+
log.info("Now connected") if log
|
80
|
+
@connected = true
|
81
81
|
if block_given?
|
82
82
|
yield @dsn
|
83
83
|
disconnect
|
84
|
-
@connected = 0
|
85
84
|
end
|
86
85
|
@dsn
|
87
86
|
end
|
@@ -91,15 +90,18 @@ module Net
|
|
91
90
|
def connect_db(&block)
|
92
91
|
raise ArgumentError if block.nil?
|
93
92
|
connect
|
94
|
-
|
95
|
-
|
93
|
+
begin
|
94
|
+
databases.each { |db| block.call(db) }
|
95
|
+
ensure
|
96
|
+
disconnect
|
97
|
+
end
|
96
98
|
end
|
97
99
|
|
98
100
|
# Returns the databases found on the iTunes server.
|
99
101
|
def databases
|
100
102
|
unless @connected
|
101
103
|
errstr = "Not connected, can't fetch databases"
|
102
|
-
|
104
|
+
log.error(errstr) if log
|
103
105
|
raise errstr
|
104
106
|
end
|
105
107
|
|
@@ -119,7 +121,7 @@ module Net
|
|
119
121
|
end
|
120
122
|
|
121
123
|
def do_get(request, &block)
|
122
|
-
|
124
|
+
log.debug("do_get called") if log
|
123
125
|
url = String.new('/' + request)
|
124
126
|
if @session_id
|
125
127
|
url += url =~ /\?/ ? "&" : "?"
|
@@ -129,7 +131,7 @@ module Net
|
|
129
131
|
#if @revision && request != "logout"
|
130
132
|
# url += "&revision-number=#{@revision}"
|
131
133
|
#end
|
132
|
-
|
134
|
+
log.debug("Fetching url: #{url}") if log
|
133
135
|
|
134
136
|
req = Net::HTTP::Get.new(url, request_headers(url))
|
135
137
|
req.basic_auth('iTunes_4.6', @password) if ! @password.nil?
|
@@ -140,11 +142,11 @@ module Net
|
|
140
142
|
case res
|
141
143
|
when Net::HTTPSuccess
|
142
144
|
else
|
143
|
-
|
145
|
+
log.error("This DAAP Server requires a password") if log
|
144
146
|
res.error!
|
145
147
|
end
|
146
148
|
|
147
|
-
|
149
|
+
log.debug("Done Fetching url: #{url}") if log
|
148
150
|
|
149
151
|
content_type = res.header['content-type']
|
150
152
|
if request !~ /(?:\/items\/\d+\.|logout)/ && content_type !~ /dmap/
|
@@ -155,7 +157,7 @@ module Net
|
|
155
157
|
end
|
156
158
|
|
157
159
|
def get_song(request, &block)
|
158
|
-
|
160
|
+
log.debug("Downloading a song") if log
|
159
161
|
@request_id = @request_id.nil? ? 2 : @request_id + 1
|
160
162
|
do_get(request, &block)
|
161
163
|
end
|
@@ -172,8 +174,9 @@ module Net
|
|
172
174
|
|
173
175
|
# Disconnects from the DAAP server
|
174
176
|
def disconnect
|
175
|
-
|
177
|
+
log.info("Disconnecting") if log
|
176
178
|
do_get("logout")
|
179
|
+
@connected = false
|
177
180
|
end
|
178
181
|
|
179
182
|
private
|
@@ -181,10 +184,10 @@ module Net
|
|
181
184
|
flat_list = @dmap.flat_list(do_get("server-info"))
|
182
185
|
@dsn = flat_list['/dmap.serverinforesponse/dmap.itemname']
|
183
186
|
|
184
|
-
|
187
|
+
log.debug("Connected to share '#{@dsn}'") if log
|
185
188
|
@session_id = @dmap.find(do_get("login"),
|
186
189
|
"dmap.loginresponse/dmap.sessionid")
|
187
|
-
|
190
|
+
log.debug("My id is #{@session_id}") if log
|
188
191
|
@dsn
|
189
192
|
end
|
190
193
|
|
@@ -201,18 +204,18 @@ module Net
|
|
201
204
|
|
202
205
|
# Figure out what protocol version to use
|
203
206
|
def find_validator
|
204
|
-
|
207
|
+
log.info("Determining DAAP version") if log
|
205
208
|
res = @http_client.get('/server-info')
|
206
209
|
server = res.header['daap-server']
|
207
210
|
|
208
211
|
if server =~ /^iTunes\/4.2/
|
209
212
|
@validator = DAAPv2.new
|
210
|
-
|
213
|
+
log.info("Found DAAPv2") if log
|
211
214
|
end
|
212
215
|
|
213
216
|
if server =~ /^iTunes/
|
214
217
|
@validator = DAAPv3.new
|
215
|
-
|
218
|
+
log.info("Found DAAPv3") if log
|
216
219
|
end
|
217
220
|
end
|
218
221
|
end
|
data/lib/net/daap/song.rb
CHANGED
@@ -22,7 +22,7 @@ module Net
|
|
22
22
|
@daap = args[:daap]
|
23
23
|
@db = args[:db]
|
24
24
|
@path = [@artist.name, @album.name].collect { |name|
|
25
|
-
name.gsub(File::SEPARATOR, '_')
|
25
|
+
name.gsub(File::SEPARATOR, '_') unless name.nil?
|
26
26
|
}.join(File::SEPARATOR)
|
27
27
|
@file = "#{@name.gsub(File::SEPARATOR, '_')}.#{@format}"
|
28
28
|
end
|
data/test/mock_server.rb
CHANGED
@@ -24,17 +24,23 @@ module Net
|
|
24
24
|
end
|
25
25
|
|
26
26
|
class HTTP
|
27
|
-
|
28
|
-
allocate
|
29
|
-
end
|
30
|
-
|
27
|
+
alias :old_initialize :initialize
|
31
28
|
def initialize
|
32
29
|
end
|
33
30
|
|
34
|
-
|
35
|
-
|
31
|
+
class << self
|
32
|
+
alias :old_start :start
|
33
|
+
alias :old_new :new
|
34
|
+
def start(*args)
|
35
|
+
Net::HTTP.new
|
36
|
+
end
|
37
|
+
|
38
|
+
def new
|
39
|
+
allocate
|
40
|
+
end
|
36
41
|
end
|
37
42
|
|
43
|
+
alias :old_request :request
|
38
44
|
def request(req, &block)
|
39
45
|
get(req.url, block)
|
40
46
|
end
|
@@ -1,8 +1,11 @@
|
|
1
1
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
2
|
$:.unshift File.join(File.dirname(__FILE__), "..", "test")
|
3
3
|
|
4
|
-
|
4
|
+
|
5
|
+
require 'yaml'
|
6
|
+
require 'rubygems'
|
5
7
|
require 'net/daap'
|
8
|
+
require 'test/unit'
|
6
9
|
require 'digest/md5'
|
7
10
|
|
8
11
|
class DAAPProtocol_Test < Test::Unit::TestCase
|
metadata
CHANGED
@@ -1,99 +1,108 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: daapclient
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date:
|
6
|
+
version: 0.2.3
|
7
|
+
date: 2007-03-12 00:00:00 -07:00
|
8
8
|
summary: Net::DAAP::Client is an iTunes share client.
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email: aaronp@rubyforge.org
|
12
|
-
homepage: daapclient.rubyforge.org
|
12
|
+
homepage: http://daapclient.rubyforge.org/
|
13
13
|
rubyforge_project: daapclient
|
14
|
-
description:
|
14
|
+
description: This library is used for browsing iTunes DAAP servers.
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
27
26
|
signing_key:
|
28
27
|
cert_chain:
|
29
28
|
post_install_message:
|
30
29
|
authors:
|
31
|
-
|
30
|
+
- Aaron Patterson
|
32
31
|
files:
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
32
|
+
- CHANGELOG.txt
|
33
|
+
- EXAMPLES.txt
|
34
|
+
- LICENSE.txt
|
35
|
+
- Manifest.txt
|
36
|
+
- NOTES.txt
|
37
|
+
- README.txt
|
38
|
+
- Rakefile
|
39
|
+
- eg/dl_simple.rb
|
40
|
+
- eg/dl_songs.rb
|
41
|
+
- eg/dl_target.rb
|
42
|
+
- eg/show_artists.rb
|
43
|
+
- eg/show_playlists.rb
|
44
|
+
- eg/show_songs.rb
|
45
|
+
- lib/net/daap.rb
|
46
|
+
- lib/net/daap/album.rb
|
47
|
+
- lib/net/daap/artist.rb
|
48
|
+
- lib/net/daap/daap_version.rb
|
49
|
+
- lib/net/daap/database.rb
|
50
|
+
- lib/net/daap/dmap.rb
|
51
|
+
- lib/net/daap/playlist.rb
|
52
|
+
- lib/net/daap/song.rb
|
53
|
+
- lib/net/daap/speed_hacks.rb
|
54
|
+
- test/data/mt-daapd/02dd88de4b3a69c74bcc56c1acca9ae5.txt
|
55
|
+
- test/data/mt-daapd/0de583b288d8ae30f89acb26d4c8535b.txt
|
56
|
+
- test/data/mt-daapd/4146ec82a0f0a638db9293a0c2039e6b.txt
|
57
|
+
- test/data/mt-daapd/51a2a6f2a53743bec7e79fe0d074dd28.txt
|
58
|
+
- test/data/mt-daapd/6069971903eef3c8c71ec2c7b395bfeb.txt
|
59
|
+
- test/data/mt-daapd/7102a16e834342b8264f1fb5226690e5.txt
|
60
|
+
- test/data/mt-daapd/9d29fb31969da7757fa2f4baa3a52fe9.txt
|
61
|
+
- test/data/mt-daapd/a52dd33cc99471cc156528c06b22e709.txt
|
62
|
+
- test/data/mt-daapd/a600829e59b3d719b32f25323a2719b0.txt
|
63
|
+
- test/data/mt-daapd/e2552df8d742fe31d6cc6e1e41e496b3.txt
|
64
|
+
- test/data/mt-daapd/fc631aa54b83344df9ccf1fbaa7684b0.txt
|
65
|
+
- test/data/song_data.txt
|
66
|
+
- test/data/song_structure.txt
|
67
|
+
- test/mock_server.rb
|
68
|
+
- test/server_saver.rb
|
69
|
+
- test/test_artists.rb
|
70
|
+
- test/test_client.rb
|
71
|
+
- test/test_download.rb
|
72
|
+
- test/test_playlist.rb
|
73
|
+
- test/test_protocol.rb
|
73
74
|
test_files:
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
- CHANGELOG
|
84
|
-
- EXAMPLES
|
85
|
-
- NOTES
|
75
|
+
- test/test_artists.rb
|
76
|
+
- test/test_client.rb
|
77
|
+
- test/test_download.rb
|
78
|
+
- test/test_playlist.rb
|
79
|
+
- test/test_protocol.rb
|
80
|
+
rdoc_options: []
|
81
|
+
|
82
|
+
extra_rdoc_files: []
|
83
|
+
|
86
84
|
executables: []
|
85
|
+
|
87
86
|
extensions: []
|
87
|
+
|
88
88
|
requirements: []
|
89
|
+
|
89
90
|
dependencies:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: digest-m4p
|
93
|
+
version_requirement:
|
94
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.0.0
|
99
|
+
version:
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: hoe
|
102
|
+
version_requirement:
|
103
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 1.2.0
|
108
|
+
version:
|
data/test/test_daap.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'yaml/stringio'
|
2
|
-
require 'fileutils'
|
3
|
-
require 'test/unit/testsuite'
|
4
|
-
require 'test/unit/ui/reporter'
|
5
|
-
require 'test/unit/ui/console/testrunner'
|
6
|
-
|
7
|
-
fail "Missing results directory" if ARGV.empty?
|
8
|
-
html_dir = ARGV[0]
|
9
|
-
|
10
|
-
FileUtils.rm_r html_dir rescue nil
|
11
|
-
FileUtils.mkdir_p html_dir
|
12
|
-
|
13
|
-
Dir['tc_*.rb'].each do |fn|
|
14
|
-
load fn
|
15
|
-
end
|
16
|
-
|
17
|
-
suite = Test::Unit::TestSuite.new
|
18
|
-
ObjectSpace.each_object(Class) do |cls|
|
19
|
-
next if cls == Test::Unit::TestCase
|
20
|
-
suite << cls.suite if cls.respond_to?(:suite)
|
21
|
-
end
|
22
|
-
|
23
|
-
Test::Unit::UI::Reporter.run(suite, html_dir)
|
data/test/ts_daap.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
-
$:.unshift File.join(File.dirname(__FILE__), "..", "test")
|
3
|
-
|
4
|
-
require 'yaml'
|
5
|
-
|
6
|
-
|
7
|
-
require 'rubygems'
|
8
|
-
require 'test/unit'
|
9
|
-
require 'tc_client'
|
10
|
-
require 'tc_protocol'
|
11
|
-
require 'tc_playlist'
|
12
|
-
require 'tc_artists'
|
13
|
-
require 'tc_download'
|
14
|
-
|