rmpd 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rmpd.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), "rmpd/config")
2
2
  require File.join(File.dirname(__FILE__), "rmpd/command")
3
3
  require File.join(File.dirname(__FILE__), "rmpd/commands")
4
+ require File.join(File.dirname(__FILE__), "rmpd/io")
4
5
  require File.join(File.dirname(__FILE__), "rmpd/connection")
5
6
  require File.join(File.dirname(__FILE__), "rmpd/response")
6
7
 
@@ -5,6 +5,7 @@ module Rmpd
5
5
  class Connection
6
6
  include Socket::Constants
7
7
  include Rmpd::Commands
8
+ include Rmpd::IO
8
9
 
9
10
 
10
11
  MAX_RETRIES = 5
data/lib/rmpd/io.rb ADDED
@@ -0,0 +1,18 @@
1
+ module Rmpd
2
+ module IO
3
+
4
+ def to_io
5
+ send_command("idle") unless @in_idle
6
+ @in_idle = true
7
+ @socket
8
+ end
9
+
10
+ def check_select
11
+ return unless @in_idle
12
+ Response.factory("idle").parse(read_response)
13
+ ensure
14
+ @in_idle = false
15
+ end
16
+
17
+ end
18
+ end
data/lib/rmpd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rmpd
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmpd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eric Wollesen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-12 00:00:00 Z
18
+ date: 2012-10-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
@@ -102,6 +102,7 @@ files:
102
102
  - lib/rmpd/commands/playlist.rb
103
103
  - lib/rmpd/config.rb
104
104
  - lib/rmpd/connection.rb
105
+ - lib/rmpd/io.rb
105
106
  - lib/rmpd/response.rb
106
107
  - lib/rmpd/response_splitter.rb
107
108
  - lib/rmpd/version.rb