vominator 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/circle.yml +2 -2
- data/lib/vominator/ssm.rb +3 -1
- data/lib/vominator/version.rb +1 -1
- data/lib/vominator/vpc.rb +6 -4
- data/spec/lib/vominator/instances_spec.rb +2 -2
- data/vominator.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a02ad514384d37adef6b9b192716141a451ecc2
|
4
|
+
data.tar.gz: 2403c7628daa6c9d83238b84a1d44e13add078b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 537766126b490442bac154d4c36c2b76e790a27249bd3c19394d4fd58d3c27b1a2c171811d355ae02076131fc658423fae5cdb7798dc4b63d71e7776d849856d
|
7
|
+
data.tar.gz: a444493590528de6b5c47cc55da40ab1403734415d887506d4324c37e6a88d22473c6a67f31f92a9e42b54c97a1efc0968fc3e287da3d86c81f45a30087cb332
|
data/circle.yml
CHANGED
data/lib/vominator/ssm.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'aws-sdk'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/core_ext/object/try'
|
2
4
|
require_relative 'constants'
|
3
5
|
|
4
6
|
module Vominator
|
@@ -25,7 +27,7 @@ module Vominator
|
|
25
27
|
|
26
28
|
def self.put_document(client,name,data)
|
27
29
|
client.create_document(:name => name, :content => data)
|
28
|
-
sleep 2 until Vominator::SSM.describe_document(client,name).status == 'active'
|
30
|
+
sleep 2 until Vominator::SSM.describe_document(client,name).try(:status) == 'active'
|
29
31
|
|
30
32
|
if Vominator::SSM.describe_document(client,name).status == 'active'
|
31
33
|
return true
|
data/lib/vominator/version.rb
CHANGED
data/lib/vominator/vpc.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'aws-sdk'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/core_ext/object/try'
|
2
4
|
require_relative 'constants'
|
3
5
|
|
4
6
|
module Vominator
|
@@ -12,7 +14,7 @@ module Vominator
|
|
12
14
|
|
13
15
|
def self.create_vpc(client, cidr_block, tenancy='default')
|
14
16
|
resp = client.create_vpc(:cidr_block => cidr_block, :instance_tenancy => tenancy)
|
15
|
-
sleep 2 until Vominator::VPC.get_vpc(client,resp.vpc.vpc_id).state == 'available'
|
17
|
+
sleep 2 until Vominator::VPC.get_vpc(client,resp.vpc.vpc_id).try(:state) == 'available'
|
16
18
|
return resp.vpc
|
17
19
|
end
|
18
20
|
|
@@ -27,7 +29,7 @@ module Vominator
|
|
27
29
|
|
28
30
|
def self.attach_internet_gateway(client, gateway_id, vpc_id)
|
29
31
|
resp = client.attach_internet_gateway(internet_gateway_id: gateway_id, vpc_id: vpc_id)
|
30
|
-
sleep 2 until Vominator::VPC.get_internet_gateway(client, gateway_id).attachments.first.state == 'available'
|
32
|
+
sleep 2 until Vominator::VPC.get_internet_gateway(client, gateway_id).try(:attachments).try(:first).try(:state) == 'available'
|
31
33
|
return true
|
32
34
|
end
|
33
35
|
|
@@ -37,7 +39,7 @@ module Vominator
|
|
37
39
|
|
38
40
|
def self.create_nat_gateway(client, subnet_id, allocation_id)
|
39
41
|
resp = client.create_nat_gateway(subnet_id: subnet_id, allocation_id: allocation_id).nat_gateway
|
40
|
-
sleep 2 until Vominator::VPC.get_nat_gateway(client, resp.nat_gateway_id).state == 'available'
|
42
|
+
sleep 2 until Vominator::VPC.get_nat_gateway(client, resp.nat_gateway_id).try(:state) == 'available'
|
41
43
|
return resp
|
42
44
|
end
|
43
45
|
|
@@ -69,7 +71,7 @@ module Vominator
|
|
69
71
|
|
70
72
|
def self.create_subnet(client, vpc_id, cidr_block, availability_zone)
|
71
73
|
resp = client.create_subnet(vpc_id: vpc_id, cidr_block: cidr_block, availability_zone: availability_zone).subnet
|
72
|
-
sleep 2 until Vominator::VPC.get_subnet(client, resp.subnet_id).state == 'available'
|
74
|
+
sleep 2 until Vominator::VPC.get_subnet(client, resp.subnet_id).try(:state) == 'available'
|
73
75
|
return resp
|
74
76
|
end
|
75
77
|
|
@@ -78,7 +78,7 @@ describe Vominator::Instances do
|
|
78
78
|
|
79
79
|
describe 'generate_cloud_config' do
|
80
80
|
context 'when I pass a valid hostname, environment, family, roles, and recipes' do
|
81
|
-
let (:cloud_config) { Vominator::Instances.generate_cloud_config('sample-api-1', 'test', 'linux', ['role1'], ['recipe1'] )}
|
81
|
+
let (:cloud_config) { Vominator::Instances.generate_cloud_config('sample-api-1', 'test', 'test', 'linux', ['role1'], ['recipe1'] )}
|
82
82
|
|
83
83
|
subject { cloud_config }
|
84
84
|
it 'should return a rendered cloud_config' do
|
@@ -93,4 +93,4 @@ describe Vominator::Instances do
|
|
93
93
|
xit 'it should do something'
|
94
94
|
end
|
95
95
|
end
|
96
|
-
end
|
96
|
+
end
|
data/vominator.gemspec
CHANGED
@@ -18,13 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.2.2'
|
22
22
|
|
23
23
|
spec.add_dependency 'aws-sdk', '= 2.2.18'
|
24
24
|
spec.add_dependency 'colored', '~> 1.2'
|
25
25
|
spec.add_dependency 'highline', '~> 1.7'
|
26
26
|
spec.add_dependency 'erubis', '~> 2.7'
|
27
27
|
spec.add_dependency 'terminal-table', '~> 1.5.2'
|
28
|
+
spec.add_dependency 'activesupport', '~> 5.0.0'
|
28
29
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
29
30
|
spec.add_development_dependency 'rake'
|
30
31
|
spec.add_development_dependency 'rspec'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vominator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Kelly
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-07-
|
13
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -82,6 +82,20 @@ dependencies:
|
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 1.5.2
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: activesupport
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 5.0.0
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 5.0.0
|
85
99
|
- !ruby/object:Gem::Dependency
|
86
100
|
name: bundler
|
87
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
245
259
|
requirements:
|
246
260
|
- - ">="
|
247
261
|
- !ruby/object:Gem::Version
|
248
|
-
version:
|
262
|
+
version: 2.2.2
|
249
263
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
264
|
requirements:
|
251
265
|
- - ">="
|