convection 0.2.30 → 0.2.31

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: 04b60c6f4c1de9889159bba6dbdb8093a6c6cedb
4
- data.tar.gz: 79a81554e45696d23fd7aa5eb5aa8d96924a63f0
3
+ metadata.gz: 1e2ef5c368c42fdb7e95331677057dd31fefcea1
4
+ data.tar.gz: d399f40f64e6d3e07f9236c611f5bb1ae054e798
5
5
  SHA512:
6
- metadata.gz: a4653842caa0c00679a0a0fc2e94447dbadcfab0d7067107bca58e1b91eb132e5b6be5021a20e68da4ecf24492f29d420127314ca6a420e109f4028633772315
7
- data.tar.gz: cae2630869a056f8cb6b53364bd0638f08318a7ec701f00443c12e372b278f771d4ea3fdae28a0ef63a008ef7aa0fa55c08641589dad0b57e890c67fbf709190
6
+ metadata.gz: 33f17b3684c303868591be29990b798f0c364b27446cca02c544d5def928a444ab7df5c757449f7e9b66ddf0cd462f6adf71e32e20d0267fcc6daa2acd39ad76
7
+ data.tar.gz: 9c7814c5800810aa07fce9da22ed02878d2034b183d4b5a3bf01dc18500205372f0471f6fee6692f85dfb2a696b9c1ba3a423daa445440e6021828264fa1d7b7
@@ -13,12 +13,23 @@ module Convection
13
13
  type 'AWS::S3::Bucket'
14
14
  property :bucket_name, 'BucketName'
15
15
  property :access_control, 'AccessControl'
16
- property :cors_configurationm, 'CorsConfiguration'
16
+ property :cors_configuration, 'CorsConfiguration'
17
17
  property :lifecycle_configuration, 'LifecycleConfiguration'
18
18
  property :logging_configuration, 'LoggingConfiguration'
19
19
  property :notification_configuration, 'NotificationConfiguration'
20
20
  property :versioning_configuration, 'VersioningConfiguration'
21
21
 
22
+ def cors_configuration(&block)
23
+ config = ResourceProperty::S3CorsConfiguration.new(self)
24
+ config.instance_exec(&block) if block
25
+ properties['CorsConfiguration'].set(config)
26
+ end
27
+
28
+ def cors_configurationm(*args)
29
+ warn 'DEPRECATED: "cors_configurationm" is deprecated. Please use "cors_configuration" instead. https://github.com/rapid7/convection/pull/135'
30
+ cors_configuration(*args)
31
+ end
32
+
22
33
  def render(*args)
23
34
  super.tap do |resource|
24
35
  render_tags(resource)
@@ -0,0 +1,21 @@
1
+ require_relative '../resource_property'
2
+
3
+ module Convection
4
+ module Model
5
+ class Template
6
+ class ResourceProperty
7
+ # Represents an {http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors.html
8
+ # Amazon S3 Cors Configuration}
9
+ class S3CorsConfiguration < ResourceProperty
10
+ property :cors_rules, 'CorsRules', :type => :list
11
+
12
+ def cors_rule(&block)
13
+ cors_rule = ResourceProperty::S3CorsConfigurationRule.new(self)
14
+ cors_rule.instance_exec(&block) if block
15
+ cors_rules << cors_rule
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,20 @@
1
+ require_relative '../resource_property'
2
+
3
+ module Convection
4
+ module Model
5
+ class Template
6
+ class ResourceProperty
7
+ # Represents an {http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html
8
+ # Amazon S3 Cors Configuration Rule}
9
+ class S3CorsConfigurationRule < ResourceProperty
10
+ property :allowed_headers, 'AllowedHeaders', :type => :list
11
+ property :allowed_methods, 'AllowedMethods', :type => :list
12
+ property :allowed_origins, 'AllowedOrigins', :type => :list
13
+ property :exposed_headers, 'ExposedHeaders', :type => :list
14
+ property :id, 'Id'
15
+ property :max_age, 'MaxAge'
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.30
4
+ version: 0.2.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
@@ -217,6 +217,8 @@ files:
217
217
  - lib/convection/model/template/resource_property/aws_events_rule_target.rb
218
218
  - lib/convection/model/template/resource_property/aws_lambda_function_code.rb
219
219
  - lib/convection/model/template/resource_property/aws_lambda_vpc_config.rb
220
+ - lib/convection/model/template/resource_property/aws_s3_cors_configuration.rb
221
+ - lib/convection/model/template/resource_property/aws_s3_cors_configuration_rule.rb
220
222
  - lib/convection/version.rb
221
223
  - test/convection/model/test_conditions.rb
222
224
  - test/convection/model/test_directory_service.rb