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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88557c947ef7dda45f0e854d7c56806e979e75f5
4
- data.tar.gz: 357ee1d5fd303402b6e538e69f245638b82b1621
3
+ metadata.gz: 508c2c185acef69a64bb0adc1c39831523ff8f21
4
+ data.tar.gz: d6c2e35724efe351ae7be2a333e7cf0c75d17c30
5
5
  SHA512:
6
- metadata.gz: c77eeab72a1f9e1dca58b8910b7dd1dee562b4e412e512911b265cdcb059f8d51fe66d2d9077155d3765f858a295c7e4b1b5f2d583d2f69e4d1d579f5fa776a1
7
- data.tar.gz: 13187537df716ae571c93eb1df4a9b8b3faf4d71820fd3f9672ccbff5e223ff069c1680fc3d456136fc9c79e1f7e3409387b7816dec342ce1eab50bcc6ea7ded
6
+ metadata.gz: b6918dc61af99ae091bbdd811e62f25798798c6a9b8b3557efc968f8a6af07cb4a9378bc0d4e8b5537c6253bd4d0f55f5bf0f8577d313d6158b7a562a5304a5d
7
+ data.tar.gz: 6741eca2aba70f1db5fca77285856583a82257c513260848b8cdbc620a74c240fc2fa636905e4553903685582f041d6519a1368cf71633669c74ab7eb3f93993
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  rvm:
2
2
  - 2.0.0
3
+ - 1.9.3
3
4
  notifications:
4
5
  recipients:
5
6
  - cowboyd@thefrontside.net
data/lib/mvcli/form.rb CHANGED
@@ -55,7 +55,7 @@ module MVCLI
55
55
  if block_given?
56
56
  @output = block
57
57
  else
58
- @output
58
+ @output = ->(form) { form.attributes }
59
59
  end
60
60
  end
61
61
 
data/lib/mvcli/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MVCLI
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -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].first.is_a?(IPAddr::InvalidAddressError)}
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')}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mvcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Lowell