ipaddr 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ipaddr.gemspec +11 -3
- data/lib/ipaddr.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06fb862bc853927b4eb39fd9026c6c8ad873faa1a68f9c39273dc138f7eb0d37
|
4
|
+
data.tar.gz: 67115eb06827bcde6f1639535494f5b190529b127577af48f76ae3bf4886110c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e75fe29c69c244547d966127f1fd98b38352ad562ac2c5b2cdbb301374d390b99ab81f8bdc976f23668df2cfe9b03872a8fef559769f474668936bea5f219c2
|
7
|
+
data.tar.gz: 62a69ec4cdbe84424750ec9b1947a4d6184bf835db3cc3a1053da8e646c7df5557ae9ba36c9943e827f6c3d4e238127d5d1ce6fab89b4bdf482dcd58753e0134
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ than `ipaddr` has, try this library instead.
|
|
55
55
|
|
56
56
|
## Development
|
57
57
|
|
58
|
-
After checking out the repo, run `
|
58
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
|
59
59
|
|
60
60
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
61
61
|
|
data/ipaddr.gemspec
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# coding: utf-8
|
3
|
-
lib = File.expand_path("../lib", __FILE__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
|
6
|
-
|
4
|
+
if File.exist?(File.expand_path("ipaddr.gemspec"))
|
5
|
+
lib = File.expand_path("../lib", __FILE__)
|
6
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
|
+
|
8
|
+
file = File.expand_path("ipaddr.rb", lib)
|
9
|
+
else
|
10
|
+
# for ruby-core
|
11
|
+
file = File.expand_path("../ipaddr.rb", __FILE__)
|
12
|
+
end
|
13
|
+
|
14
|
+
version = File.foreach(file).find do |line|
|
7
15
|
/^\s*VERSION\s*=\s*["'](.*)["']/ =~ line and break $1
|
8
16
|
end
|
9
17
|
|
data/lib/ipaddr.rb
CHANGED
@@ -40,14 +40,14 @@ require 'socket'
|
|
40
40
|
# p ipaddr3 #=> #<IPAddr: IPv4:192.168.2.0/255.255.255.0>
|
41
41
|
|
42
42
|
class IPAddr
|
43
|
-
VERSION = "1.2.
|
43
|
+
VERSION = "1.2.5"
|
44
44
|
|
45
45
|
# 32 bit mask for IPv4
|
46
46
|
IN4MASK = 0xffffffff
|
47
47
|
# 128 bit mask for IPv6
|
48
48
|
IN6MASK = 0xffffffffffffffffffffffffffffffff
|
49
49
|
# Format string for IPv6
|
50
|
-
IN6FORMAT = (["%.4x"] * 8).join(':')
|
50
|
+
IN6FORMAT = (["%.4x"] * 8).join(':').freeze
|
51
51
|
|
52
52
|
# Regexp _internally_ used for parsing IPv4 address.
|
53
53
|
RE_IPV4ADDRLIKE = %r{
|
@@ -736,7 +736,7 @@ end
|
|
736
736
|
unless Socket.const_defined? :AF_INET6
|
737
737
|
class Socket < BasicSocket
|
738
738
|
# IPv6 protocol family
|
739
|
-
AF_INET6 = Object.new
|
739
|
+
AF_INET6 = Object.new.freeze
|
740
740
|
end
|
741
741
|
|
742
742
|
class << IPSocket
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipaddr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akinori MUSHA
|
8
8
|
- Hajimu UMEMOTO
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
IPAddr provides a set of methods to manipulate an IP address.
|
@@ -30,7 +30,7 @@ licenses:
|
|
30
30
|
- Ruby
|
31
31
|
- BSD-2-Clause
|
32
32
|
metadata: {}
|
33
|
-
post_install_message:
|
33
|
+
post_install_message:
|
34
34
|
rdoc_options: []
|
35
35
|
require_paths:
|
36
36
|
- lib
|
@@ -45,8 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
|
-
rubygems_version: 3.0.
|
49
|
-
signing_key:
|
48
|
+
rubygems_version: 3.4.0.dev
|
49
|
+
signing_key:
|
50
50
|
specification_version: 4
|
51
51
|
summary: A class to manipulate an IP address in ruby
|
52
52
|
test_files: []
|