net-address 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: 49b34ee328f786f6c03435b5af4648f300deb418
4
- data.tar.gz: 9ea72cf12d3e77b8235619c61527030008ed03e2
2
+ SHA256:
3
+ metadata.gz: d9a6f3059fad7497734bf84b1a3cbc78424ca9a4ad464cc148f4b282e924a5f9
4
+ data.tar.gz: 40aa89ebcb5576d5a6e441eb5eb96ff55188f7156f64a949f19e664b6d5eb850
5
5
  SHA512:
6
- metadata.gz: 4a2688a71b747233bb0af5ca9d41380ec34320517dbf7d2c80b5ffe15d80e39857f6659ae28cfce7a236eff85ae2714f1c99c4fc175be78ce64430f1aa1a6fbe
7
- data.tar.gz: 2bdcf9869329db2349972ceea4dcb6e44f509b0bba0e40f07b392434702f63e96c46883957ddf07b5d769dd2a7fff7626caf7becb356b33b168fff5856d7c581
6
+ metadata.gz: 8957098a515056b4dd8f358f25defd22c7edea00ace7b7be35f9eb996aa49210993c3c0c3cf1a59ff4b8a2dae1fa5afe0c31c93acfbd053c6047899e29c17fef
7
+ data.tar.gz: 3e6d3b82fa4c971d3d3fa579ece667ea383d5bc2cc410fdbb06583be2a6d9bd5dfcf418261eb0ad666299d3feaae3b4f3b5efaf90ece48b1ae1ece604fa6b5cc
data/.gitignore CHANGED
@@ -11,3 +11,5 @@
11
11
  .rspec_status
12
12
  .idea/
13
13
  Gemfile.lock
14
+ *.gem
15
+
data/.travis.yml CHANGED
@@ -1,5 +1,13 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.3
4
+ - 2.4.3
5
5
  before_install: gem install bundler -v 1.16.0
6
+ deploy:
7
+ provider: rubygems
8
+ api_key:
9
+ secure: UE5A71MwHTf57ohHMPO6J1+u3n0YKMrXNhiiurgBDWqJqkv1X5KGUJF+MKE/9s0Y0jLcm8+qT3EipRVoxGXR8kHBa+8qt0KzTM9hZBZmmdAmPSWo2/sMJ8+AvW31zRSVU4UA0i4GNcnS//PJTrql5e6FYoyAyrarHCVqXnQYqX0GiywquJfXPjWNPRYZZFbKqvYYJgmUiawJbJe2L9Q6VR9vom//wAgz+cizBnsi0xDp6CD2qw6FcuU5T0/7om/SmnTwz5570RngzwraZFDmEMupL2jW14FijqZLEFCz+NTpxxjp6cRhjGMi9kcsgXJ0ltUINn5b62HHUjPes2UFlpfF62a9TUj48K20xwlYJT2iU7PfeZUWK0qTpejJCfsTC+ylCx6k1zpH/ePmhUTOXLgF0oVx6vdbHCOp7U5eObEk00JKHWFIXOV8qPSgGC3JUloY6xGEJS4V//6l/I/4oqkA+qZGAzVY2xbznh+3JuSrBorqH9xZg0pHePH1CHcKbu0p3v//JbjNMst1KaUKOWC7S8Eu9psktxDdaPDu2ijWYVWqBzquU1s79ft7smnsGU8hxtUdinMDSMWnSvZU79dssfq52rTgUnaP528j72KtxLMYuyxn7Q9twx3Yi2v9vkMZUTreCuMppjqIfOZTuCmYJs+jRyYxVxsj5E32Of8=
10
+ gem: net-address
11
+ on:
12
+ tags: true
13
+ repo: pwojcieszonek/net-address
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Net::Address
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/net/address`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Simple library designed to make manipulation of network addresses such as MAC, IPv4, Netmask.
4
+ It resolv some issue with standard ruby library IPAddr like store both the address and the prefix information
5
+ or quickly find the broadcast address of a network.
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
6
7
 
7
8
  ## Installation
8
9
 
@@ -20,9 +21,6 @@ Or install it yourself as:
20
21
 
21
22
  $ gem install net-address
22
23
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
24
 
27
25
  ## Development
28
26
 
@@ -3,6 +3,7 @@
3
3
  # Copyright 03.01.2018 by Piotr Wojcieszonek
4
4
 
5
5
  require 'net/address/mask'
6
+ require 'ipaddr'
6
7
 
7
8
  module Net
8
9
  module Address
@@ -74,6 +75,8 @@ module Net
74
75
  when self.class
75
76
  @address = address.to_i
76
77
  @mask = address.mask
78
+ when IPAddr
79
+ @address = address.to_i
77
80
  when Integer
78
81
  parse_integer(address)
79
82
  when String
@@ -1,5 +1,5 @@
1
1
  module Net
2
2
  module Address
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
data/net-address.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Ruby library for network addresses}
13
13
  spec.description = %q{Net::Address is a Ruby library designed to make manipulation of network addresses such as MAC, IPv4, Netmask.}
14
- spec.homepage = "https://github.com/pwojcieszonek/net-address."
14
+ spec.homepage = "https://github.com/pwojcieszonek/net-address"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -24,4 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "bundler", "~> 1.16"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
+
28
+ spec.required_ruby_version = '>= 2.2.0'
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-address
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Wojcieszonek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-07 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ files:
76
76
  - lib/net/address/mask.rb
77
77
  - lib/net/address/version.rb
78
78
  - net-address.gemspec
79
- homepage: https://github.com/pwojcieszonek/net-address.
79
+ homepage: https://github.com/pwojcieszonek/net-address
80
80
  licenses:
81
81
  - MIT
82
82
  metadata: {}
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '0'
91
+ version: 2.2.0
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.6.14
99
+ rubygems_version: 2.7.4
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Ruby library for network addresses