blackwinter-ipaddress 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/CHANGELOG.rdoc +100 -0
- data/LICENSE +20 -0
- data/README.rdoc +961 -0
- data/Rakefile +72 -0
- data/VERSION +1 -0
- data/ipaddress.gemspec +57 -0
- data/lib/ipaddress/conversions.rb +59 -0
- data/lib/ipaddress/ipv4.rb +433 -0
- data/lib/ipaddress/ipv6.rb +682 -0
- data/lib/ipaddress/lazy.rb +19 -0
- data/lib/ipaddress/prefix.rb +269 -0
- data/lib/ipaddress.rb +967 -0
- data/test/ipaddress/ipv4_test.rb +525 -0
- data/test/ipaddress/ipv6_test.rb +409 -0
- data/test/ipaddress/prefix_test.rb +150 -0
- data/test/ipaddress_test.rb +139 -0
- data/test/test_helper.rb +16 -0
- metadata +76 -0
data/.document
ADDED
data/CHANGELOG.rdoc
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
== ipaddress 0.8.0
|
2
|
+
|
3
|
+
CHANGED:: Removed extension methods and extension directory to facilitate integration with the stdlib
|
4
|
+
CHANGED:: Reworked IPv4#<=>, now intuitively sorts objects based on the prefix
|
5
|
+
CHANGED:: IPv4#supernet now returns "0.0.0.0/0" if supernetting with a prefix less than 1
|
6
|
+
CHANGED:: IPv4#subnet now accept a new prefix instead of number of subnets (as per RFC3531)
|
7
|
+
NEW:: IPv6#network
|
8
|
+
NEW:: Prefix128#host_prefix
|
9
|
+
NEW:: IPv6#broadcast_u128
|
10
|
+
NEW:: IPv6#each
|
11
|
+
NEW:: IPv6#<=>
|
12
|
+
NEW:: IPv4#split
|
13
|
+
|
14
|
+
== ipaddress 0.7.5
|
15
|
+
|
16
|
+
CHANGED:: IPAddress::IPv4#each_host to improve speed
|
17
|
+
FIXED:: IPAddress::IPv4::summarize bug (summarization should now work properly)
|
18
|
+
NEW:: IPAddress::IPv4#include_all?
|
19
|
+
NEW:: #ipv4? and #ipv6?
|
20
|
+
|
21
|
+
== ipaddress 0.7.0
|
22
|
+
|
23
|
+
NEW:: IPAddress::IPv6#include?
|
24
|
+
NEW:: IPAddress::IPv6#network_u128
|
25
|
+
NEW:: Modified IPAddress::IPv6::Mapped to accept IPv4 mapped addresses in IPv6 format
|
26
|
+
NEW:: IPAddress::IPv4#private?
|
27
|
+
NEW:: IPAddress::IPv4::parse_classful
|
28
|
+
|
29
|
+
== ipaddress 0.6.0
|
30
|
+
|
31
|
+
=== API changes
|
32
|
+
* IPv4#to_s now returns the address portion only,
|
33
|
+
to retain compatibility with IPAddr. Example:
|
34
|
+
|
35
|
+
IPAddress("172.16.10.1/24").to_s
|
36
|
+
#=> "172.16.10.1" # ipaddress 0.6.0
|
37
|
+
|
38
|
+
IPAddress("172.16.10.1/24").to_s
|
39
|
+
#=> "172.16.10.1/24" # ipaddress 0.5.0
|
40
|
+
|
41
|
+
* IPv6#to_s now returns the address portion only,
|
42
|
+
to retain compatibility with IPAddr. Example:
|
43
|
+
|
44
|
+
IPAddress "2001:db8::8:800:200c:417a/64".to_s
|
45
|
+
#=> "2001:db8::8:800:200c:417a" # ipaddress 0.6.0
|
46
|
+
|
47
|
+
IPAddress "2001:db8::8:800:200c:417a/64".to_s
|
48
|
+
#=> "2001:db8::8:800:200c:417a/64" # ipaddress 0.6.0
|
49
|
+
|
50
|
+
* IPv6::Unspecified#to_s, IPv6::Loopback and
|
51
|
+
IPv6::Mapped#to_s now return the address portion only,
|
52
|
+
to retain compatibility with IPAddr.
|
53
|
+
* IPv4::summarize now returns an array even if the
|
54
|
+
result is a single subnet, to keep consistency
|
55
|
+
and avoid confusion
|
56
|
+
|
57
|
+
=== New methods
|
58
|
+
* IPv4#to_string and IPv6#to_string: print the address
|
59
|
+
with the prefix portion, like the #to_s method in
|
60
|
+
ipaddress 0.5.0
|
61
|
+
* IPAddress::parse, for those who don't like the wrapper
|
62
|
+
method IPAddress()
|
63
|
+
* IPv6#to_string_uncompressed, returns a string with the
|
64
|
+
uncompressed IPv6 and the prefix
|
65
|
+
* IPv6::Mapped#to_string, returns the IPv6 Mapped address
|
66
|
+
with IPv4 notation and the prefix
|
67
|
+
* IPv6#reverse, returns the ip6.arpa DNS reverse lookup
|
68
|
+
string
|
69
|
+
* IPv4#arpa and IPv6#arpa, alias of the respective #reverse
|
70
|
+
methods
|
71
|
+
* Prefix#+, Prefix#-
|
72
|
+
|
73
|
+
=== Library structure
|
74
|
+
* Moved all the IPAddress module methods from
|
75
|
+
lib/ipaddress/ipbase.rb to lib/ipaddress.rb
|
76
|
+
* Removed IPBase superclass
|
77
|
+
* IPv4 and IPv6 classes no longer inherit from IPBase
|
78
|
+
* Removed lib/ipaddress/ipbase.rb
|
79
|
+
* Removed test/ipaddress/ipbase_test.rb
|
80
|
+
|
81
|
+
=== Minor fixes
|
82
|
+
* Replaced Ruby 1.9 deprecated Hash#index with Hash#key
|
83
|
+
* Removed require ruby-prof from tests which was causing
|
84
|
+
users to install ruby-prof or manually remove the line
|
85
|
+
* Removed "must" method from tests, replaced by normal
|
86
|
+
Test::Unit methods
|
87
|
+
* Removed duplicate Jeweler entry in Rakefile
|
88
|
+
* Made Integer#closest_power_of_2 more general by adding
|
89
|
+
an optional limit parameter
|
90
|
+
* Fixed summarization algorithm (thanks to nicolas fevrier)
|
91
|
+
* Fixed bug in prefix_from_ip (thanks to jdpace)
|
92
|
+
|
93
|
+
=== Documentation
|
94
|
+
* Normalized README rdoc headers
|
95
|
+
* Added documentation for IPAddress::Prefix
|
96
|
+
* Added documentation for IPAddress::IPv4 and
|
97
|
+
IPAddress::IPv6
|
98
|
+
* Fixed formatting
|
99
|
+
* Fixed lots of typos
|
100
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009-2011 Marco Ceresa
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|