awspec 0.40.0 → 0.41.0

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: 87b146bacf7bc86a5d3290c9a7d01cef0a73d108
4
- data.tar.gz: 0de59c9a0d46e0fe919eda736d9c539f5af26cc5
3
+ metadata.gz: a82db0940952c2d0456c6ab91ad8da93005e0342
4
+ data.tar.gz: c2ea3398cb1a479bc6037f2f42571ea8461b2b02
5
5
  SHA512:
6
- metadata.gz: e5a70c321ccae810054547e002b28359c58706be4993ea1894e14eecc1f23e6cd03b56c88bb8a80c69d3008fc8a694b674d1fd2434dca5fbe8634e0c38c99f05
7
- data.tar.gz: e9d793140ca21b4b894709d756cfe91fd72172b3300ed9f76fca4f9c73ee4d7220e5f7333d61fca82de555da97eb6af2729baec0a7d68d044bce4eb578992212
6
+ metadata.gz: a46db329c15ddc92a25d437693f4ae60302998c772876b5fe23a1bdbf844248c8006d9b0758ae3d4a04bab84385cae0823671f46d106dc1207ae27116180f44a
7
+ data.tar.gz: 23d66c7d32f53236669021c14a5ea370bdd087674af69c43610c46f9fe07b1d556ac38560a21a83b5674bb68a2fb39cb38d7d9bb56189d034232700bc5eac53e
@@ -0,0 +1,16 @@
1
+ ### first
2
+
3
+ ```ruby
4
+ describe rds_db_cluster_parameter_group('my-rds-db-cluster-parameter-group') do
5
+ its(:time_zone) { should eq 'US/Central' }
6
+ its(:binlog_format) { should eq 'ROW' }
7
+ its(:character_set_server) { should eq 'utf8mb4' }
8
+ end
9
+ ```
10
+ ### exist
11
+
12
+ ```ruby
13
+ describe rds_db_cluster_parameter_group('my-rds-db-cluster-parameter-group') do
14
+ it { should exist }
15
+ end
16
+ ```
@@ -19,6 +19,7 @@
19
19
  | [network_acl](#network_acl)
20
20
  | [network_interface](#network_interface)
21
21
  | [rds](#rds)
22
+ | [rds_db_cluster_parameter_group](#rds_db_cluster_parameter_group)
22
23
  | [rds_db_parameter_group](#rds_db_parameter_group)
23
24
  | [route53_hosted_zone](#route53_hosted_zone)
24
25
  | [route_table](#route_table)
@@ -1107,6 +1108,27 @@ describe rds('my-rds') do
1107
1108
  end
1108
1109
  ```
1109
1110
 
1111
+ ## <a name="rds_db_cluster_parameter_group">rds_db_cluster_parameter_group</a>
1112
+
1113
+ RdsDbClusterParameterGroup resource type.
1114
+
1115
+ ```ruby
1116
+ describe rds_db_cluster_parameter_group('my-rds-db-cluster-parameter-group') do
1117
+ its(:time_zone) { should eq 'US/Central' }
1118
+ its(:binlog_format) { should eq 'ROW' }
1119
+ its(:character_set_server) { should eq 'utf8mb4' }
1120
+ end
1121
+ ```
1122
+
1123
+ ### exist
1124
+
1125
+ ```ruby
1126
+ describe rds_db_cluster_parameter_group('my-rds-db-cluster-parameter-group') do
1127
+ it { should exist }
1128
+ end
1129
+ ```
1130
+
1131
+
1110
1132
  ## <a name="rds_db_parameter_group">rds_db_parameter_group</a>
1111
1133
 
1112
1134
  RdsDbParameterGroup resource type.
@@ -0,0 +1,15 @@
1
+ module Awspec::Generator
2
+ module Doc
3
+ module Type
4
+ class RdsDbClusterParameterGroup < Base
5
+ def initialize
6
+ super
7
+ @type = Awspec::Type::RdsDbClusterParameterGroup.new('my-rds-db-cluster-parameter-group')
8
+ @matchers = []
9
+ @ignore_matchers = []
10
+ @describes = []
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -7,7 +7,7 @@ module Awspec
7
7
  ami autoscaling_group cloudwatch_alarm directconnect_virtual_interface
8
8
  ebs ec2 elasticache elasticache_cache_parameter_group elb iam_group
9
9
  iam_policy iam_role iam_user lambda launch_configuration nat_gateway
10
- network_acl network_interface rds rds_db_parameter_group route53_hosted_zone
10
+ network_acl network_interface rds rds_db_cluster_parameter_group rds_db_parameter_group route53_hosted_zone
11
11
  route_table s3_bucket security_group ses_identity subnet vpc cloudfront_distribution
12
12
  )
13
13
 
@@ -0,0 +1,20 @@
1
+ Aws.config[:rds] = {
2
+ stub_responses: {
3
+ describe_db_cluster_parameters: {
4
+ parameters: [
5
+ {
6
+ parameter_name: 'time_zone',
7
+ parameter_value: 'US/Central'
8
+ },
9
+ {
10
+ parameter_name: 'binlog_format',
11
+ parameter_value: 'ROW'
12
+ },
13
+ {
14
+ parameter_name: 'character_set_server',
15
+ parameter_value: 'utf8mb4'
16
+ }
17
+ ]
18
+ }
19
+ }
20
+ }
@@ -9,6 +9,10 @@ Aws.config[:rds] = {
9
9
  {
10
10
  parameter_name: 'innodb_buffer_pool_size',
11
11
  parameter_value: '{DBInstanceClassMemory*3/4}'
12
+ },
13
+ {
14
+ parameter_name: 'max_allowed_packet',
15
+ parameter_value: '16777216'
12
16
  }
13
17
  ]
14
18
  }
@@ -0,0 +1,30 @@
1
+ module Awspec::Type
2
+ class RdsDbClusterParameterGroup < Base
3
+ def initialize(name)
4
+ super
5
+ @parameters = {}
6
+ res = rds_client.describe_db_cluster_parameters({
7
+ db_cluster_parameter_group_name: name
8
+ })
9
+
10
+ loop do
11
+ res.parameters.each do |param|
12
+ @parameters[param.parameter_name] = param.parameter_value
13
+ end
14
+ (res.respond_to?(:next_page?) && res.next_page? && res = res.next_page) || break
15
+ end
16
+
17
+ @id = name unless @parameters.empty?
18
+ @resource_via_client = @parameters
19
+ end
20
+
21
+ def method_missing(name)
22
+ param_name = name.to_s
23
+ if @parameters.include?(param_name)
24
+ @parameters[param_name].to_s
25
+ else
26
+ super
27
+ end
28
+ end
29
+ end
30
+ end
@@ -19,7 +19,7 @@ module Awspec::Type
19
19
  end
20
20
 
21
21
  def method_missing(name)
22
- param_name = name.to_s.tr('_', '-')
22
+ param_name = name.to_s
23
23
  if @parameters.include?(param_name)
24
24
  @parameters[param_name].to_s
25
25
  else
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.40.0'
2
+ VERSION = '0.41.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -220,6 +220,7 @@ files:
220
220
  - doc/_resource_types/network_acl.md
221
221
  - doc/_resource_types/network_interface.md
222
222
  - doc/_resource_types/rds.md
223
+ - doc/_resource_types/rds_db_cluster_parameter_group.md
223
224
  - doc/_resource_types/rds_db_parameter_group.md
224
225
  - doc/_resource_types/route53_hosted_zone.md
225
226
  - doc/_resource_types/route_table.md
@@ -261,6 +262,7 @@ files:
261
262
  - lib/awspec/generator/doc/type/network_acl.rb
262
263
  - lib/awspec/generator/doc/type/network_interface.rb
263
264
  - lib/awspec/generator/doc/type/rds.rb
265
+ - lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb
264
266
  - lib/awspec/generator/doc/type/rds_db_parameter_group.rb
265
267
  - lib/awspec/generator/doc/type/route53_hosted_zone.rb
266
268
  - lib/awspec/generator/doc/type/route_table.rb
@@ -356,6 +358,7 @@ files:
356
358
  - lib/awspec/stub/network_acl.rb
357
359
  - lib/awspec/stub/network_interface.rb
358
360
  - lib/awspec/stub/rds.rb
361
+ - lib/awspec/stub/rds_db_cluster_parameter_group.rb
359
362
  - lib/awspec/stub/rds_db_parameter_group.rb
360
363
  - lib/awspec/stub/route53_hosted_zone.rb
361
364
  - lib/awspec/stub/route_table.rb
@@ -386,6 +389,7 @@ files:
386
389
  - lib/awspec/type/network_acl.rb
387
390
  - lib/awspec/type/network_interface.rb
388
391
  - lib/awspec/type/rds.rb
392
+ - lib/awspec/type/rds_db_cluster_parameter_group.rb
389
393
  - lib/awspec/type/rds_db_parameter_group.rb
390
394
  - lib/awspec/type/route53_hosted_zone.rb
391
395
  - lib/awspec/type/route_table.rb