ipaddress_2 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/ipaddress_2/ipv6.rb +3 -2
- data/lib/ipaddress_2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37bc348612c012d7c7d743d9a9b642df1ee7d22d1362bcb0cfd23bf129eb07c3
|
4
|
+
data.tar.gz: 41b6893dc33205c71e0340838bc7fe6ec6a2faba3c6b18b0e3599304e3fbe15d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76ac4f4c0af074075402e6ab1032e0bd46b500963d3763ff39f106c871cf54ae25e2fb8b3dc5a9386d3cfb53f7b3197b5a42d3e505fa014d489715a6429b4d31
|
7
|
+
data.tar.gz: 6f406303771c6a18470801ba35842fb36ff436e0d097b4971945ea3d02007c0f44349c18b3e3894affd338ba6d83ffa8f8ae7f1e9bd7650e8b3f6331585df3c2
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.12.
|
1
|
+
0.12.1
|
data/lib/ipaddress_2/ipv6.rb
CHANGED
@@ -989,9 +989,10 @@ module IPAddress;
|
|
989
989
|
def self.summarize(*args)
|
990
990
|
# one network? no need to summarize
|
991
991
|
return [args.first.network] if args.size == 1
|
992
|
+
args_size = args.size
|
992
993
|
|
993
994
|
i = 0
|
994
|
-
result = args.
|
995
|
+
result = args.sort.map{|ip| ip.network}
|
995
996
|
while i < result.size-1
|
996
997
|
sum = result[i] + result[i+1]
|
997
998
|
result[i..i+1] = sum.first if sum.size == 1
|
@@ -999,7 +1000,7 @@ module IPAddress;
|
|
999
1000
|
end
|
1000
1001
|
|
1001
1002
|
result.flatten!
|
1002
|
-
if result.size ==
|
1003
|
+
if result.size == args_size
|
1003
1004
|
# nothing more to summarize
|
1004
1005
|
return result
|
1005
1006
|
else
|
data/lib/ipaddress_2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipaddress_2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bluemonk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-02-
|
12
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|