mpc 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mpc/song.rb +14 -0
- data/lib/mpc/version.rb +2 -2
- data/lib/mpc.rb +6 -0
- data/mpc.gemspec +1 -1
- metadata +4 -14
data/lib/mpc/song.rb
ADDED
data/lib/mpc/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.9"
|
1
|
+
class Mpc
|
2
|
+
VERSION = "0.9.1"
|
3
3
|
end
|
data/lib/mpc.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "socket"
|
2
|
+
require "mpc/song"
|
2
3
|
class Mpc
|
3
4
|
|
4
5
|
@@regexps = {
|
@@ -87,6 +88,11 @@ class Mpc
|
|
87
88
|
set_volume(volume.to_i - 20)
|
88
89
|
end
|
89
90
|
|
91
|
+
def current_song
|
92
|
+
options = to_hash(send_command("currentsong"))
|
93
|
+
Song.new(options)
|
94
|
+
end
|
95
|
+
|
90
96
|
private
|
91
97
|
|
92
98
|
def get_volume
|
data/mpc.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version:
|
5
|
+
version: 0.9.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Micha\xC5\x82 Krzy\xC5\xBCanowski"
|
@@ -13,28 +13,17 @@ cert_chain: []
|
|
13
13
|
date: 2011-08-04 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: rubytree
|
18
|
-
prerelease: false
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
|
-
requirements:
|
22
|
-
- - ">="
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: "0"
|
25
|
-
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
16
|
- !ruby/object:Gem::Dependency
|
28
17
|
name: mocha
|
29
18
|
prerelease: false
|
30
|
-
requirement: &
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
31
20
|
none: false
|
32
21
|
requirements:
|
33
22
|
- - ">="
|
34
23
|
- !ruby/object:Gem::Version
|
35
24
|
version: "0"
|
36
25
|
type: :development
|
37
|
-
version_requirements: *
|
26
|
+
version_requirements: *id001
|
38
27
|
description: Ruby MPD client
|
39
28
|
email:
|
40
29
|
- michal.krzyzanowski+github@gmail.com
|
@@ -49,6 +38,7 @@ files:
|
|
49
38
|
- Gemfile
|
50
39
|
- Rakefile
|
51
40
|
- lib/mpc.rb
|
41
|
+
- lib/mpc/song.rb
|
52
42
|
- lib/mpc/version.rb
|
53
43
|
- mpc.gemspec
|
54
44
|
- test/mpc_test.rb
|