convection 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1076761e16a97104ae559f9b56201d1cbb76287a
4
- data.tar.gz: 6f85f6950fb4e34863fcee35f6b8ffc1e2779fec
3
+ metadata.gz: d2a32482c234ff9f7b1e21880c89a908f56e6941
4
+ data.tar.gz: 2e85ff91a4f8a3113f79dbd4419eb9a8fd40154b
5
5
  SHA512:
6
- metadata.gz: 574c6935f6220ee9f93b82d31278d7380f3f9e966a9cfa4e22b9731325d954449e2248a619b6057c0e2387ac3b71ca7e1b1356ee43a5bba0b41d3c8d023f335e
7
- data.tar.gz: d6834e569ba8d687b612cdb0765885f2a7738c7c7392640aacc9e0d8ce3c54db8bab14179450dbe2782e07ac7bc2f2b3730ba93c2808a505883542f25549da0e
6
+ metadata.gz: b020485dc81ae2cda1f2e144804f2ddd051086c3c1203241e7869877c8a45842d7005de6e5a7f3fbe23040ae83f70cb939c5ed57147a26612611fa3b1a861cb1
7
+ data.tar.gz: 6573b5f42ec7252432e0b9ac26d29fb4c27286ccdaf5af3d7002920016c04b5ada75932f18e271c4925ba6c642c03fbb33eb90d7bf162ff82b6491741e400bad
@@ -10,6 +10,7 @@ AllCops:
10
10
  - Thorfile
11
11
  Exclude:
12
12
  - example/**/*
13
+ - 'lib/convection/model/template/mapping.rb' # Something is causing this file to fail
13
14
 
14
15
  Encoding:
15
16
  Enabled: false
@@ -19,6 +20,10 @@ HashSyntax:
19
20
  Enabled: false
20
21
  SpaceInsideStringInterpolation:
21
22
  Enabled: false
23
+ Performance/RedundantBlockCall:
24
+ Enabled: false
25
+ Style/SignalException:
26
+ Enabled: false
22
27
 
23
28
  # AbcSize:
24
29
  # Max: 24
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2015-09-14 17:06:32 -0400 using RuboCop version 0.34.1.
3
+ # on 2016-02-05 13:27:18 -0500 using RuboCop version 0.37.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -16,30 +16,31 @@ Lint/UselessAssignment:
16
16
  Exclude:
17
17
  - 'lib/convection/model/template.rb'
18
18
 
19
- # Offense count: 9
19
+ # Offense count: 30
20
20
  Metrics/AbcSize:
21
21
  Max: 57
22
22
 
23
- # Offense count: 1
23
+ # Offense count: 3
24
24
  # Configuration parameters: CountComments.
25
25
  Metrics/ClassLength:
26
26
  Max: 267
27
27
 
28
- # Offense count: 1
28
+ # Offense count: 6
29
29
  Metrics/CyclomaticComplexity:
30
30
  Max: 13
31
31
 
32
- # Offense count: 9
33
- # Configuration parameters: AllowURI, URISchemes.
32
+ # Offense count: 122
33
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
34
+ # URISchemes: http, https
34
35
  Metrics/LineLength:
35
36
  Max: 151
36
37
 
37
- # Offense count: 1
38
+ # Offense count: 32
38
39
  # Configuration parameters: CountComments.
39
40
  Metrics/MethodLength:
40
41
  Max: 35
41
42
 
42
- # Offense count: 1
43
+ # Offense count: 5
43
44
  Metrics/PerceivedComplexity:
44
45
  Max: 13
45
46
 
@@ -48,30 +49,43 @@ Style/AccessorMethodName:
48
49
  Exclude:
49
50
  - 'lib/convection/control/stack.rb'
50
51
 
52
+ # Offense count: 7
53
+ # Cop supports --auto-correct.
54
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
55
+ # SupportedStyles: prefer_alias, prefer_alias_method
56
+ Style/Alias:
57
+ Exclude:
58
+ - 'lib/convection/control/stack.rb'
59
+ - 'lib/convection/model/template/resource.rb'
60
+ - 'lib/convection/model/template/resource_property.rb'
61
+ - 'lib/convection/model/template/resource_property/aws_ec2_network_interface.rb'
62
+
51
63
  # Offense count: 3
52
64
  # Configuration parameters: EnforcedStyle, SupportedStyles.
65
+ # SupportedStyles: nested, compact
53
66
  Style/ClassAndModuleChildren:
54
67
  Exclude:
55
68
  - 'lib/convection/model/template.rb'
56
69
  - 'test/test_helper.rb'
57
70
 
58
- # Offense count: 11
71
+ # Offense count: 4
59
72
  Style/Documentation:
60
73
  Exclude:
74
+ - 'spec/**/*'
75
+ - 'test/**/*'
61
76
  - 'lib/convection/model/attributes.rb'
62
77
  - 'lib/convection/model/mixin/colorize.rb'
63
78
  - 'lib/convection/model/template/condition.rb'
64
- - 'test/convection/model/test_conditions.rb'
65
- - 'test/convection/model/test_elasticache.rb'
66
- - 'test/convection/model/test_loggroups.rb'
67
- - 'test/convection/model/test_rds.rb'
68
- - 'test/convection/model/test_template.rb'
69
- - 'test/convection/model/test_validation.rb'
70
- - 'test/test_helper.rb'
71
79
 
72
80
  # Offense count: 1
73
81
  # Cop supports --auto-correct.
74
- # Configuration parameters: EnforcedStyle, SupportedStyles.
82
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
83
+ # SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
75
84
  Style/FirstParameterIndentation:
76
85
  Exclude:
77
86
  - 'lib/convection/model/mixin/taggable.rb'
87
+
88
+ # Added manually
89
+ Style/ConditionalAssignment:
90
+ Exclude:
91
+ - 'lib/convection/model/template/condition.rb'
@@ -31,26 +31,26 @@ module Convection
31
31
  attr_accessor :on_failure
32
32
 
33
33
  ## Valid Stack Statuses
34
- CREATE_COMPLETE = 'CREATE_COMPLETE'
35
- CREATE_FAILED = 'CREATE_FAILED'
36
- CREATE_IN_PROGRESS = 'CREATE_IN_PROGRESS'
37
- DELETE_COMPLETE = 'DELETE_COMPLETE'
38
- DELETE_FAILED = 'DELETE_FAILED'
39
- DELETE_IN_PROGRESS = 'DELETE_IN_PROGRESS'
40
- ROLLBACK_COMPLETE = 'ROLLBACK_COMPLETE'
41
- ROLLBACK_FAILED = 'ROLLBACK_FAILED'
42
- ROLLBACK_IN_PROGRESS = 'ROLLBACK_IN_PROGRESS'
43
- UPDATE_COMPLETE = 'UPDATE_COMPLETE'
44
- UPDATE_COMPLETE_CLEANUP_IN_PROGRESS = 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'
45
- UPDATE_FAILED = 'UPDATE_FAILED'
46
- UPDATE_IN_PROGRESS = 'UPDATE_IN_PROGRESS'
47
- UPDATE_ROLLBACK_COMPLETE = 'UPDATE_ROLLBACK_COMPLETE'
48
- UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS = 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'
49
- UPDATE_ROLLBACK_FAILED = 'UPDATE_ROLLBACK_FAILED'
50
- UPDATE_ROLLBACK_IN_PROGRESS = 'UPDATE_ROLLBACK_IN_PROGRESS'
34
+ CREATE_COMPLETE = 'CREATE_COMPLETE'.freeze
35
+ CREATE_FAILED = 'CREATE_FAILED'.freeze
36
+ CREATE_IN_PROGRESS = 'CREATE_IN_PROGRESS'.freeze
37
+ DELETE_COMPLETE = 'DELETE_COMPLETE'.freeze
38
+ DELETE_FAILED = 'DELETE_FAILED'.freeze
39
+ DELETE_IN_PROGRESS = 'DELETE_IN_PROGRESS'.freeze
40
+ ROLLBACK_COMPLETE = 'ROLLBACK_COMPLETE'.freeze
41
+ ROLLBACK_FAILED = 'ROLLBACK_FAILED'.freeze
42
+ ROLLBACK_IN_PROGRESS = 'ROLLBACK_IN_PROGRESS'.freeze
43
+ UPDATE_COMPLETE = 'UPDATE_COMPLETE'.freeze
44
+ UPDATE_COMPLETE_CLEANUP_IN_PROGRESS = 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'.freeze
45
+ UPDATE_FAILED = 'UPDATE_FAILED'.freeze
46
+ UPDATE_IN_PROGRESS = 'UPDATE_IN_PROGRESS'.freeze
47
+ UPDATE_ROLLBACK_COMPLETE = 'UPDATE_ROLLBACK_COMPLETE'.freeze
48
+ UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS = 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'.freeze
49
+ UPDATE_ROLLBACK_FAILED = 'UPDATE_ROLLBACK_FAILED'.freeze
50
+ UPDATE_ROLLBACK_IN_PROGRESS = 'UPDATE_ROLLBACK_IN_PROGRESS'.freeze
51
51
 
52
52
  ## Internal status
53
- NOT_CREATED = 'NOT_CREATED'
53
+ NOT_CREATED = 'NOT_CREATED'.freeze
54
54
 
55
55
  def initialize(name, template, options = {})
56
56
  @name = name
@@ -45,9 +45,9 @@ module Convection
45
45
  ## Cammel-case to snake-case
46
46
  nodes.map! do |n|
47
47
  n.split(/([A-Z0-9])(?![A-Z0-9])(?<!$)/)
48
- .reject(&:empty?)
49
- .reduce('') { |a, e| (e.length == 1 && !a.empty?) ? a + "_#{e}" : a + e }
50
- .downcase
48
+ .reject(&:empty?)
49
+ .reduce('') { |a, e| (e.length == 1 && !a.empty?) ? a + "_#{e}" : a + e }
50
+ .downcase
51
51
  end
52
52
 
53
53
  nodes.join('_').downcase
@@ -9,7 +9,7 @@ module Convection
9
9
  class Policy
10
10
  include DSL::Helpers
11
11
 
12
- DEFAULT_VERSION = '2012-10-17'
12
+ DEFAULT_VERSION = '2012-10-17'.freeze
13
13
 
14
14
  attribute :name
15
15
  attribute :id
@@ -170,7 +170,7 @@ module Convection
170
170
  include DSL::IntrinsicFunctions
171
171
  include DSL::Template
172
172
 
173
- DEFAULT_VERSION = '2010-09-09'
173
+ DEFAULT_VERSION = '2010-09-09'.freeze
174
174
 
175
175
  attr_reader :stack
176
176
  attr_reader :attribute_mappings
@@ -11,7 +11,7 @@ module Convection
11
11
  fn_equals: 'Fn::Equals',
12
12
  fn_if: 'Fn::If',
13
13
  fn_not: 'Fn::Not',
14
- fn_or: 'Fn::Or' }
14
+ fn_or: 'Fn::Or' }.freeze
15
15
 
16
16
  attr_reader :condition
17
17
  attr_reader :template
@@ -0,0 +1,34 @@
1
+ require_relative '../resource'
2
+
3
+ module Convection
4
+ module Model
5
+ class Template
6
+ class Resource
7
+ ##
8
+ # AWS::ElastiCache::ReplicationGroup
9
+ ##
10
+ class ElastiCacheReplicationGroup < Resource
11
+ type 'AWS::ElastiCache::ReplicationGroup', :elasticache_replication_group
12
+ property :auto_failover_enabled, 'AutomaticFailoverEnabled'
13
+ property :auto_minor_version_upgrade, 'AutoMinorVersionUpgrade'
14
+ property :cache_node_type, 'CacheNodeType'
15
+ property :cache_parameter_group_name, 'CacheParameterGroupName'
16
+ property :cache_security_group_names, 'CacheSecurityGroupNames', :type => :list
17
+ property :cache_subnet_group_name, 'CacheSubnetGroupName'
18
+ property :engine, 'Engine'
19
+ property :engine_version, 'EngineVersion'
20
+ property :notification_topic_arn, 'NotificationTopicArn'
21
+ property :num_cache_clusters, 'NumCacheClusters'
22
+ property :port, 'Port'
23
+ property :preferred_cache_cluster_azs, 'PreferredCacheClusterAZs', :type => :list
24
+ property :preferred_maintenance_window, 'PreferredMaintenanceWindow'
25
+ property :replication_group_description, 'ReplicationGroupDescription'
26
+ property :security_group_ids, 'SecurityGroupIds', :type => :list
27
+ property :snapshot_arns, 'SnapshotArns', :type => :list
28
+ property :snapshot_retention_limit, 'SnapshotRetentionLimit'
29
+ property :snapshot_window, 'SnapshotWindow'
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,17 @@
1
+ require_relative '../resource'
2
+ module Convection
3
+ module Model
4
+ class Template
5
+ class Resource
6
+ ##
7
+ # AWS::ElasticBeanstalk::Application
8
+ ##
9
+ class ElasticBeanstalkApplication < Resource
10
+ type 'AWS::ElasticBeanstalk::Application', :elasticbeanstalk_application
11
+ property :application_name, 'ApplicationName'
12
+ property :description, 'Description'
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ require_relative '../resource'
2
+ module Convection
3
+ module Model
4
+ class Template
5
+ class Resource
6
+ ##
7
+ # AWS::ElasticBeanstalk::ApplicationVersion
8
+ ##
9
+ class ElasticBeanstalkApplicationVersion < Resource
10
+ type 'AWS::ElasticBeanstalk::ApplicationVersion', :elasticbeanstalk_applicationversion
11
+ property :application_name, 'ApplicationName'
12
+ property :description, 'Description'
13
+ property :source_bundle, 'SourceBundle'
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ require_relative '../resource'
2
+ module Convection
3
+ module Model
4
+ class Template
5
+ class Resource
6
+ ##
7
+ # AWS::ElasticBeanstalk::ConfigurationTemplate
8
+ ##
9
+ class ElasticBeanstalkConfigurationTemplate < Resource
10
+ type 'AWS::ElasticBeanstalk::ConfigurationTemplate', :elasticbeanstalk_configurationtemplate
11
+ property :application_name, 'ApplicationName'
12
+ property :description, 'Description'
13
+ property :environment, 'Environment'
14
+ property :option_settings, 'OptionSettings'
15
+ property :solution_stack_name, 'SolutionStackName'
16
+ property :source_configuration, 'SourceConfiguration'
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,25 @@
1
+ require_relative '../resource'
2
+ module Convection
3
+ module Model
4
+ class Template
5
+ class Resource
6
+ ##
7
+ # AWS::ElasticBeanstalk::Environment
8
+ ##
9
+ class ElasticBeanstalkEnvironment < Resource
10
+ type 'AWS::ElasticBeanstalk::Environment', :elasticbeanstalk_environment
11
+ property :application_name, 'ApplicationName'
12
+ property :cname_prefix, 'CNAMEPrefix'
13
+ property :description, 'Description'
14
+ property :environment_name, 'EnvironmentName'
15
+ property :option_settings, 'OptionSettings'
16
+ property :solution_stack_name, 'SolutionStackName'
17
+ property :tags, 'Tags'
18
+ property :template_name, 'TemplateName'
19
+ property :tier, 'Tier'
20
+ property :version_label, 'VersionLabel'
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -17,7 +17,7 @@ module Convection
17
17
  property :lifecycle_configuration, 'LifecycleConfiguration'
18
18
  property :logging_configuration, 'LoggingConfiguration'
19
19
  property :notification_configuration, 'NotificationConfiguration'
20
- property :version_configuration, 'VersionConfiguration'
20
+ property :versioning_configuration, 'VersioningConfiguration'
21
21
 
22
22
  def render(*args)
23
23
  super.tap do |resource|
@@ -1,6 +1,6 @@
1
1
  # nodoc
2
2
  module Convection
3
3
  VERSION = IO.read(File.expand_path('../../../VERSION', __FILE__)) rescue '0.0.1'
4
- SUMMARY = 'A fully generic, modular DSL for AWS CloudFormation'
4
+ SUMMARY = 'A fully generic, modular DSL for AWS CloudFormation'.freeze
5
5
  DESCRIPTION = IO.read(File.expand_path('../../../README.md', __FILE__)) rescue ''
6
6
  end
@@ -128,7 +128,7 @@ class TestValidations < Minitest::Test
128
128
  end
129
129
  end
130
130
 
131
- assert_raises(ExcessiveMappingAttributesError)do
131
+ assert_raises(ExcessiveMappingAttributesError) do
132
132
  @excessive_mapping_attributes.to_json
133
133
  end
134
134
  assert_raises(ExcessiveMappingAttributeNameError) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2016-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -395,9 +395,14 @@ files:
395
395
  - lib/convection/model/template/resource/aws_ec2_vpc_gateway_attachment.rb
396
396
  - lib/convection/model/template/resource/aws_elasticache_cluster.rb
397
397
  - lib/convection/model/template/resource/aws_elasticache_parameter_group.rb
398
+ - lib/convection/model/template/resource/aws_elasticache_replication_group.rb
398
399
  - lib/convection/model/template/resource/aws_elasticache_security_group.rb
399
400
  - lib/convection/model/template/resource/aws_elasticache_security_group_ingress.rb
400
401
  - lib/convection/model/template/resource/aws_elasticache_subnet_group.rb
402
+ - lib/convection/model/template/resource/aws_elasticbeanstalk_application.rb
403
+ - lib/convection/model/template/resource/aws_elasticbeanstalk_applicationversion.rb
404
+ - lib/convection/model/template/resource/aws_elasticbeanstalk_configurationtemplate.rb
405
+ - lib/convection/model/template/resource/aws_elasticbeanstalk_environment.rb
401
406
  - lib/convection/model/template/resource/aws_elb.rb
402
407
  - lib/convection/model/template/resource/aws_iam_access_key.rb
403
408
  - lib/convection/model/template/resource/aws_iam_group.rb