ipaddr 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +13 -6
  3. data/ipaddr.gemspec +3 -1
  4. data/lib/ipaddr.rb +6 -6
  5. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 409feb75e6b948e43ff047dfab95e15d71cb744a
4
- data.tar.gz: 7c4860ccfb49a0a60c896dbe992949f4e6414933
3
+ metadata.gz: f8cb14fdb3f8348c7bc311ccc8849780308351aa
4
+ data.tar.gz: c4abec7410bd5418133225309263bb2ac664894e
5
5
  SHA512:
6
- metadata.gz: 0f8c85dec1cd6721254f2696b665b552864454288caea21f794d652fcce9c7e8783e816fbf0902699c99cf859b197cef1ddd1bda9fd89b417fa6d19c5a151a5b
7
- data.tar.gz: fd661af42fbe9c53c5a2cf386790b91d32e4d78b49373f2ad14ac2f5bc28ddab4f01efc4b3e3bf8736d701fe1db8ba1bfab3664d487eec2a23f212b10df3cc94
6
+ metadata.gz: 6230a8dddd78fa8669e750845964337a26ee0cb223492987b25feb2f80d5a7bbd42be8f706a5e417840965cf11e470efcf0009ecd76ee4673f58c0a657148d37
7
+ data.tar.gz: 04c735f491e8f8690b83c529f394e48e8dfb208d4ed8a8303a0605aefb9c7d906a1ed4bae5bc7e0f56977fabf855aef70b6937d144acc5e97e399d2fd6269ece
@@ -1,14 +1,21 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
+ - 2.3
4
5
  - 2.4
6
+ - 2.5.0
5
7
  - ruby-head
6
- - jruby
7
- - jruby-head
8
8
  matrix:
9
+ include:
10
+ - rvm: jruby-9.1.13.0
11
+ jdk: openjdk8
12
+ - rvm: jruby-9.1.13.0
13
+ jdk: oraclejdk8
14
+ - rvm: jruby-head
15
+ jdk: openjdk8
16
+ - rvm: jruby-head
17
+ jdk: oraclejdk8
9
18
  allow_failures:
10
- # Even `rvm use jruby` does not work reliably on Travis:
11
- # https://travis-ci.org/ruby/ipaddr/jobs/277222999
12
- - rvm: jruby
13
- - rvm: jruby-head
19
+ - rvm: ruby-head
20
+ - rvm: jruby-head
14
21
  before_install: gem install bundler
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
1
2
  # coding: utf-8
2
3
  lib = File.expand_path("../lib", __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = "ipaddr"
7
- spec.version = "1.2.0"
8
+ spec.version = "1.2.1"
8
9
  spec.authors = ["Akinori MUSHA", "Hajimu UMEMOTO"]
9
10
  spec.email = ["knu@idaemons.org", "ume@mahoroba.org"]
10
11
 
@@ -14,6 +15,7 @@ IPAddr provides a set of methods to manipulate an IP address.
14
15
  Both IPv4 and IPv6 are supported.
15
16
  DESCRIPTION
16
17
  spec.homepage = "https://github.com/ruby/ipaddr"
18
+ spec.license = "BSD-2-Clause"
17
19
 
18
20
  spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "ipaddr.gemspec", "lib/ipaddr.rb"]
19
21
  spec.bindir = "exe"
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  #
3
3
  # ipaddr.rb - A class to manipulate an IP address
4
4
  #
@@ -103,13 +103,13 @@ class IPAddr
103
103
 
104
104
  # Creates a new ipaddr containing the given network byte ordered
105
105
  # string form of an IP address.
106
- def IPAddr::new_ntoh(addr)
107
- return IPAddr.new(IPAddr::ntop(addr))
106
+ def self.new_ntoh(addr)
107
+ return new(ntop(addr))
108
108
  end
109
109
 
110
110
  # Convert a network byte ordered string form of an IP address into
111
111
  # human readable form.
112
- def IPAddr::ntop(addr)
112
+ def self.ntop(addr)
113
113
  case addr.size
114
114
  when 4
115
115
  s = addr.unpack('C4').join('.')
@@ -310,7 +310,7 @@ class IPAddr
310
310
 
311
311
  # Returns true if the ipaddr is an IPv4-compatible IPv6 address.
312
312
  def ipv4_compat?
313
- warn "#{caller(1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE
313
+ warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE
314
314
  _ipv4_compat?
315
315
  end
316
316
 
@@ -336,7 +336,7 @@ class IPAddr
336
336
  # Returns a new ipaddr built by converting the native IPv4 address
337
337
  # into an IPv4-compatible IPv6 address.
338
338
  def ipv4_compat
339
- warn "#{caller(1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE
339
+ warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE
340
340
  if !ipv4?
341
341
  raise InvalidAddressError, "not an IPv4 address"
342
342
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipaddr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-10-21 00:00:00.000000000 Z
12
+ date: 2018-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -74,7 +74,8 @@ files:
74
74
  - ipaddr.gemspec
75
75
  - lib/ipaddr.rb
76
76
  homepage: https://github.com/ruby/ipaddr
77
- licenses: []
77
+ licenses:
78
+ - BSD-2-Clause
78
79
  metadata: {}
79
80
  post_install_message:
80
81
  rdoc_options: []
@@ -92,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  version: '0'
93
94
  requirements: []
94
95
  rubyforge_project:
95
- rubygems_version: 2.6.14
96
+ rubygems_version: 2.6.14.1
96
97
  signing_key:
97
98
  specification_version: 4
98
99
  summary: A class to manipulate an IP address in ruby