ruby-mpd 0.1.5 → 0.1.7

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-mpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-16 00:00:00.000000000 Z
12
+ date: 2013-01-22 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A powerful, modern and feature complete library for the Music Player
15
15
  Daemon.
@@ -20,15 +20,10 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - .gitignore
23
- - AUTHORS
24
23
  - COPYING
25
- - DOC.rdoc
26
24
  - README.rdoc
27
- - data/database.yaml
28
- - examples/rmpc.rb
29
- - examples/tailmpc.rb
30
- - lib/mpdserver.rb
31
25
  - lib/ruby-mpd.rb
26
+ - lib/ruby-mpd/exceptions.rb
32
27
  - lib/ruby-mpd/parser.rb
33
28
  - lib/ruby-mpd/playlist.rb
34
29
  - lib/ruby-mpd/plugins/channels.rb
@@ -43,8 +38,7 @@ files:
43
38
  - lib/ruby-mpd/plugins/stickers.rb
44
39
  - lib/ruby-mpd/song.rb
45
40
  - ruby-mpd.gemspec
46
- - tests/libtests.rb
47
- - tests/servertests.rb
41
+ - test/libtests.rb
48
42
  homepage: https://github.com/archSeer/ruby-mpd
49
43
  licenses: []
50
44
  post_install_message:
@@ -69,5 +63,6 @@ rubygems_version: 1.8.23
69
63
  signing_key:
70
64
  specification_version: 3
71
65
  summary: Modern client library for MPD
72
- test_files: []
66
+ test_files:
67
+ - test/libtests.rb
73
68
  has_rdoc:
data/AUTHORS DELETED
@@ -1 +0,0 @@
1
- Andrew Rader (bitwise_mcgee AT yahoo.com / http://nymb.us)
data/DOC.rdoc DELETED
@@ -1,78 +0,0 @@
1
- #
2
- #== librmpd.rb
3
- #
4
- # librmpd.rb is another Ruby MPD Library with a goal of greater
5
- # ease of use, more functionality, and thread safety
6
- #
7
- # Author:: Andrew Rader (bitwise_mcgee AT yahoo.com | http://nymb.us)
8
- # Copyright:: Copyright (c) 2006 Andrew Rader
9
- # License:: Distributed under the GNU GPL v2 (See COPYING file)
10
- #
11
- # This was written with MPD version 0.11.5 (http://www.musicpd.org)
12
- #
13
- # The main class is the MPD class. This provides the functionality for
14
- # talking to the server as well as setting up callbacks for when events
15
- # occur (such as song changes, state changes, etc). The use of callbacks
16
- # is optional, if they are used a seperate thread will continuously poll
17
- # the server on its status, when something is changed, your program will
18
- # be notified via any callbacks you have set. Most methods are the same
19
- # as specified in the MPD Server Protocol, however some have been modified
20
- # or renamed. Most notable is the list* and lsinfo functions have been
21
- # replace with more sane methods (such as `files` for all files)
22
- #
23
- #== Usage
24
- #
25
- # First create an MPD object
26
- #
27
- # require 'librmpd'
28
- #
29
- # mpd = MPD.new 'localhost', 6600
30
- #
31
- # and connect it to the server
32
- #
33
- # mpd.connect
34
- #
35
- # You can now issue any of the commands. Each command is documented below.
36
- #
37
- #=== Callbacks
38
- #
39
- # Callbacks are a way to easily setup your client as event based, rather
40
- # than polling based. This means rather than having to check for changes
41
- # in the server, you setup a few methods that will be called when those
42
- # changes occur. For example, you could have a 'state_changed' method
43
- # that will be called whenever the server changes state. You could then
44
- # have this method change a label to reflect to the new state.
45
- #
46
- # To use callbacks in your program, first setup your callback methods. For
47
- # example, say you have the class MyClient. Simply define whatever
48
- # callbacks you want inside your class. See the documentation on the
49
- # callback type constants in the MPD class for details on how each callback
50
- # is called
51
- #
52
- # Once you have your callback methods defined, use the register_callback
53
- # methods to inform librmpd about them. You can have multiple callbacks
54
- # for each type of callback without problems. Simply use object.method('method_name')
55
- # to get a reference to a Method object. Pass this object to the
56
- # register_callback (along with the proper type value), and you're set.
57
- #
58
- # An Example:
59
- #
60
- # class MyClient
61
- # ...
62
- # def state_callback(newstate)
63
- # puts "MPD Changed State: #{newstate}"
64
- # end
65
- # ...
66
- # end
67
- #
68
- # client = MyClient.new
69
- # mpd = MPD.new
70
- # mpd.register_callback(client.method('state_callback'), MPD::STATE_CALLBACK)
71
- #
72
- # # Connect and Enable Callbacks
73
- # mpd.connect(true)
74
- #
75
- # In order for the callback to be used, you must enable callbacks when you
76
- # connect by passing true to the connect method. Now, whenever the state changes
77
- # on the server, myclientobj's state_callback method will be called (and passed
78
- # the new state as an argument)
data/data/database.yaml DELETED
@@ -1,347 +0,0 @@
1
- - &songs
2
- - &song1
3
- file: "Shpongle/Are_You_Shpongled/1.Shpongle_Falls.ogg"
4
- time: 514
5
- artist: "Shpongle"
6
- album: "Are You Shpongled?"
7
- title: "Shpongle Falls"
8
- track: 1
9
- - &song2
10
- file: "Shpongle/Are_You_Shpongled/2.Monster_Hit.ogg"
11
- time: 537
12
- artist: "Shpongle"
13
- album: "Are You Shpongled?"
14
- title: "Monster Hit"
15
- track: 2
16
- - &song3
17
- file: "Shpongle/Are_You_Shpongled/3.Vapour_Rumours.ogg"
18
- time: 626
19
- artist: "Shpongle"
20
- album: "Are You Shpongled?"
21
- title: "Vapour Rumours"
22
- track: 3
23
- - &song4
24
- file: "Shpongle/Are_You_Shpongled/4.Shpongle_Spores.ogg"
25
- time: 436
26
- artist: "Shpongle"
27
- album: "Are You Shpongled?"
28
- title: "Shpongle Spores"
29
- track: 4
30
- - &song5
31
- file: "Shpongle/Are_You_Shpongled/5.Behind_Closed_Eyelids.ogg"
32
- time: 749
33
- artist: "Shpongle"
34
- album: "Are You Shpongled?"
35
- title: "Behind Closed Eyelids"
36
- track: 5
37
- - &song6
38
- file: "Shpongle/Are_You_Shpongled/6.Divine_Moments_of_Truth.ogg"
39
- time: 620
40
- artist: "Shpongle"
41
- album: "Are You Shpongled?"
42
- title: "Divine Moments of Truth"
43
- track: 6
44
- - &song7
45
- file: "Shpongle/Are_You_Shpongled/7...._and_the_Day_Turned_to_Night.ogg"
46
- time: 1198
47
- artist: "Shpongle"
48
- album: "Are You Shpongled?"
49
- title: "... and the Day Turned to Night"
50
- track: 7
51
- - &song8
52
- file: "Astral_Projection/Dancing_Galaxy/1.Dancing_Galaxy.ogg"
53
- time: 558
54
- artist: "Astral Projection"
55
- album: "Dancing Galaxy"
56
- title: "Dancing Galaxy"
57
- track: 1
58
- - &song9
59
- file: "Astral_Projection/Dancing_Galaxy/2.Soundform.ogg"
60
- time: 492
61
- artist: "Astral Projection"
62
- album: "Dancing Galaxy"
63
- title: "Soundform"
64
- track: 2
65
- - &song10
66
- file: "Astral_Projection/Dancing_Galaxy/3.Flying_Into_A_Star.ogg"
67
- time: 585
68
- artist: "Astral Projection"
69
- album: "Dancing Galaxy"
70
- title: "Flying Into A Star"
71
- track: 3
72
- - &song11
73
- file: "Astral_Projection/Dancing_Galaxy/4.No_One_Ever_Dreams.ogg"
74
- time: 505
75
- artist: "Astral Projection"
76
- album: "Dancing Galaxy"
77
- title: "No One Ever Dreams"
78
- track: 4
79
- - &song12
80
- file: "Astral_Projection/Dancing_Galaxy/5.Cosmic_Ascension_(ft._DJ_Jorg).ogg"
81
- time: 619
82
- artist: "Astral Projection"
83
- album: "Dancing Galaxy"
84
- title: "Cosmic Ascension (ft. DJ Jorg)"
85
- track: 5
86
- - &song13
87
- file: "Astral_Projection/Dancing_Galaxy/6.Life_On_Mars.ogg"
88
- time: 549
89
- artist: "Astral Projection"
90
- album: "Dancing Galaxy"
91
- title: "Life On Mars"
92
- track: 6
93
- - &song14
94
- file: "Astral_Projection/Dancing_Galaxy/7.Liquid_Sun.ogg"
95
- time: 660
96
- artist: "Astral Projection"
97
- album: "Dancing Galaxy"
98
- title: "Liquid Sun"
99
- track: 7
100
- - &song15
101
- file: "Astral_Projection/Dancing_Galaxy/8.Ambient_Galaxy_(Disco_Valley_Mix).ogg"
102
- time: 825
103
- artist: "Astral Projection"
104
- album: "Dancing Galaxy"
105
- title: "Ambient Galaxy (Disco Valley Mix)"
106
- track: 8
107
- - &song16
108
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/01.Central_Plains.ogg"
109
- time: 488
110
- artist: "Carbon Based Lifeforms"
111
- album: "Hydroponic Garden"
112
- title: "Central Plains"
113
- track: 1
114
- - &song17
115
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/02.Tensor.ogg"
116
- time: 344
117
- artist: "Carbon Based Lifeforms"
118
- album: "Hydroponic Garden"
119
- title: "Tensor"
120
- track: 2
121
- - &song18
122
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/03.MOS_6581_(Album_Version).ogg"
123
- time: 431
124
- artist: "Carbon Based Lifeforms"
125
- album: "Hydroponic Garden"
126
- title: "MOS 6581 (Album Version)"
127
- track: 3
128
- - &song19
129
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/04.Silent_Running.ogg"
130
- time: 425
131
- artist: "Carbon Based Lifeforms"
132
- album: "Hydroponic Garden"
133
- title: "Silent Running"
134
- track: 4
135
- - &song20
136
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/05.Neurotransmitter.ogg"
137
- time: 448
138
- artist: "Carbon Based Lifeforms"
139
- album: "Hydroponic Garden"
140
- title: "Neurotransmitter"
141
- track: 5
142
- - &song21
143
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/06.Hydroponic_Garden.ogg"
144
- time: 553
145
- artist: "Carbon Based Lifeforms"
146
- album: "Hydroponic Garden"
147
- title: "Hydroponic Garden"
148
- track: 6
149
- - &song22
150
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/07.Exosphere.ogg"
151
- time: 306
152
- artist: "Carbon Based Lifeforms"
153
- album: "Hydroponic Garden"
154
- title: "Exosphere"
155
- track: 7
156
- - &song23
157
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/08.Comsat.ogg"
158
- time: 429
159
- artist: "Carbon Based Lifeforms"
160
- album: "Hydroponic Garden"
161
- title: "Comsat"
162
- track: 8
163
- - &song24
164
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/09.Epicentre_(First_Movement).ogg"
165
- time: 358
166
- artist: "Carbon Based Lifeforms"
167
- album: "Hydroponic Garden"
168
- title: "Epicentre (First Movement)"
169
- track: 9
170
- - &song25
171
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/10.Artificial_Island.ogg"
172
- time: 312
173
- artist: "Carbon Based Lifeforms"
174
- album: "Hydroponic Garden"
175
- title: "Artificial Island"
176
- track: 10
177
- - &song26
178
- file: "Carbon_Based_Lifeforms/Hydroponic_Garden/11.Refraction_1.33.ogg"
179
- time: 500
180
- artist: "Carbon Based Lifeforms"
181
- album: "Hydroponic Garden"
182
- title: "Refraction 1.33"
183
- track: 11
184
- - &song27
185
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/01.Botanical_Dimensions.ogg"
186
- time: 278
187
- artist: "Shpongle"
188
- album: "Nothing Lasts... But Nothing Is Lost"
189
- title: "Botanical Dimensions"
190
- track: 1
191
- - &song28
192
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/02.Outer_Shpongolia.ogg"
193
- time: 153
194
- artist: "Shpongle"
195
- album: "Nothing Lasts... But Nothing Is Lost"
196
- title: "Outer Shpongolia"
197
- track: 2
198
- - &song29
199
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/03.Levitation_Nation.ogg"
200
- time: 220
201
- artist: "Shpongle"
202
- album: "Nothing Lasts... But Nothing Is Lost"
203
- title: "Levitation Nation"
204
- track: 3
205
- - &song30
206
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/04.Periscopes_of_Consciousness.ogg"
207
- time: 114
208
- artist: "Shpongle"
209
- album: "Nothing Lasts... But Nothing Is Lost"
210
- title: "Periscopes of Consciousness"
211
- track: 4
212
- - &song31
213
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/05.Schmaltz_Herring.ogg"
214
- time: 141
215
- artist: "Shpongle"
216
- album: "Nothing Lasts... But Nothing Is Lost"
217
- title: "Schmaltz Herring"
218
- track: 5
219
- - &song32
220
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/06.Nothing_Lasts....ogg"
221
- time: 269
222
- artist: "Shpongle"
223
- album: "Nothing Lasts... But Nothing Is Lost"
224
- title: "Nothing Lasts..."
225
- track: 6
226
- - &song33
227
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/07.Shnitzled_in_the_Negev.ogg"
228
- time: 258
229
- artist: "Shpongle"
230
- album: "Nothing Lasts... But Nothing Is Lost"
231
- title: "Shnitzled in the Negev"
232
- track: 7
233
- - &song34
234
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/08....But_Nothing_Is_Lost.ogg"
235
- time: 279
236
- artist: "Shpongle"
237
- album: "Nothing Lasts... But Nothing Is Lost"
238
- title: "...But Nothing Is Lost"
239
- track: 8
240
- - &song35
241
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/09.When_Shall_I_Be_Free.ogg"
242
- time: 277
243
- artist: "Shpongle"
244
- album: "Nothing Lasts... But Nothing Is Lost"
245
- title: "When Shall I Be Free"
246
- track: 9
247
- - &song36
248
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/10.The_Stamen_of_the_Shamen.ogg"
249
- time: 251
250
- artist: "Shpongle"
251
- album: "Nothing Lasts... But Nothing Is Lost"
252
- title: "The Stamen of the Shamen"
253
- track: 10
254
- - &song37
255
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/11.Circuits_of_the_Imagination.ogg"
256
- time: 192
257
- artist: "Shpongle"
258
- album: "Nothing Lasts... But Nothing Is Lost"
259
- title: "Circuits of the Imagination"
260
- track: 11
261
- - &song38
262
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/12.Linguistic_Mystic.ogg"
263
- time: 96
264
- artist: "Shpongle"
265
- album: "Nothing Lasts... But Nothing Is Lost"
266
- title: "Linguistic Mystic"
267
- track: 12
268
- - &song39
269
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/13.Mentalism.ogg"
270
- time: 174
271
- artist: "Shpongle"
272
- album: "Nothing Lasts... But Nothing Is Lost"
273
- title: "Mentalism"
274
- track: 13
275
- - &song40
276
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/14.Invocation.ogg"
277
- time: 160
278
- artist: "Shpongle"
279
- album: "Nothing Lasts... But Nothing Is Lost"
280
- title: "Invocation"
281
- track: 14
282
- - &song41
283
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/15.Molecular_Superstructure.ogg"
284
- time: 287
285
- artist: "Shpongle"
286
- album: "Nothing Lasts... But Nothing Is Lost"
287
- title: "Molecular Superstructure"
288
- track: 15
289
- - &song42
290
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/16.Turn_Up_the_Silence.ogg"
291
- time: 202
292
- artist: "Shpongle"
293
- album: "Nothing Lasts... But Nothing Is Lost"
294
- title: "Turn Up the Silence"
295
- track: 16
296
- - &song43
297
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/17.Exhalation.ogg"
298
- time: 136
299
- artist: "Shpongle"
300
- album: "Nothing Lasts... But Nothing Is Lost"
301
- title: "Exhalation"
302
- track: 17
303
- - &song44
304
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/18.Connoisseur_of_Hallucinations.ogg"
305
- time: 212
306
- artist: "Shpongle"
307
- album: "Nothing Lasts... But Nothing Is Lost"
308
- title: "Connoisseur of Hallucinations"
309
- track: 18
310
- - &song45
311
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/19.The_Nebbish_Route.ogg"
312
- time: 215
313
- artist: "Shpongle"
314
- album: "Nothing Lasts... But Nothing Is Lost"
315
- title: "The Nebbish Route"
316
- track: 19
317
- - &song46
318
- file: "Shpongle/Nothing_Lasts..._But_Nothing_Is_Lost/20.Falling_Awake.ogg"
319
- time: 110
320
- artist: "Shpongle"
321
- album: "Nothing Lasts... But Nothing Is Lost"
322
- title: "Falling Awake"
323
- track: 20
324
-
325
- - &playlists
326
- - &playlist1
327
- file: "Shpongle_-_Are_You_Shpongled.m3u"
328
- songs:
329
- - *song1
330
- - *song2
331
- - *song3
332
- - *song4
333
- - *song5
334
- - *song6
335
- - *song7
336
- - &playlist2
337
- file: "Astral_Projection_-_Dancing_Galaxy.m3u"
338
- songs:
339
- - *song8
340
- - *song9
341
- - *song10
342
- - *song11
343
- - *song12
344
- - *song13
345
- - *song14
346
- - *song15
347
-