subnet_calc 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/subnet_calc.rb +3 -4
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed194bf35fe325fc2fb62ea861140f63c0f6b5ac
|
4
|
+
data.tar.gz: 48a9537735c184f33cc7f170364c157e0b7bdcbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37e0e8c28058efe0a2e8a7616e05f778d89faf799a4ad459fc14b442622e9c79a6860c864ba29d561dfa9875ad33f9bfa0c1cdf7d3a5fea09c645bf1597e830a
|
7
|
+
data.tar.gz: f12f12f39424d089ca56299099327b01c13cab8725dedaa0b4162f2e77913a98c16ac29f384382ece6db222f9a0477b1e603a6b5432ee69f7eb406672518f1fa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/subnet_calc.rb
CHANGED
@@ -161,8 +161,7 @@ class SubnetCalc
|
|
161
161
|
|
162
162
|
first_ip = (ip + [subnets.first.first]).join('.')
|
163
163
|
last_ip = (ip + [subnets.first.last]).join('.')
|
164
|
-
|
165
|
-
|
164
|
+
|
166
165
|
|
167
166
|
result = {
|
168
167
|
class_type: class_type.upcase,
|
@@ -191,7 +190,7 @@ class SubnetCalc
|
|
191
190
|
([i+1] + x.to_h.values).map(&:to_s)
|
192
191
|
end
|
193
192
|
|
194
|
-
tfo.labels = %w(index Network 1st last broadcast)
|
193
|
+
tfo.labels = %w(index: Network: 1st: last: broadcast:)
|
195
194
|
full_subnets_table = tfo.display(markdown: true).to_s
|
196
195
|
|
197
196
|
subnets_table = if full_subnets_table.lines.length > 14 then
|
@@ -206,7 +205,7 @@ class SubnetCalc
|
|
206
205
|
|
207
206
|
prefixes = @prefixes[@octet_n].map {|x| '/' + x.to_s}
|
208
207
|
tfo2.source = [@h[:subnet_bitmask][@octet_n].chars, prefixes]
|
209
|
-
tfo2.labels = 8.times.map {|n| (2 ** n).to_s }.reverse
|
208
|
+
tfo2.labels = 8.times.map {|n| (2 ** n).to_s + ':' }.reverse
|
210
209
|
octet_table = tfo2.display(markdown: true).to_s
|
211
210
|
|
212
211
|
<<EOF
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subnet_calc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -59,20 +59,20 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
62
|
+
version: '0.4'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
65
|
+
version: 0.4.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
72
|
+
version: '0.4'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.4.0
|
76
76
|
description:
|
77
77
|
email: james@r0bertson.co.uk
|
78
78
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|