ipaddr-ext 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efb2c1d3849cb842a7fd508f3bdfddd4ab1bbfcc45075b74f074adf918bc82f8
4
- data.tar.gz: b7a81fc6cb1d480f569d2a6c9aa397a1b32d3666c0c10afd14bec1e954fce2fa
3
+ metadata.gz: 7e5e27aeac111152f26870f5abafb89cd128ead2afbb67f98881897150b6b899
4
+ data.tar.gz: 79cc72fe640ae7949c71bb9c696c7d3b95115ad17fa98e58f5ac86eb57dc795e
5
5
  SHA512:
6
- metadata.gz: dc28d0d3d2e2b1cb8b18c1294eccd764279e8594252a3a8927d44db992f7f91cd9a2ff4a19a3d3dccdb7c042c3a74f5b33cf70c2ffdad59df5ecfc0a544167a6
7
- data.tar.gz: d333f5b64e6a3a6688b38dea8dc1d8eb6adcfc91f31863162534eeb23e2cb4b77d03ef3230bb29500f30086291ae686e63e981a56dc8209a99ee8ff8e8ba8098
6
+ metadata.gz: 1ac94aff5432144874ba9f902b92222887cc696d9c1fe8a4a6394a54d1fd504f3101f7e0e074e5453c2200fe2b58d807e11e7fb951033f34aa13351b887674b7
7
+ data.tar.gz: 384def479b5ac4ff9bc990f24fe696004c36322b906179421f6fbd6addd5842c958e28f10b8f82f765b243d6b50d27a58032482ed5dccdfd3360f267f557787d
data/Gemfile CHANGED
@@ -4,6 +4,8 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
+ gem "irb"
8
+
7
9
  if ENV['CI'].nil?
8
10
  # for development
9
11
  gem "actionview"
@@ -12,5 +14,21 @@ else
12
14
  # for CI
13
15
  unless ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] == ''
14
16
  gem "actionview", "~> #{ENV['RAILS_VERSION']}.0"
17
+
18
+ if ENV['RAILS_VERSION'] == '7.0' || ENV['RAILS_VERSION'] == '6.1'
19
+ # Fix https://github.com/rails/rails/issues/54260
20
+ gem "concurrent-ruby", "1.3.4"
21
+ end
22
+
23
+ if RUBY_VERSION >= '3.3'
24
+ gem 'mutex_m'
25
+ gem 'base64'
26
+ gem 'bigdecimal'
27
+ gem 'drb'
28
+ end
29
+ if RUBY_VERSION >= '3.4'
30
+ gem 'benchmark'
31
+ gem 'logger'
32
+ end
15
33
  end
16
34
  end
data/ipaddr-ext.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/interop-tokyo-shownet/ipaddr-ext"
19
19
  spec.metadata["changelog_uri"] = "https://github.com/interop-tokyo-shownet/ipaddr-ext/releases"
20
+ spec.metadata["rubygems_mfa_required"] = "true"
20
21
 
21
22
  # Specify which files should be added to the gem when it is released.
22
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -40,6 +40,12 @@ module IPAddrExt
40
40
  # Returns true if two ipaddrs are equal.
41
41
  # Overwrite original == method, fixing to compare address with prefix
42
42
  def ==(other)
43
+ # Fix inconsistent behavior between `IPAddr.new("0.0.0.0") == nil` and `nil == IPAddr.new("0.0.0.0")`
44
+ # https://github.com/ruby/ipaddr/pull/76
45
+ if other.nil?
46
+ return false
47
+ end
48
+
43
49
  other = coerce_other(other)
44
50
  rescue
45
51
  false
@@ -47,16 +53,20 @@ module IPAddrExt
47
53
  @family == other.family && @addr == other.to_i && prefix == other.prefix
48
54
  end
49
55
 
50
- # Returns a address greater than the original address by offset
51
- # @param offset [Integer]
52
- def +(offset)
53
- self.clone.set(@addr + offset, @family)
56
+ unless IPAddr.method_defined?(:+)
57
+ # Returns a address greater than the original address by offset
58
+ # @param offset [Integer]
59
+ def +(offset)
60
+ self.clone.set(@addr + offset, @family)
61
+ end
54
62
  end
55
63
 
56
- # Returns a address less than the original address by offset
57
- # @param offset [Integer]
58
- def -(offset)
59
- self.clone.set(@addr - offset, @family)
64
+ unless IPAddr.method_defined?(:-)
65
+ # Returns a address less than the original address by offset
66
+ # @param offset [Integer]
67
+ def -(offset)
68
+ self.clone.set(@addr - offset, @family)
69
+ end
60
70
  end
61
71
 
62
72
  # Returns the host address
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IPAddrExt
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipaddr-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taketo Takashima
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -64,7 +63,7 @@ metadata:
64
63
  homepage_uri: https://github.com/interop-tokyo-shownet/ipaddr-ext
65
64
  source_code_uri: https://github.com/interop-tokyo-shownet/ipaddr-ext
66
65
  changelog_uri: https://github.com/interop-tokyo-shownet/ipaddr-ext/releases
67
- post_install_message:
66
+ rubygems_mfa_required: 'true'
68
67
  rdoc_options: []
69
68
  require_paths:
70
69
  - lib
@@ -79,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
78
  - !ruby/object:Gem::Version
80
79
  version: '0'
81
80
  requirements: []
82
- rubygems_version: 3.5.16
83
- signing_key:
81
+ rubygems_version: 4.0.6
84
82
  specification_version: 4
85
83
  summary: Extensions for IPAddr Class
86
84
  test_files: []