mvcli 0.0.8 → 0.0.9
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 +4 -4
- data/.travis.yml +1 -0
- data/lib/mvcli/form.rb +1 -1
- data/lib/mvcli/version.rb +1 -1
- data/spec/mvcli/form_spec.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 508c2c185acef69a64bb0adc1c39831523ff8f21
|
4
|
+
data.tar.gz: d6c2e35724efe351ae7be2a333e7cf0c75d17c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6918dc61af99ae091bbdd811e62f25798798c6a9b8b3557efc968f8a6af07cb4a9378bc0d4e8b5537c6253bd4d0f55f5bf0f8577d313d6158b7a562a5304a5d
|
7
|
+
data.tar.gz: 6741eca2aba70f1db5fca77285856583a82257c513260848b8cdbc620a74c240fc2fa636905e4553903685582f041d6519a1368cf71633669c74ab7eb3f93993
|
data/.travis.yml
CHANGED
data/lib/mvcli/form.rb
CHANGED
data/lib/mvcli/version.rb
CHANGED
data/spec/mvcli/form_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe "A form for creating a load balancer" do
|
|
13
13
|
|
14
14
|
input :protocol, String, default: 'HTTP', decode: :upcase
|
15
15
|
|
16
|
-
input :virtual_ips, [String], default: ['PUBLIC']
|
16
|
+
input :virtual_ips, [String], default: ['PUBLIC'], decode: :upcase
|
17
17
|
|
18
18
|
input :nodes, [Node], required: true do
|
19
19
|
input :address, IPAddr, required: true, decode: ->(s) {IPAddr.new s}
|
@@ -52,7 +52,7 @@ describe "A form for creating a load balancer" do
|
|
52
52
|
end
|
53
53
|
context "the second error" do
|
54
54
|
Given(:errors) {form.validation[:nodes].last.errors}
|
55
|
-
Then {errors[:address].
|
55
|
+
Then { not errors[:address].empty? }
|
56
56
|
end
|
57
57
|
end
|
58
58
|
context "with partially specified, valid inputs" do
|
@@ -87,6 +87,10 @@ describe "A form for creating a load balancer" do
|
|
87
87
|
And {form.port == 80}
|
88
88
|
And {form.protocol == 'HTTP'}
|
89
89
|
And {form.nodes.length == 2}
|
90
|
+
|
91
|
+
Given(:attributes) {form.value.to_hash.reject {|k,v| k == "nodes"}}
|
92
|
+
Then {attributes == {"name" => "foo", "port" => 80, "protocol" => "HTTP", "virtual_ips" => ["PUBLIC", "SERVICENET"]}}
|
93
|
+
|
90
94
|
context ". On the first node" do
|
91
95
|
Given(:node) {form.nodes.first}
|
92
96
|
Then {node.address == IPAddr.new('10.0.0.1')}
|