ip_in_range 0.8 → 0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50e7ed5cf24416cb4b5e24c5e294bbb1b4bc1af157a8b3e5b6961e303c6d92fd
4
- data.tar.gz: c93750a9b1d36ddcd85b6039a592325fb7141565f3f2d38e6a4200e68958fa45
3
+ metadata.gz: 69ce982f6035c1c22265c9731cd82028849946f92bf79273f115bde5bc0ffc5c
4
+ data.tar.gz: 4d66098e9a222e4ce323d1218e628813b19832fad4dcc0ae6cc9b99a6529899b
5
5
  SHA512:
6
- metadata.gz: 46304649f33bc631a6b89a28627b868b99e190372cee7aafce3640a444b9f2be8e1aa6c54bc7fd815628bf663d0255892401a15cc8b42ddb100ba863a848607e
7
- data.tar.gz: ecd7f3f45349973e64139c4431247ba3535141ced517df1fd7a3c9c3d4501afd783ba868252644b026568a87e00f50dbf4a91085e415ce445ed979db1cbacef0
6
+ metadata.gz: 2266b3e824cdcd0fd587d7736d593fa1471c6eca426d805b357565f27d6a66bfa5c45c8d919f48975c7757ebc7513a8bf1d14720746a786b48949775167f6d48
7
+ data.tar.gz: d29d2cafbc63f87206b8485625c3c16dd72f859964337b7f21da5d87b2cef7a01e6ec28d1b0196183a32f34174f4b7eef23c949de8c8abe16ac019d4cf083c80
data/bin/ip_in_range CHANGED
@@ -81,7 +81,7 @@ elsif ARGV.length == 1
81
81
  ranges = File.readlines(list_file)
82
82
  ranges.each do |l|
83
83
  log.debug( "line is " << l)
84
- if(!l.strip.empty?)
84
+ if(!l.strip.empty? && !l.start_with?('#') )
85
85
  begin
86
86
  log.debug 'trying to extract an IP-range'
87
87
  range = l.scan(IPR).flatten
@@ -103,7 +103,7 @@ elsif ARGV.length == 1
103
103
  isso = ip_range.in_range?(ip)
104
104
  msg = 'ip ' << ip << (isso ? ' is ' : ' is not ' ) << 'in range: ' << l
105
105
  if isso
106
- log.info(msg)
106
+ log.info("\n" + msg)
107
107
  else
108
108
  log.debug(msg)
109
109
  end
@@ -0,0 +1,19 @@
1
+ require_relative "lib/version"
2
+ require 'date'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = File.basename(__FILE__, '.gemspec')
6
+ s.version = VERSION
7
+ s.date = Date.today.strftime('%F')
8
+ s.summary = SUMMARY
9
+ s.description = "Verify that an IP is in a range"
10
+ s.authors = AUTHORS
11
+ s.email = EMAIL
12
+ s.files = %w~ip_in_range~.collect{|f| 'bin/' << f} + %w~log.conf ip_range.rb version.rb file_checking.rb logging.rb email.rb~.collect{|f| 'lib/' << f} + ['doc/license.txt','ip_in_range.gemspec']
13
+ s.homepage = ''
14
+ #s.requirements = ''
15
+ #s.add_runtime_dependency ''
16
+ s.executables = 'ip_in_range'
17
+ s.license = 'GPL-3.0'
18
+ s.required_ruby_version = '>= 2.7'
19
+ end
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
- VERSION = 0.8
2
- SUMMARY="license.txt is included in doc"
1
+ VERSION = 0.9
2
+ SUMMARY="Ranges and text can be commented with a leading '#' "
3
3
  AUTHORS=["Michael Uplawski@uplawski.eu"]
4
4
  EMAIL="michael.uplawski@uplawski.eu"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ip_in_range
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski@uplawski.eu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-05 00:00:00.000000000 Z
11
+ date: 2023-01-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Verify that an IP is in a range
14
14
  email: michael.uplawski@uplawski.eu
@@ -19,6 +19,7 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - bin/ip_in_range
21
21
  - doc/license.txt
22
+ - ip_in_range.gemspec
22
23
  - lib/email.rb
23
24
  - lib/file_checking.rb
24
25
  - lib/ip_range.rb
@@ -44,8 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
44
45
  - !ruby/object:Gem::Version
45
46
  version: '0'
46
47
  requirements: []
47
- rubygems_version: 3.3.5
48
+ rubygems_version: 3.3.15
48
49
  signing_key:
49
50
  specification_version: 4
50
- summary: license.txt is included in doc
51
+ summary: Ranges and text can be commented with a leading '#'
51
52
  test_files: []