cloud_shaped 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3fa1fc7dd45edb67881cf1c19fc51d33adfc831
|
4
|
+
data.tar.gz: 866098ba4dffa5d6f634733bbd9bebb364f4753b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0543b9ed2f0a360bfd50b9623c3b67ca48514a51119bd6391b6483a948cd012aae7e2a99d69d4b97c9e44ef0f77dd42f5304b4e72080e886727c56b887bfd34
|
7
|
+
data.tar.gz: 1f593cd5d5ca481dc40f884c550e42210477d0e6ced5d12c3237dd6c78d93487d30c9e25d198d8573f4a9ab7b7c756ac6d52b9891d8d8bf6215d74e1be9bea8a
|
@@ -47,11 +47,12 @@ module CloudShaped
|
|
47
47
|
# @param args [Hash] resource properties
|
48
48
|
#
|
49
49
|
def def_resource(name, type, *args, &block)
|
50
|
-
|
50
|
+
definition = if type.is_a?(Symbol)
|
51
51
|
send(type, *args, &block)
|
52
52
|
else
|
53
53
|
resource(type, *args, &block)
|
54
54
|
end
|
55
|
+
resources[name] = definition if definition
|
55
56
|
end
|
56
57
|
|
57
58
|
# Declares an Output.
|
data/lib/cloud_shaped/version.rb
CHANGED
@@ -61,6 +61,24 @@ describe CloudShaped::TemplateBuilder do
|
|
61
61
|
|
62
62
|
end
|
63
63
|
|
64
|
+
context "when resource macro-method returns nil" do
|
65
|
+
|
66
|
+
before do
|
67
|
+
def template_builder.nada(*args)
|
68
|
+
nil
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
it "does not define a resource" do
|
73
|
+
|
74
|
+
template_builder.def_resource("fooBar", :nada)
|
75
|
+
|
76
|
+
expect(template["Resources"]).to be_empty
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
|
64
82
|
end
|
65
83
|
|
66
84
|
describe "#def_parameter" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_shaped
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|