pio 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pio/ipv4_address.rb +5 -1
- data/lib/pio/version.rb +1 -1
- data/spec/pio/ipv4_address_spec.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1a7685cf52cf2c1130a376ecbb0deb4d3bab6f
|
4
|
+
data.tar.gz: dedeebabbd435531e5937344abd6c774e781b45b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ec7121d3566f35e7c1b282019fbd38325c4c9910739a29e3407f2c5d58916f8d07306b3a8cf3fe65315c3c68c6a3aebc702a8e9866bf6a589434fdb338a3e6
|
7
|
+
data.tar.gz: 3844655945ad07e364deab3923dfeb702b96db4c2398e7a9511fbbf4592c381e10143dba62ee4d2cc7d098cb16e0c8ff260c02dbd433409a9d966dc1db96e1f8
|
data/lib/pio/ipv4_address.rb
CHANGED
data/lib/pio/version.rb
CHANGED
@@ -11,7 +11,8 @@ module Pio
|
|
11
11
|
let( :ip_address ) { "10.1.1.1" }
|
12
12
|
|
13
13
|
its( :to_s ) { should eq "10.1.1.1" }
|
14
|
-
its( :to_i ) { should eq ( ( 10 * 256 + 1 ) * 256 + 1 ) * 256 + 1 }
|
14
|
+
its( :to_i ) { should eq ( ( ( 10 * 256 + 1 ) * 256 + 1 ) * 256 + 1 ) }
|
15
|
+
its( :prefixlen ) { should eq 32 }
|
15
16
|
its( :to_ary ) { should eq [ 0x0a, 0x01, 0x01, 0x01 ] }
|
16
17
|
its( :class_a? ) { should be_true }
|
17
18
|
its( :class_b? ) { should be_false }
|
@@ -45,7 +46,7 @@ module Pio
|
|
45
46
|
let( :ip_address ) { "172.20.1.1" }
|
46
47
|
|
47
48
|
its( :to_s ) { should eq "172.20.1.1" }
|
48
|
-
its( :to_i ) { should eq ( ( 172 * 256 + 20 ) * 256 + 1 ) * 256 + 1 }
|
49
|
+
its( :to_i ) { should eq ( ( ( 172 * 256 + 20 ) * 256 + 1 ) * 256 + 1 ) }
|
49
50
|
its( :to_ary ) { should eq [ 0xac, 0x14, 0x01, 0x01 ] }
|
50
51
|
its( :class_a? ) { should be_false }
|
51
52
|
its( :class_b? ) { should be_true }
|
@@ -77,7 +78,7 @@ module Pio
|
|
77
78
|
let( :ip_address ) { "234.1.1.1" }
|
78
79
|
|
79
80
|
its( :to_s ) { should eq "234.1.1.1" }
|
80
|
-
its( :to_i ) { should eq ( ( 234 * 256 + 1 ) * 256 + 1 ) * 256 + 1 }
|
81
|
+
its( :to_i ) { should eq ( ( ( 234 * 256 + 1 ) * 256 + 1 ) * 256 + 1 ) }
|
81
82
|
its( :to_ary ) { should eq [ 0xea, 0x01, 0x01, 0x01 ] }
|
82
83
|
its( :class_a? ) { should be_false }
|
83
84
|
its( :class_b? ) { should be_false }
|