Permalink
Browse files

Mostly cleanup and fixes

  • Loading branch information...
1 parent 629a476 commit ae298301a1fa2dd831f82a47f6d249d933a97dea @matiaskorhonen committed Nov 6, 2009
Showing with 9 additions and 4 deletions.
  1. +1 −0 Rakefile
  2. +8 −4 bin/wol
View
@@ -10,6 +10,7 @@ begin
gem.email = "korhonen.matt@gmail.com"
gem.homepage = "http://github.com/k33l0r/wol"
gem.authors = ["Matias Korhonen"]
+ gem.rubyforge_project = 'wol'
gem.add_development_dependency "rspec", ">= 0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
View
@@ -1,8 +1,8 @@
#!/usr/bin/ruby -w
require 'optparse'
-require 'lib/wol'
-require 'lib/parsefile'
+require 'wol'
+require 'parsefile'
require 'pp'
class Runner
@@ -81,13 +81,17 @@ class Runner
end
def self.version
- "Ruby Wake-On-LAN version #{File.open("VERSION", "r").read}"
+ "Ruby Wake-On-LAN version 0.1.0"
end
def self.wake(options)
begin
if options[:file].nil?
- Wol.new(options).wake
+ if !options[:macs].empty?
+ Wol.new(options).wake
+ else
+ "You have to specify a file or MAC address"
+ end
else
wake_from_file(options)
end

0 comments on commit ae29830

Please sign in to comment.