subnet_format 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -0
- data/lib/subnet_format/version.rb +1 -1
- data/spec/subnet_format_validator_spec.rb +23 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d46112fe51a28d355117c170daac9d438b24a56c
|
4
|
+
data.tar.gz: b284b21e8ad17328c6a90d260070fef6390d07c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c366a0ac25813dc6aa116f14c634b9e0922bd40b49d255d50b776805fa2e8b0b7cb7529ccd7c5fcfc63e47c6fae4d2bc78852f20efe9cd89ae4b8f438918317
|
7
|
+
data.tar.gz: 8f9847d322f030be0b5cf3d98670cc2cb298a2e14d91584c5b1443bfde95ec342a295d7b5d5a4a06a1d27f89319af22450255ac0d307fc474eee167d3fa965a5
|
data/.travis.yml
ADDED
@@ -9,6 +9,15 @@ describe SubnetFormatValidator do
|
|
9
9
|
}
|
10
10
|
}
|
11
11
|
|
12
|
+
let(:ten_dot_network) {
|
13
|
+
{
|
14
|
+
subnet_mask: '255.255.0.0',
|
15
|
+
network_address_prefix: '10.0.0.1',
|
16
|
+
dhcp_range_stop: '10.0.0.200',
|
17
|
+
dhcp_range_start: '10.0.0.10'
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
12
21
|
let(:fake_model) { FakeModel.new(network) }
|
13
22
|
|
14
23
|
subject { fake_model }
|
@@ -39,4 +48,18 @@ describe SubnetFormatValidator do
|
|
39
48
|
expect(fake_model.valid?).to be_truthy
|
40
49
|
end
|
41
50
|
end
|
51
|
+
|
52
|
+
context 'with a 10.X IP' do
|
53
|
+
|
54
|
+
let(:fake_model) { FakeModel.new(ten_dot_network) }
|
55
|
+
|
56
|
+
it { should be_valid }
|
57
|
+
|
58
|
+
context 'with an invalid IP' do
|
59
|
+
|
60
|
+
before { fake_model.dhcp_range_stop = '10.0.0.256' }
|
61
|
+
|
62
|
+
it { should_not be_valid }
|
63
|
+
end
|
64
|
+
end
|
42
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subnet_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Otander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,6 +76,7 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
|
+
- ".travis.yml"
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.md
|