better_ipaddr 0.1.6 → 0.2.0
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/lib/better_ipaddr/classes.rb +8 -0
- data/lib/better_ipaddr/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 427cfc9ba0645edbcb3dd185a7bc13a4d44474ab
|
4
|
+
data.tar.gz: f56f93a8ed9c724f9910db69b35c12da7b68ad17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 206c1a4a003d56ccebb74308b615a622033c9bca9348dcb2516df7fdf5edd3745db3294c8cc2f221b351c35f13fbf92973e808e4f2770962c4668e4310a8b9d9
|
7
|
+
data.tar.gz: efc78d7a0e9c19fcf825faa48c728b3e1b7d307c9db0c94550fc5860b2057a6accab757fd6f8b7b611654a69a79b3882f628ed48f72d3953da9e29d519b5e3cd
|
data/README.md
CHANGED
@@ -103,7 +103,7 @@ The available methods are described in the [API docs](http://www.rubydoc.info/ge
|
|
103
103
|
|
104
104
|
## Development
|
105
105
|
|
106
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake
|
106
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
107
107
|
|
108
108
|
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).
|
109
109
|
|
@@ -26,6 +26,14 @@ class IPAddr
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
# Convert the given string to an IPAddr subclass.
|
30
|
+
#
|
31
|
+
# @param address [String] the string to convert
|
32
|
+
# @return [IPAddr::V4, IPAddr::V6, IPAddr::EUI48]
|
33
|
+
def self.parse(address)
|
34
|
+
specialize IPAddr.new(address)
|
35
|
+
end
|
36
|
+
|
29
37
|
# Return the given address as an instance of a class specific to
|
30
38
|
# its address family.
|
31
39
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_ipaddr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Miller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,4 +100,3 @@ signing_key:
|
|
100
100
|
specification_version: 4
|
101
101
|
summary: IPAddr enhancements for network management.
|
102
102
|
test_files: []
|
103
|
-
has_rdoc:
|