<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
+# Parse a text file containing hardware addresses, host names/addresses, and port numbers
 class ParseFile
 
+  # Parse a given text file and return a hash containing the results 
   def self.parse(file)
     hosts = []
     if File.exist?(file) &amp;&amp; File.readable?(file)
@@ -22,14 +24,19 @@ class ParseFile
     return hosts
   end
 
+private
+
+  # Check if a given hardware address is correctly formed.
   def self.check_mac(mac)
     /^(\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2})?$/.match(mac)
   end
 
+  # Check that a host/ip address doesn't contain any illegal characters.
   def self.check_host(host)
     /(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$)|(^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$)/.match(host)
   end
 
+  # Make sure that a given port number is an integer in the correct range (1..61000).
   def self.sanitize_port(port)
     p = port.to_i
     return (1..61000).include?(p) ? p : 9</diff>
      <filename>lib/parsefile.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@ class Wol
     @socket.setsockopt(Socket::SOL_SOCKET,Socket::SO_BROADCAST,1)
   end
 
-  # Close the socket opened by WakeOnLan initialization
+  # Close the socket opened by Wol initialization
   def close
     @socket.close
     @socket=&quot;&quot;</diff>
      <filename>lib/wol.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,10 @@ describe &quot;Wake-On-LAN&quot; do
     Wol.new(:macs =&gt; &quot;00:08:a1:a9:58:f6&quot;, :address =&gt; &quot;example.com&quot;, :port =&gt; 80).wake.should == &quot;Sending magic packet to example.com:80 with 00:08:a1:a9:58:f6\n&quot;
   end
 
+  it &quot;should send MagicPackets to several hardware addresses at once&quot; do
+    Wol.new(:macs =&gt; [&quot;ff:ff:ff:ff:ff:cc&quot;, &quot;ff:ff:ff:ff:cc:cc&quot;, &quot;ff:ff:ff:ccf:cc:cc&quot;]).wake.should == &quot;Sending magic packet to 255.255.255.255:9 with ff:ff:ff:ff:ff:cc\nSending magic packet to 255.255.255.255:9 with ff:ff:ff:ff:cc:cc\nSending magic packet to 255.255.255.255:9 with ff:ff:ff:ccf:cc:cc\n&quot;
+  end
+
   it &quot;should return nil if quiet is set to true&quot; do
     Wol.new(:quiet =&gt; true).wake.should == nil
   end</diff>
      <filename>spec/wol_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fd89657bbbdfee34c23195373b69ff5aa5b64112</id>
    </parent>
  </parents>
  <author>
    <name>Matias Korhonen</name>
    <email>korhonen.matt@gmail.com</email>
  </author>
  <url>http://github.com/k33l0r/wol/commit/f3e0ba4e844adf284c8ced0fc684a93e30279f35</url>
  <id>f3e0ba4e844adf284c8ced0fc684a93e30279f35</id>
  <committed-date>2009-11-08T11:30:18-08:00</committed-date>
  <authored-date>2009-11-08T11:30:18-08:00</authored-date>
  <message>Documentation and testing</message>
  <tree>d1c53cf97cb275fa5b05dbf0997cbbcfa505e597</tree>
  <committer>
    <name>Matias Korhonen</name>
    <email>korhonen.matt@gmail.com</email>
  </committer>
</commit>
