qops 1.6.0 → 1.6.1
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 +4 -4
- data/lib/qops/environment.rb +8 -15
- data/lib/qops/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae573e99371d225d3eca19d41a48f13a8a013819
|
4
|
+
data.tar.gz: 7feba6d8f128cf7e6a62bf80cf5306d4827db491
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 102be14735cf3aaf894bcc5b502f4c9bf5d9652651a592428f19978f779f740612bb6b74224273f39618427028a80c6e0f13dd4fc2a5b929d1b0959eec993831
|
7
|
+
data.tar.gz: dfe5b532a6da97e65b66474267b843c50d4c1fb8d321ec4dc0ae2894b16a51eed086136b559f92958bd1eb1e59146a307022f5f9499a1689c4555d5b2d966dd9
|
data/lib/qops/environment.rb
CHANGED
@@ -35,22 +35,13 @@ module Qops
|
|
35
35
|
@_aws_config = { region: configuration.region }
|
36
36
|
@_aws_config[:profile] = profile unless profile.nil?
|
37
37
|
@_force_config = force_config
|
38
|
+
profile.nil? ? opsworks.config.credentials.credentials : @_aws_config[:profile] = profile
|
38
39
|
puts Rainbow("using aws profile #{profile}").bg(:black).green unless profile.nil?
|
39
|
-
|
40
|
+
puts Rainbow('Forcing Qops to read the opsworks parameter strictly from yaml') if force_config
|
40
41
|
%w[deploy_type region app_name].each do |v|
|
41
42
|
fail "Please configure #{v} before continuing." unless option?(v)
|
42
43
|
end
|
43
|
-
|
44
|
-
fail 'Please configure the layer_name if you are allowing qops to search aws stacks' unless option?('layer_name')
|
45
|
-
|
46
|
-
# if being forced to use config , then stack_id is a requirement
|
47
44
|
fail 'Please configure stack_id or stack_name before continuing' unless option?('stack_id') || option?('stack_name')
|
48
|
-
|
49
|
-
begin
|
50
|
-
opsworks.config.credentials.credentials unless profile
|
51
|
-
rescue => e # rubocop:disable Lint/RescueWithoutErrorClass
|
52
|
-
raise "There may be a problem with your aws credentials. Please correct with `aws configure`. Error: #{e}"
|
53
|
-
end
|
54
45
|
end
|
55
46
|
|
56
47
|
def stack(options = {})
|
@@ -77,10 +68,12 @@ module Qops
|
|
77
68
|
opsworks.describe_layers(stack_id: stack_id).layers
|
78
69
|
end
|
79
70
|
|
80
|
-
def layer_id(
|
71
|
+
def layer_id(_options = {})
|
81
72
|
return configuration.layer_id if @_force_config
|
82
|
-
name =
|
83
|
-
|
73
|
+
name = configuration.layer_name
|
74
|
+
puts "searching for #{name}"
|
75
|
+
layer = layers.find { |l| l.name.match(/#{name}/i) }
|
76
|
+
layer.layer_id
|
84
77
|
end
|
85
78
|
|
86
79
|
def chef_version(options = {})
|
@@ -118,7 +111,7 @@ module Qops
|
|
118
111
|
|
119
112
|
def opsworks_os(options = {})
|
120
113
|
return configuration.os if @_force_config
|
121
|
-
|
114
|
+
stack(options).default_os
|
122
115
|
end
|
123
116
|
|
124
117
|
# Default 1 days
|
data/lib/qops/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Basset
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-10-
|
15
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: qthor
|