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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c14a053c2c3ae5bbf8f4daf54df76a221ece84a46fc3297159c6751ff45746
4
- data.tar.gz: 13b69795534a2f0f46332c563348de881430a4b432e6cbf9ef7385861ea8b6d8
3
+ metadata.gz: 37bc348612c012d7c7d743d9a9b642df1ee7d22d1362bcb0cfd23bf129eb07c3
4
+ data.tar.gz: 41b6893dc33205c71e0340838bc7fe6ec6a2faba3c6b18b0e3599304e3fbe15d
5
5
  SHA512:
6
- metadata.gz: ee9429ddb8b2c69b036eabf72159c32ad8d3babc42bbdc747c12029422ddaf3e97c5b6c2daff8cf8ed4aab40db7a4a4995152093f29a6c3d0200fcb06f7c6900
7
- data.tar.gz: '08ec5f9867b28c8073b9f06c39e15019479762e22892d7822917dde03f835b86b268dd3df6a1570d2e1f28a15c391b39f02740f707187f9fb1204d167b9e2f31'
6
+ metadata.gz: 76ac4f4c0af074075402e6ab1032e0bd46b500963d3763ff39f106c871cf54ae25e2fb8b3dc5a9386d3cfb53f7b3197b5a42d3e505fa014d489715a6429b4d31
7
+ data.tar.gz: 6f406303771c6a18470801ba35842fb36ff436e0d097b4971945ea3d02007c0f44349c18b3e3894affd338ba6d83ffa8f8ae7f1e9bd7650e8b3f6331585df3c2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Bugfix
6
+ * Remove dup from IPv6 summarization to slightly improve performance
7
+
3
8
  ## 0.12.0
4
9
 
5
10
  ### Enhancements
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.0
1
+ 0.12.1
@@ -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.dup.sort.map{|ip| ip.network}
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 == args.size
1003
+ if result.size == args_size
1003
1004
  # nothing more to summarize
1004
1005
  return result
1005
1006
  else
@@ -1,3 +1,3 @@
1
1
  module IPAddress
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.1"
3
3
  end
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.0
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-15 00:00:00.000000000 Z
12
+ date: 2019-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler