netaddr 1.5.0 → 1.5.1
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 +7 -0
- data/changelog +7 -0
- data/lib/cidr.rb +0 -0
- data/lib/cidr_shortcuts.rb +1 -1
- data/lib/eui.rb +0 -0
- data/lib/ip_math.rb +0 -0
- data/lib/methods.rb +0 -0
- data/lib/netaddr.rb +0 -0
- data/lib/tree.rb +0 -0
- data/lib/validation_shortcuts.rb +0 -0
- data/license +13 -0
- data/{tests → test}/cidr_test.rb +0 -0
- data/{tests → test}/eui_test.rb +0 -0
- data/{tests → test}/methods_test.rb +3 -0
- data/{tests → test}/tree_test.rb +0 -0
- metadata +35 -40
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 00af2a0dd3e72c9af45cbf4da1400b712c2786aa
|
|
4
|
+
data.tar.gz: 00e17047afb4b70c8380d14e41135385db9c3c24
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 4356fd2da890c8f0611e6f616f9d35d6b7874727eeed1d09382c679d904ad0b8e9798f97ac2a41bbfe850f91b141816edd360f66183c11e4ca65b7a3dfc70745
|
|
7
|
+
data.tar.gz: 614319998cb885b53f98c3d5ad650184e1e9830a442fa39b3df78cbdf0b2871ee920ff0e39d0f31c345e2b81a7208efb2a0e7d52a983bca90af7fc9e50f762ef
|
data/changelog
CHANGED
data/lib/cidr.rb
CHANGED
|
File without changes
|
data/lib/cidr_shortcuts.rb
CHANGED
|
@@ -322,7 +322,7 @@ def cidr_summarize(subnet_list)
|
|
|
322
322
|
until (index >= summarized_list.length)
|
|
323
323
|
subnet = summarized_list[index]
|
|
324
324
|
if (subnet && cidr_compare(supernet,subnet) == 1 )
|
|
325
|
-
|
|
325
|
+
unique_list.delete(subnet.desc)
|
|
326
326
|
end
|
|
327
327
|
index += 1
|
|
328
328
|
end
|
data/lib/eui.rb
CHANGED
|
File without changes
|
data/lib/ip_math.rb
CHANGED
|
File without changes
|
data/lib/methods.rb
CHANGED
|
File without changes
|
data/lib/netaddr.rb
CHANGED
|
File without changes
|
data/lib/tree.rb
CHANGED
|
File without changes
|
data/lib/validation_shortcuts.rb
CHANGED
|
File without changes
|
data/license
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright Dustin L. Spinhirne
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
data/{tests → test}/cidr_test.rb
RENAMED
|
File without changes
|
data/{tests → test}/eui_test.rb
RENAMED
|
File without changes
|
|
@@ -83,6 +83,9 @@ class TestMethods < Test::Unit::TestCase
|
|
|
83
83
|
assert_equal('10.0.0.0/24', merged[0].desc)
|
|
84
84
|
assert_equal('10.0.0.240/28', merged[0].tag[:Subnets][5].desc)
|
|
85
85
|
assert(merged[0].tag[:Subnets][5].tag[:test])
|
|
86
|
+
|
|
87
|
+
assert_equal(['10.0.0.0/8','192.168.0.0/24'], NetAddr.merge(['10.0.0.0/8', '10.0.0.0/12', '10.0.0.0/24','192.168.0.0/24','192.168.0.64/26']) )
|
|
88
|
+
|
|
86
89
|
end
|
|
87
90
|
|
|
88
91
|
def test_minimum_size
|
data/{tests → test}/tree_test.rb
RENAMED
|
File without changes
|
metadata
CHANGED
|
@@ -1,68 +1,63 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: netaddr
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.5.1
|
|
5
5
|
platform: ruby
|
|
6
|
-
authors:
|
|
6
|
+
authors:
|
|
7
7
|
- Dustin Spinhirne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
|
|
12
|
-
date: 2008-11-07 00:00:00 -06:00
|
|
13
|
-
default_executable:
|
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
|
14
12
|
dependencies: []
|
|
15
|
-
|
|
16
13
|
description:
|
|
17
14
|
email:
|
|
18
15
|
executables: []
|
|
19
|
-
|
|
20
16
|
extensions: []
|
|
21
|
-
|
|
22
|
-
extra_rdoc_files:
|
|
17
|
+
extra_rdoc_files:
|
|
23
18
|
- README
|
|
24
19
|
- Errors
|
|
25
20
|
- changelog
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
- license
|
|
22
|
+
files:
|
|
23
|
+
- Errors
|
|
24
|
+
- README
|
|
25
|
+
- changelog
|
|
28
26
|
- lib/cidr.rb
|
|
29
|
-
- lib/
|
|
30
|
-
- lib/validation_shortcuts.rb
|
|
27
|
+
- lib/cidr_shortcuts.rb
|
|
31
28
|
- lib/eui.rb
|
|
32
|
-
- lib/
|
|
29
|
+
- lib/ip_math.rb
|
|
33
30
|
- lib/methods.rb
|
|
31
|
+
- lib/netaddr.rb
|
|
34
32
|
- lib/tree.rb
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
33
|
+
- lib/validation_shortcuts.rb
|
|
34
|
+
- license
|
|
35
|
+
- test/cidr_test.rb
|
|
36
|
+
- test/eui_test.rb
|
|
37
|
+
- test/methods_test.rb
|
|
38
|
+
- test/tree_test.rb
|
|
39
39
|
homepage:
|
|
40
|
+
licenses:
|
|
41
|
+
- Apache-2.0
|
|
42
|
+
metadata: {}
|
|
40
43
|
post_install_message:
|
|
41
44
|
rdoc_options: []
|
|
42
|
-
|
|
43
|
-
require_paths:
|
|
45
|
+
require_paths:
|
|
44
46
|
- lib
|
|
45
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
|
-
requirements:
|
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
47
49
|
- - ">="
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
requirements:
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0'
|
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
53
54
|
- - ">="
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version:
|
|
56
|
-
version:
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '0'
|
|
57
57
|
requirements: []
|
|
58
|
-
|
|
59
58
|
rubyforge_project:
|
|
60
|
-
rubygems_version:
|
|
59
|
+
rubygems_version: 2.2.2
|
|
61
60
|
signing_key:
|
|
62
|
-
specification_version:
|
|
61
|
+
specification_version: 4
|
|
63
62
|
summary: A package for manipulating network addresses.
|
|
64
|
-
test_files:
|
|
65
|
-
- tests/tree_test.rb
|
|
66
|
-
- tests/methods_test.rb
|
|
67
|
-
- tests/cidr_test.rb
|
|
68
|
-
- tests/eui_test.rb
|
|
63
|
+
test_files: []
|