akashi 0.0.3 → 0.0.6

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: 5c585789936116ffa436714037b34c40314c0937
4
- data.tar.gz: 04c68d2a080bab2620ebe9dde043189d9c7f7aa3
3
+ metadata.gz: 9578ab2da51b4e6bac5c4649ea48949afa3697e8
4
+ data.tar.gz: 8e9fc90836052a360b7fa320877095182db95c8d
5
5
  SHA512:
6
- metadata.gz: d8424c0f6a23093048ec4b46342ed0fc88b4b07526167e9ca01ac0d0363688c41cb1f1db75752f316dba5369dafdfeee70d6895b5eb98585df057d86f94e5d38
7
- data.tar.gz: dc685d6d9cacf371d76a85b9205fb01ea947b38f6ed16e502ab0e59f038967fd5604a03439ec8b44c42f8523eec9421cdfcf8f0b46f2e4c0655075b997662916
6
+ metadata.gz: 835bbd20859477ea8f0ad23c1802b46d9407034eb554752e46b9aa96980375455a3a326cd04cf2acca377a3f2f1191341dc5ac6e77d7acba9ef3c4135f1ee837
7
+ data.tar.gz: 0042ef7066c052ecdc3fde6ccddd8ade64859263d75d8d9801d8b349a043d79999a890a59282365149b986ce2f8d99f47c52b10208b65f648df5432cb59cfd72
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- akashi (0.0.3)
4
+ akashi (0.0.6)
5
5
  activesupport
6
6
  aws-sdk
7
7
  hashie
@@ -1,12 +1,12 @@
1
1
  module Akashi
2
2
  class Builder
3
3
  def build
4
+ create_ssl_certificate
4
5
  create_vpc
5
6
  create_internet_gateway
6
7
  create_subnets
7
8
  create_security_groups
8
9
  create_key_pair
9
- create_ssl_certificate
10
10
  create_ec2_instances
11
11
  create_subnet_group
12
12
  create_db_instance
@@ -18,7 +18,7 @@ module Akashi
18
18
  private_key: OpenSSL::PKey::RSA.new(File.read(private_key_path)).to_pem,
19
19
  server_certificate_name: Akashi.name,
20
20
  }
21
- options.merge!({ certificate_chain: certificate_chain }) if !!certificate_chain
21
+ options.merge!(certificate_chain: certificate_chain) if !!certificate_chain
22
22
 
23
23
  response = Akashi::Aws.iam.client.upload_server_certificate(options)
24
24
 
@@ -6,7 +6,7 @@ module Akashi
6
6
 
7
7
  class << self
8
8
  def create(security_group:)
9
- password = Akashi.manifest.rds.password || random_password(10)
9
+ password = Akashi.manifest.rds.password || random_password(length: 10)
10
10
  options = {
11
11
  db_name: Akashi.name(separator: "_"),
12
12
  db_instance_identifier: Akashi.name,
@@ -16,7 +16,6 @@ module Akashi
16
16
  master_username: Akashi.application,
17
17
  master_user_password: password,
18
18
  multi_az: !!Akashi.manifest.rds.multi_az,
19
- availability_zone: Akashi.manifest.rds.availability_zone,
20
19
  vpc_security_group_ids: [ security_group.id ],
21
20
  db_subnet_group_name: Akashi.name,
22
21
  engine_version: Akashi.manifest.rds.engine_version,
@@ -26,6 +25,9 @@ module Akashi
26
25
  if !!Akashi.manifest.rds.parameter_group_name
27
26
  options.merge!(db_parameter_group_name: Akashi.manifest.rds.parameter_group_name)
28
27
  end
28
+ unless !!Akashi.manifest.rds.multi_az
29
+ options.merge!(availability_zone: Akashi.manifest.rds.availability_zone)
30
+ end
29
31
 
30
32
  response = Akashi::Aws.rds.client.create_db_instance(options)
31
33
 
@@ -34,7 +36,7 @@ module Akashi
34
36
  end
35
37
  end
36
38
 
37
- def random_password(length)
39
+ def random_password(length:)
38
40
  [*0..9, *"a".."z", *"A".."Z"].sample(length).join
39
41
  end
40
42
 
@@ -1,3 +1,3 @@
1
1
  module Akashi
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akashi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - asonas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-23 00:00:00.000000000 Z
12
+ date: 2014-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport