mtik_directory_2_address_list 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,21 @@ class Args < OptionParser
12
12
  on('-p', '--prefix PREFIX', "Mikrotik address-list prefix (default: #{@prefix = 'md2al_'})") { |str| @prefix = str }
13
13
  on('-q', '--quiet', "Be quiet (default: #{@quiet = false})") { |bool| @quiet = bool }
14
14
  parse!
15
- if ARGV.size != 4
15
+ if ARGV.empty?
16
+ STDOUT << to_s << <<-EOS.gsub(/^ +/, '')
17
+
18
+ Symbolic links in <dir>, named like an IP address, will be
19
+ sent to the Mikrotik device at <host>. The address-list name
20
+ will be formed by the PREFIX + whatever the link points to.
21
+
22
+ For example, the following symbolic link:
23
+ \t1.2.3.4 -> 15mbps
24
+ With --prefix set to "down_speed_", will add the IP 1.2.3.4,
25
+ to the address-list named down_speed_15mbps.
26
+
27
+ EOS
28
+ exit(2)
29
+ elsif ARGV.size != 4
16
30
  puts to_s
17
31
  puts "Missing required argument"
18
32
  exit(2)
@@ -1,3 +1,3 @@
1
1
  module MtikDirectory2AddressList
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtik_directory_2_address_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -115,6 +115,7 @@ executables:
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - .gitignore
118
119
  - .simplecov
119
120
  - Gemfile
120
121
  - Rakefile