cloud_former 0.3.0 → 0.3.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: 94e3a30a109549aadb2da53bb32be3deaf536791
4
- data.tar.gz: 44089503392d944d4f5e60a57cb0a60c1b73ef6f
3
+ metadata.gz: f390c741a72a1ffd06c179e2367d5fd9b124be9c
4
+ data.tar.gz: cd679a0474e7a7cf68a45d4bc6eb4d185b8cd284
5
5
  SHA512:
6
- metadata.gz: 29d3495e5b74a64d38e5e1e6199d4759091324656e4d22c1322ce26cac3908abf964fc9e382495941dc4805ab0d964e69ec56be2c432560625dd097c4bb60b8c
7
- data.tar.gz: 09c66cff9c02f846190692a6da019937dc1df0c2a0b86adea1692bf4bb8c0ef8f3046dfc6a0d096e423b93157feacdbc13c82c0cefbbd5da4a500a28159943cb
6
+ metadata.gz: 068bed558e1b29b2548773a90ce97b270d3157eb09632ae92c1b3e7c3c873676d09d0c42a02c26b2c7c13736dd30c8c930079d043fa52bdf7a060ed1bee53bee
7
+ data.tar.gz: c40b8b035e036583f6a2453c54ba3ab4a2fbd4c4264dfdeb05d2a7eae8fb0654935ed38250273466ccf525bf2738de198efe6e1249c08c9a723d9f80b4ce262a
@@ -54,7 +54,7 @@ module CloudFormer
54
54
  define_method(name) do |val='!!!****noarggiven****!!!'|
55
55
  if val != '!!!****noarggiven****!!!'
56
56
  if options[:list] && !val.respond_to?(:each)
57
- unless val.respond_to?(:acts_as_list?) && val.acts_as_list?
57
+ if (!val.respond_to?(:acts_as_list?) || !val.acts_as_list?) && options[:list] != :ok
58
58
  raise ArgumentError.new(
59
59
  "A list is required for #{name} in #{self.class.name}, but a #{val.class.name} was given."
60
60
  )
@@ -63,8 +63,18 @@ module CloudFormer
63
63
 
64
64
  if options[:list]
65
65
  unless val.respond_to?(:acts_as_list?) && val.acts_as_list?
66
- val.each do |item|
67
- self.class.check_type_of_aws_value(item, options)
66
+ if options[:list] == :ok
67
+ if val.respond_to?(:each)
68
+ val.each do |item|
69
+ self.class.check_type_of_aws_value(item, options)
70
+ end
71
+ else
72
+ self.class.check_type_of_aws_value(val, options)
73
+ end
74
+ else
75
+ val.each do |item|
76
+ self.class.check_type_of_aws_value(item, options)
77
+ end
68
78
  end
69
79
  end
70
80
  else
@@ -4,7 +4,7 @@ module CloudFormer
4
4
  class OptionSetting < ResourceProperty
5
5
  aws_attribute :namespace, type: String
6
6
  aws_attribute :option_name, type: String
7
- aws_attribute :value, type: String
7
+ aws_attribute :value, list: :ok, type: String
8
8
  end
9
9
  end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module CloudFormer
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_former
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aubrey Holland