qops 1.7.1 → 1.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5f3299976affb433fc5de4849317a5bbf6470d22
4
- data.tar.gz: 6c1a7cdbd26e95c99d53362c128ed8b4f68256ab
2
+ SHA256:
3
+ metadata.gz: a1e04664fb5d8cf82677fb1f6ce109ea12209e48c338d5cfdc533a2b9537f337
4
+ data.tar.gz: 3e328659635aef9ce2d5ecda36e491044e4c94e65efbac33212f7cd8f8bc19b2
5
5
  SHA512:
6
- metadata.gz: f4c4bfe42ccb4c09e97ecde9ceaa37f6f448fa779d053a9353ed508e3fd9fffa670229263f6fecfa11c98ec309729ae92c47690093b152548e61b33f283e1081
7
- data.tar.gz: 884b50cfa62e0ea87f44dcc69efa639302b111eb36ddff8a4c17c083152874d4927c9afc4ee7d35c5051217ed012af6a6b8012b52f0885feb241e5190d390cc7
6
+ metadata.gz: c00d582dc9c65fd047de71b8fccbf2d7d0e8c64259bb1dea2c35881bb2e82c3ecee18ba0f5d5678617d98d89bbb4d0e88cc8dabfebdbbd7970bb48b2864de0e2
7
+ data.tar.gz: 05aa9df5663df7b5cb27b562810984e84680483dcecc559efd86427444d5ca39904a5da9c9b025ab92b9c8a688f3fa1824374173807156a3837874337a94ea1c
@@ -19,6 +19,7 @@ require_relative 'qops/deployment/helpers'
19
19
  require_relative 'qops/deployment/app'
20
20
  require_relative 'qops/deployment/instances'
21
21
  require_relative 'qops/deployment/stacks'
22
+ require_relative 'qops/cookbook/helpers'
22
23
  require_relative 'qops/cookbook/cookbook'
23
24
 
24
25
  # Migrate this into quandl config project
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Qops::Cookbook < Thor
4
- include Qops::Helpers
4
+ include Qops::CookbookHelpers
5
5
 
6
6
  desc 'vendor', 'Generate vendor directory to contain the cookbooks'
7
7
  def vendor
@@ -118,20 +118,6 @@ class Qops::Cookbook < Thor
118
118
  config
119
119
  end
120
120
 
121
- def config
122
- return @_config if @_config
123
-
124
- @_config ||= Qops::Environment.new
125
-
126
- %w[cookbook_dir cookbook_s3_bucket cookbook_s3_path cookbook_name cookbook_version].each do |var|
127
- fail ArgumentError.new("Must specify a '#{var}' in the config") if !@_config.respond_to?(var) && !@_config.configuration.respond_to?(var)
128
- end
129
-
130
- fail ArgumentError.new("Cannot find/do not have access to cookbook directory: #{@_config.cookbook_dir}") unless Dir.exist?(@_config.cookbook_dir)
131
-
132
- @_config
133
- end
134
-
135
121
  def s3
136
122
  @s3 ||= Aws::S3::Client.new(**aws_configs)
137
123
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Qops::CookbookHelpers
4
+ extend ActiveSupport::Concern
5
+
6
+ include Qops::Helpers
7
+
8
+ included do
9
+ class_option :profile, type: :string, aliases: '-p', desc: 'An AWS profile to use'
10
+ class_option :force_config, type: :boolean, aliases: '-f', desc: 'Force qops to read options from config. by default qops will search aws opsworks stack'
11
+ class_option :verbose, type: :boolean, aliases: '-v', desc: 'Provides additional information when running for debugging purposes.'
12
+ end
13
+
14
+ private
15
+
16
+ def config
17
+ return @_config if @_config
18
+
19
+ @_config ||= Qops::Environment.new(profile: options[:profile], force_config: options[:force_config], verbose: options[:verbose])
20
+
21
+ %w[cookbook_dir cookbook_s3_bucket cookbook_s3_path cookbook_name cookbook_version].each do |var|
22
+ fail ArgumentError.new("Must specify a '#{var}' in the config") if !@_config.respond_to?(var) && !@_config.configuration.respond_to?(var)
23
+ end
24
+
25
+ fail ArgumentError.new("Cannot find/do not have access to cookbook directory: #{@_config.cookbook_dir}") unless Dir.exist?(@_config.cookbook_dir)
26
+
27
+ @_config
28
+ end
29
+
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qops
4
- VERSION = '1.7.1'
4
+ VERSION = '1.7.2'
5
5
  end
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.7.1
4
+ version: 1.7.2
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: 2018-02-01 00:00:00.000000000 Z
15
+ date: 2018-06-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -110,6 +110,7 @@ files:
110
110
  - bin/qops
111
111
  - lib/qops.rb
112
112
  - lib/qops/cookbook/cookbook.rb
113
+ - lib/qops/cookbook/helpers.rb
113
114
  - lib/qops/deployment/app.rb
114
115
  - lib/qops/deployment/helpers.rb
115
116
  - lib/qops/deployment/instances.rb
@@ -137,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
138
  version: '0'
138
139
  requirements: []
139
140
  rubyforge_project:
140
- rubygems_version: 2.6.14
141
+ rubygems_version: 2.7.4
141
142
  signing_key:
142
143
  specification_version: 4
143
144
  summary: Helper commands for deployment of opsworks projects.