cloud_former 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +82 -0
- data/lib/cloud_former.rb +21 -5
- data/lib/cloud_former/resource_properties/s3/notification_configuration.rb +9 -1
- data/lib/cloud_former/resource_properties/s3/{notification_topic_configuration.rb → topic_configuration.rb} +1 -1
- data/lib/cloud_former/resources/lambda/event_source_mapping.rb +12 -0
- data/lib/cloud_former/resources/lambda/function.rb +14 -0
- data/lib/cloud_former/resources/lambda/permission.rb +12 -0
- data/lib/cloud_former/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baee3d2fb7fd5cd5764928dbc1ffa380260d6cbb
|
4
|
+
data.tar.gz: 5486fa3e50f83d11103c959813c0b88f2341ebfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450c00c808907d6e7b6d4398b13782f22aa614cc073bf3c4f373531f7532db0ad54ea3bcaacd69009214f5d52a5a9cb5f614eccee0bce77e93d9996c09357e79
|
7
|
+
data.tar.gz: 96dea3caa49659f4b7d41ad8b996029e8e1eab0cf8d3a47c0d3ed184ccfe5c722e8accf9564f0d689cb2856019d3fe9fdeb453ac5fad38c1be95c7cc84648bdf
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- '**/Rakefile'
|
4
|
+
|
5
|
+
Metrics/AbcSize:
|
6
|
+
Max: 20
|
7
|
+
|
8
|
+
Metrics/LineLength:
|
9
|
+
Max: 140
|
10
|
+
|
11
|
+
Metrics/ModuleLength:
|
12
|
+
Max: 2000
|
13
|
+
|
14
|
+
Metrics/ClassLength:
|
15
|
+
Max: 2000
|
16
|
+
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Max: 2000
|
19
|
+
|
20
|
+
Metrics/AbcSize:
|
21
|
+
Max: 2000
|
22
|
+
|
23
|
+
Metrics/ParameterLists:
|
24
|
+
Max: 15
|
25
|
+
CountKeywordArgs: false
|
26
|
+
|
27
|
+
Metrics/CyclomaticComplexity:
|
28
|
+
Max: 600
|
29
|
+
|
30
|
+
Metrics/PerceivedComplexity:
|
31
|
+
Max: 600
|
32
|
+
|
33
|
+
Style/ClassAndModuleChildren:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/IfUnlessModifier:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/PredicateName:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/RedundantSelf:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/SingleLineBlockParams:
|
46
|
+
Methods: []
|
47
|
+
|
48
|
+
Style/StringLiterals:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/SpaceInsideBrackets:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/TrailingComma:
|
55
|
+
EnforcedStyleForMultiline: comma
|
56
|
+
|
57
|
+
Style/WordArray:
|
58
|
+
MinSize: 5
|
59
|
+
|
60
|
+
Style/EmptyLinesAroundClassBody:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/MultilineOperationIndentation:
|
64
|
+
EnforcedStyle: indented
|
65
|
+
|
66
|
+
Style/PerlBackrefs:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/TrailingComma:
|
70
|
+
EnforcedStyleForMultiline: comma
|
71
|
+
|
72
|
+
Lint/EndAlignment:
|
73
|
+
AlignWith: variable
|
74
|
+
|
75
|
+
Lint/UnderscorePrefixedVariableName:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Lint/HandleExceptions:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
Documentation:
|
82
|
+
Enabled: false
|
data/lib/cloud_former.rb
CHANGED
@@ -3,7 +3,6 @@ require 'cloud_former/has_properties_and_attributes'
|
|
3
3
|
require 'cloud_former/makes_json'
|
4
4
|
|
5
5
|
module CloudFormer
|
6
|
-
|
7
6
|
autoload :Boolean, 'cloud_former/boolean'
|
8
7
|
autoload :Parameter, 'cloud_former/parameters/parameter'
|
9
8
|
autoload :CommaDelimitedListParameter, 'cloud_former/parameters/comma_delimited_list_parameter'
|
@@ -177,6 +176,12 @@ module CloudFormer
|
|
177
176
|
autoload :Stream, 'cloud_former/resources/kinesis/stream'
|
178
177
|
end
|
179
178
|
|
179
|
+
module Lambda
|
180
|
+
autoload :EventSourceMapping, 'cloud_former/resources/lambda/event_source_mapping'
|
181
|
+
autoload :Function, 'cloud_former/resources/lambda/function'
|
182
|
+
autoload :Permission, 'cloud_former/resources/lambda/permission'
|
183
|
+
end
|
184
|
+
|
180
185
|
module RDS
|
181
186
|
autoload :DBInstance, 'cloud_former/resources/rds/db_instance'
|
182
187
|
autoload :DBParameterGroup, 'cloud_former/resources/rds/db_parameter_group'
|
@@ -209,18 +214,29 @@ module CloudFormer
|
|
209
214
|
autoload :Bucket, 'cloud_former/resources/s3/bucket'
|
210
215
|
autoload :CorsConfiguration, 'cloud_former/resource_properties/s3/cors_configuration'
|
211
216
|
autoload :CorsRule, 'cloud_former/resource_properties/s3/cors_rule'
|
217
|
+
autoload :LambdaConfiguration, 'cloud_former/resource_properties/s3/lambda_configuration'
|
212
218
|
autoload :LifecycleConfiguration, 'cloud_former/resource_properties/s3/lifecycle_configuration'
|
213
219
|
autoload :LifecycleRule, 'cloud_former/resource_properties/s3/lifecycle_rule'
|
214
220
|
autoload :LifecycleRuleTransition, 'cloud_former/resource_properties/s3/lifecycle_rule_transition'
|
215
221
|
autoload :LoggingConfiguration, 'cloud_former/resource_properties/s3/logging_configuration'
|
216
222
|
autoload :NotificationConfiguration, 'cloud_former/resource_properties/s3/notification_configuration'
|
217
|
-
autoload :
|
223
|
+
autoload :QueueConfiguration, 'cloud_former/resource_properties/s3/queue_configuration'
|
224
|
+
autoload :TopicConfiguration, 'cloud_former/resource_properties/s3/topic_configuration'
|
218
225
|
autoload :VersioningConfiguration, 'cloud_former/resource_properties/s3/versioning_configuration'
|
219
226
|
autoload :WebsiteConfiguration, 'cloud_former/resource_properties/s3/website_configuration'
|
220
|
-
autoload
|
227
|
+
autoload(
|
228
|
+
:WebsiteConfigurationRedirectAllRequestsTo,
|
229
|
+
'cloud_former/resource_properties/s3/website_configuration_redirect_all_requests_to',
|
230
|
+
)
|
221
231
|
autoload :WebsiteConfigurationRoutingRules, 'cloud_former/resource_properties/s3/website_configuration_routing_rules'
|
222
|
-
autoload
|
223
|
-
|
232
|
+
autoload(
|
233
|
+
:WebsiteConfigurationRoutingRulesRedirectRule,
|
234
|
+
'cloud_former/resource_properties/s3/website_configuration_routing_rules_redirect_rule',
|
235
|
+
)
|
236
|
+
autoload(
|
237
|
+
:WebsiteConfigurationRoutingRulesRoutingRuleCondition,
|
238
|
+
'cloud_former/resource_properties/s3/website_configuration_routing_rules_routing_rule_condition',
|
239
|
+
)
|
224
240
|
end
|
225
241
|
|
226
242
|
module SNS
|
@@ -2,10 +2,18 @@
|
|
2
2
|
module CloudFormer
|
3
3
|
module S3
|
4
4
|
class NotificationConfiguration < ResourceProperty
|
5
|
+
aws_attribute :lambda_configurations,
|
6
|
+
embed: true,
|
7
|
+
list: true,
|
8
|
+
type: LambdaConfiguration
|
9
|
+
aws_attribute :queue_configurations,
|
10
|
+
embed: true,
|
11
|
+
list: true,
|
12
|
+
type: QueueConfiguration
|
5
13
|
aws_attribute :topic_configurations,
|
6
14
|
embed: true,
|
7
15
|
list: true,
|
8
|
-
type:
|
16
|
+
type: TopicConfiguration
|
9
17
|
end
|
10
18
|
end
|
11
19
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html
|
2
2
|
module CloudFormer
|
3
3
|
module S3
|
4
|
-
class
|
4
|
+
class TopicConfiguration < ResourceProperty
|
5
5
|
aws_attribute :event, type: String
|
6
6
|
aws_attribute :topic, type: String
|
7
7
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
|
2
|
+
module CloudFormer
|
3
|
+
module Lambda
|
4
|
+
class EventSourceMapping < Resource
|
5
|
+
aws_property :batch_size, type: Integer
|
6
|
+
aws_property :enabled, type: Boolean
|
7
|
+
aws_property :event_source_arn, type: String
|
8
|
+
aws_property :function_name, type: String
|
9
|
+
aws_property :starting_position, type: String
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
|
2
|
+
module CloudFormer
|
3
|
+
module Lambda
|
4
|
+
class Function < Resource
|
5
|
+
aws_property :code, type: String
|
6
|
+
aws_property :description, type: String
|
7
|
+
aws_property :handler, type: String
|
8
|
+
aws_property :memory_size, type: Integer
|
9
|
+
aws_property :role, type: String
|
10
|
+
aws_property :runtime, type: String
|
11
|
+
aws_property :timeout, type: Integer
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
|
2
|
+
module CloudFormer
|
3
|
+
module Lambda
|
4
|
+
class Permission < Resource
|
5
|
+
aws_property :action, type: String
|
6
|
+
aws_property :function_name, type: String
|
7
|
+
aws_property :principal, type: String
|
8
|
+
aws_property :source_account, type: String
|
9
|
+
aws_property :source_arn, type: String
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/cloud_former/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_former
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aubrey Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -76,6 +76,7 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
|
+
- ".rubocop.yml"
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE
|
81
82
|
- LICENSE.txt
|
@@ -172,7 +173,7 @@ files:
|
|
172
173
|
- lib/cloud_former/resource_properties/s3/lifecycle_rule_transition.rb
|
173
174
|
- lib/cloud_former/resource_properties/s3/logging_configuration.rb
|
174
175
|
- lib/cloud_former/resource_properties/s3/notification_configuration.rb
|
175
|
-
- lib/cloud_former/resource_properties/s3/
|
176
|
+
- lib/cloud_former/resource_properties/s3/topic_configuration.rb
|
176
177
|
- lib/cloud_former/resource_properties/s3/versioning_configuration.rb
|
177
178
|
- lib/cloud_former/resource_properties/s3/website_configuration.rb
|
178
179
|
- lib/cloud_former/resource_properties/s3/website_configuration_redirect_all_requests_to.rb
|
@@ -238,6 +239,9 @@ files:
|
|
238
239
|
- lib/cloud_former/resources/iam/user.rb
|
239
240
|
- lib/cloud_former/resources/iam/user_to_group_addition.rb
|
240
241
|
- lib/cloud_former/resources/kinesis/stream.rb
|
242
|
+
- lib/cloud_former/resources/lambda/event_source_mapping.rb
|
243
|
+
- lib/cloud_former/resources/lambda/function.rb
|
244
|
+
- lib/cloud_former/resources/lambda/permission.rb
|
241
245
|
- lib/cloud_former/resources/list.rb
|
242
246
|
- lib/cloud_former/resources/rds/db_instance.rb
|
243
247
|
- lib/cloud_former/resources/rds/db_parameter_group.rb
|
@@ -293,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
297
|
version: '0'
|
294
298
|
requirements: []
|
295
299
|
rubyforge_project:
|
296
|
-
rubygems_version: 2.4.
|
300
|
+
rubygems_version: 2.4.6
|
297
301
|
signing_key:
|
298
302
|
specification_version: 4
|
299
303
|
summary: A Ruby DSL for creating CloudFormation templates
|