diff --git a/README.md b/README.md index 10b21a7..2b929f7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ Description =========== -lircr (pronounced 'lurker') is a LIRC client library for Ruby. It is simple, -it is easy, it is fun. If you got LIRC, get lircr. I am not responsible if you +lircr (pronounced 'lurker') is a LIRC client library for Ruby. It's simple, +it's easy, it's fun. If you got LIRC, get lircr. I am not responsible if you grow more hair on your index finger or thumb. Usage @@ -15,21 +15,3 @@ Usage if event.name == "play" system "xmms", "/av/music/3.mod" end - -Control your MPD: - - require 'lirc' - require 'librmpd' - lirc = LIRC::Client.new - mpd = MPD.new 'localhost', 6600 - mpd.connect - lirc.each do |event| - case event.name - when "play" - mpc.play - when "pause" - mpd.pause = !mpd.pause - when "stop" - mpd.stop - end - end diff --git a/Rakefile b/Rakefile index 2d5f569..716a628 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ begin gem.summary = %Q{LIRC client for Ruby} gem.description = %Q{} gem.email = "Denis.Knauf@gmail.com" - gem.homepage = "http://github.com/DenisKnauf/lircr" + gem.homepage = "http://github.com/DenisKnauf/logan" gem.authors = ["Denis Knauf", "Hans Fugal"] gem.files = %w[AUTHORS README.md VERSION lib/**/*.rb test/**/*.rb] gem.require_paths = %w[test lib] diff --git a/VERSION b/VERSION index bcab45a..4e379d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.3 +0.0.2 diff --git a/lib/lirc.rb b/lib/lirc.rb index 055b305..d17dd24 100644 --- a/lib/lirc.rb +++ b/lib/lirc.rb @@ -2,13 +2,13 @@ require 'socket' module LIRC class Client - def initialize dev = nil + def initializer dev = nil dev ||= "/dev/lircd" - @sock = UNIXSocket.new dev + @sock = UNIXSocket.open dev end def next - Event.new @sock.gets + Event.new @sock.readline end def each_event