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: 88837a9bfa352037ab2f2129279a0a9d7dab507b
4
- data.tar.gz: a9082c94f9587bac9ec9642787dc87ea447b489a
3
+ metadata.gz: c3fa1fc7dd45edb67881cf1c19fc51d33adfc831
4
+ data.tar.gz: 866098ba4dffa5d6f634733bbd9bebb364f4753b
5
5
  SHA512:
6
- metadata.gz: ab97c0a3f429b9a65f2ca75e1458a8adc37f1136b3a75085137d9c5f2f86124a6dc335857ff2e0e2dc5d2ff377c3a9cc8a88f8f53f8c7e7355697641b938be8f
7
- data.tar.gz: 184e53169c15670cac0ad4e382fbbaeab60be518aa40cded4bda75f7eaa32cd221ae5ad4c26d8e2a958a457f3169c4e3b73770431d26eef4515fb82265e0648d
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
- resources[name] = if type.is_a?(Symbol)
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.
@@ -1,3 +1,3 @@
1
1
  module CloudShaped
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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-22 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler