wol 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/wol +25 -1
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/wol CHANGED
@@ -5,7 +5,26 @@ require 'wol'
5
5
  require 'parsefile'
6
6
  require 'pp'
7
7
 
8
- class Runner
8
+ class Runner
9
+ SAMPLE_FILE = %{# File structure
10
+ # --------------
11
+ # - blank lines are ignored
12
+ # - comment lines are ignored (lines starting with a hash mark '#')
13
+ # - other lines are considered valid records and can have 3 columns:
14
+ #
15
+ # Hardware address, IP address, destination port
16
+ #
17
+ # the last two are optional, in which case the following defaults
18
+ # are used:
19
+ #
20
+ # IP address: 255.255.255.255 (the limited broadcast address)
21
+ # port: 9 (the discard port)
22
+ #
23
+
24
+ 01:02:03:04:05:06 192.168.1.255 9
25
+ 07:09:09:0A:0B:0C 255.255.255.255
26
+ 0D:0E:0F:00:10:11}
27
+
9
28
  def self.parse(args)
10
29
  args = ["-h"] if args.empty?
11
30
 
@@ -58,6 +77,11 @@ class Runner
58
77
  exit
59
78
  end
60
79
 
80
+ opts.on_tail( '-s', '--sample-file', 'Display a sample file') do
81
+ puts SAMPLE_FILE
82
+ exit
83
+ end
84
+
61
85
  opts.on_tail( '-v', '--version', 'Show version') do
62
86
  puts version
63
87
  exit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Korhonen