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 +4 -4
- data/bin/ip_in_range +2 -2
- data/ip_in_range.gemspec +19 -0
- data/lib/version.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ce982f6035c1c22265c9731cd82028849946f92bf79273f115bde5bc0ffc5c
|
4
|
+
data.tar.gz: 4d66098e9a222e4ce323d1218e628813b19832fad4dcc0ae6cc9b99a6529899b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/ip_in_range.gemspec
ADDED
@@ -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
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.
|
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:
|
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.
|
48
|
+
rubygems_version: 3.3.15
|
48
49
|
signing_key:
|
49
50
|
specification_version: 4
|
50
|
-
summary:
|
51
|
+
summary: Ranges and text can be commented with a leading '#'
|
51
52
|
test_files: []
|