awspec 1.3.0 → 1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f0e05bdb7f81c1c6d057475cba0c2242fefb41b
|
4
|
+
data.tar.gz: d712b4dfceee380cbc758e5bbf9b542405af3522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eefb0c21ff3f7a982513ba7e6514ae03733ff5d08d1d6cc5dba3a8dfc69e1212755f467853bcf801b7135222234ec14a5f8bd64189d73bfdf9b6475da345b55d
|
7
|
+
data.tar.gz: 8893028e99262a69db71d201eb8907659190b6f9c6691926b09420350bdd84e559877075c046a2edbb982189a69b9b960b30a5f128534d210768ff7e18a144c6
|
@@ -41,10 +41,10 @@ module Awspec
|
|
41
41
|
)
|
42
42
|
|
43
43
|
types.each do |type|
|
44
|
-
desc type + ' [
|
45
|
-
define_method type do |
|
44
|
+
desc type + ' [parameter_group_name]', "Generate #{type} spec from parameter group name."
|
45
|
+
define_method type do |_parameter_group_name|
|
46
46
|
Awsecrets.load(profile: options[:profile], region: options[:region], secrets_path: options[:secrets_path])
|
47
|
-
eval "puts Awspec::Generator::Spec::#{type.camelize}.new.
|
47
|
+
eval "puts Awspec::Generator::Spec::#{type.camelize}.new.generate_by_parameter_group(_parameter_group_name)"
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
@@ -2,15 +2,15 @@ module Awspec::Generator
|
|
2
2
|
module Spec
|
3
3
|
class RdsDbClusterParameterGroup
|
4
4
|
include Awspec::Helper::Finder
|
5
|
-
def
|
6
|
-
@
|
7
|
-
res = select_all_rds_db_cluster_parameters(@
|
5
|
+
def generate_by_parameter_group(parameter_group)
|
6
|
+
@parameter_group = parameter_group
|
7
|
+
res = select_all_rds_db_cluster_parameters(@parameter_group)
|
8
8
|
ERB.new(db_cluster_parameter_group_template, nil, '-').result(binding).gsub(/^\n/, '')
|
9
9
|
end
|
10
10
|
|
11
11
|
def db_cluster_parameter_group_template
|
12
12
|
template = <<-'EOF'
|
13
|
-
describe rds_db_cluster_parameter_group('<%= @
|
13
|
+
describe rds_db_cluster_parameter_group('<%= @parameter_group %>') do
|
14
14
|
<% res.each do |key, value| %>
|
15
15
|
its('<%= key %>') { should eq '<%= value %>' }
|
16
16
|
<% end %>
|
@@ -2,15 +2,15 @@ module Awspec::Generator
|
|
2
2
|
module Spec
|
3
3
|
class RdsDbParameterGroup
|
4
4
|
include Awspec::Helper::Finder
|
5
|
-
def
|
6
|
-
@
|
7
|
-
res = select_all_rds_db_parameters(@
|
8
|
-
ERB.new(
|
5
|
+
def generate_by_parameter_group(parameter_group)
|
6
|
+
@parameter_group = parameter_group
|
7
|
+
res = select_all_rds_db_parameters(@parameter_group)
|
8
|
+
ERB.new(db_parameter_group_template, nil, '-').result(binding).gsub(/^\n/, '')
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def db_parameter_group_template
|
12
12
|
template = <<-'EOF'
|
13
|
-
describe rds_db_parameter_group('<%= @
|
13
|
+
describe rds_db_parameter_group('<%= @parameter_group %>') do
|
14
14
|
<% res.each do |key, value| %>
|
15
15
|
its('<%= key %>') { should eq '<%= value %>' }
|
16
16
|
<% end %>
|
@@ -21,10 +21,10 @@ module Awspec::Helper
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def select_all_rds_db_parameters(
|
24
|
+
def select_all_rds_db_parameters(parameter_group)
|
25
25
|
parameters = {}
|
26
26
|
res = rds_client.describe_db_parameters({
|
27
|
-
db_parameter_group_name:
|
27
|
+
db_parameter_group_name: parameter_group
|
28
28
|
})
|
29
29
|
loop do
|
30
30
|
res.parameters.each do |param|
|
@@ -35,10 +35,10 @@ module Awspec::Helper
|
|
35
35
|
parameters
|
36
36
|
end
|
37
37
|
|
38
|
-
def select_all_rds_db_cluster_parameters(
|
38
|
+
def select_all_rds_db_cluster_parameters(parameter_group)
|
39
39
|
parameters = {}
|
40
40
|
res = rds_client.describe_db_cluster_parameters({
|
41
|
-
db_cluster_parameter_group_name:
|
41
|
+
db_cluster_parameter_group_name: parameter_group
|
42
42
|
})
|
43
43
|
loop do
|
44
44
|
res.parameters.each do |param|
|
data/lib/awspec/version.rb
CHANGED
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: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -609,7 +609,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
609
609
|
version: '0'
|
610
610
|
requirements: []
|
611
611
|
rubyforge_project:
|
612
|
-
rubygems_version: 2.
|
612
|
+
rubygems_version: 2.6.13
|
613
613
|
signing_key:
|
614
614
|
specification_version: 4
|
615
615
|
summary: RSpec tests for your AWS resources.
|