furnish-ip 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -5
- data/Gemfile +2 -0
- data/furnish-ip.gemspec +2 -2
- data/lib/furnish/ip.rb +15 -0
- data/lib/furnish/ip/version.rb +1 -1
- data/test/test_auto_ip_provisioner.rb +1 -1
- data/test/test_ip_lib.rb +1 -1
- data/test/test_ip_provisioner.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f9205647f3d85f7ef4718f39f0e66453ae98aa4
|
4
|
+
data.tar.gz: dc5a33d6fc3248b7f7ca1c5f25c85a4316e97372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a22862406aa005d8199ff07319d00a930c84e3410bd94470805120ecbbaed64f9d9b665ee462349118bddb6ac2b6b7a03f2493947ec841d876f47659a9539bed
|
7
|
+
data.tar.gz: 8b8bbd22d07e64b2620b1559557b9bf84b03369aa1578815c35501a03ffa4a01c789c7f2b9cbcd3bb79b72c6ff766da0426541514a47f067316794f573982bdb
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
|
1
|
+
# 0.2.1 (07/6/2013)
|
2
|
+
* Move to Minitest 5
|
3
|
+
* Convenince functions to find the gateway and network for most ranges, and
|
4
|
+
to allocate those addresses.
|
5
|
+
# 0.2.0 (05/1/2013)
|
2
6
|
* Most of Furnish::IP was moved to Furnish::RangeSet, which is basically the
|
3
7
|
same thing only without the IP limitation.
|
4
8
|
* Furnish::Port was created, which is quite literally Furnish::RangeSet.
|
5
9
|
* This release is pretty experimental and likely shouldn't be used.
|
6
|
-
|
10
|
+
|
11
|
+
# 0.1.0 (04/10/2013)
|
7
12
|
* Now supports Furnish 0.1.0, include protocol and property definitions and
|
8
13
|
all Provisioners inherit from Furnish::Provisioner::API. Recovery is still
|
9
14
|
unsupported at this time.
|
@@ -31,14 +36,17 @@
|
|
31
36
|
same IPs, resulting in a number of allocated IPs that were less than
|
32
37
|
requested. Testing indicates this problem is resolved, but issues may still
|
33
38
|
arise.
|
34
|
-
|
39
|
+
|
40
|
+
# 0.0.3 (03/25/2013)
|
35
41
|
* Several fixes around the encoding of IP addresses -- fixes Ruby 2.0.0-p0
|
36
42
|
issues.
|
37
43
|
* Furnish::IP#allocate and Furnish::IP#allocated? exist to assist with direct
|
38
44
|
allocations.
|
39
45
|
* Documentation is generated with RDoc 4
|
40
46
|
* Depend on Furnish 0.0.4
|
41
|
-
|
47
|
+
|
48
|
+
# 0.0.2 (03/20/2013)
|
42
49
|
* Migration to and exploitation of furnish 0.0.2
|
43
|
-
|
50
|
+
|
51
|
+
# 0.0.1 (03/20/2013)
|
44
52
|
* Initial release.
|
data/Gemfile
CHANGED
data/furnish-ip.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["erik+github@hollensbe.org"]
|
11
11
|
gem.description = %q{Generic IP allocator for the Furnish provisioning system}
|
12
12
|
gem.summary = %q{Generic IP allocator for the Furnish provisioning system}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/chef-workflow/furnish-ip"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_dependency 'palsy', '~> 0.0.4'
|
22
22
|
|
23
23
|
gem.add_development_dependency 'rake'
|
24
|
-
gem.add_development_dependency 'minitest', '~>
|
24
|
+
gem.add_development_dependency 'minitest', '~> 5.0'
|
25
25
|
gem.add_development_dependency 'guard-minitest'
|
26
26
|
gem.add_development_dependency 'guard-rake', '~> 0.0.8'
|
27
27
|
gem.add_development_dependency 'rdoc', '~> 4'
|
data/lib/furnish/ip.rb
CHANGED
@@ -49,5 +49,20 @@ module Furnish # :nodoc:
|
|
49
49
|
|
50
50
|
unused(name)
|
51
51
|
end
|
52
|
+
|
53
|
+
def netmask
|
54
|
+
# FIXME this is pretty hacky but this is the only way to do it with IPAddr.
|
55
|
+
subnet.send(:_to_string, subnet.instance_variable_get(:@mask_addr))
|
56
|
+
end
|
57
|
+
|
58
|
+
def gateway
|
59
|
+
allocated.to_a.sort[1]
|
60
|
+
end
|
61
|
+
|
62
|
+
def allocate_network(gateway)
|
63
|
+
allocate(range.first.to_s)
|
64
|
+
allocate(range.last.to_s)
|
65
|
+
allocate(gateway)
|
66
|
+
end
|
52
67
|
end
|
53
68
|
end
|
data/lib/furnish/ip/version.rb
CHANGED
data/test/test_ip_lib.rb
CHANGED
data/test/test_ip_provisioner.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furnish-ip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Hollensbe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: furnish
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '5.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '5.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard-minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,7 +161,7 @@ files:
|
|
161
161
|
- test/test_auto_ip_provisioner.rb
|
162
162
|
- test/test_ip_lib.rb
|
163
163
|
- test/test_ip_provisioner.rb
|
164
|
-
homepage:
|
164
|
+
homepage: https://github.com/chef-workflow/furnish-ip
|
165
165
|
licenses: []
|
166
166
|
metadata: {}
|
167
167
|
post_install_message:
|