stackit 0.3.15 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stackit/cli/base_cli.rb +18 -12
- data/lib/stackit/stack/managed_stack_service.rb +6 -0
- data/lib/stackit/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: 1ffff6b69e08f840f696705eeedbe74a30df0c1c
|
4
|
+
data.tar.gz: f6b64ee09b99d485d629fd6e7a005599a5d4eb1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e17e416d5f09fc8e273d05fb770123a63d5516580b0f910c827e6a65d5de0b58920af9214c8666a5d1decd1cc5a34a66a8602a8140a0550d2e96ae4110837ef
|
7
|
+
data.tar.gz: 6eb7ee1e76f486a286841c0eed374d4cc49d2445c0e35ee900bee79a0e1c939907f9d3a5a8f2bbd9f9422445927613a06519c4f800f600b6a835f887bbf2a06b
|
data/lib/stackit/cli/base_cli.rb
CHANGED
@@ -5,8 +5,8 @@ module Stackit
|
|
5
5
|
class BaseCli < Thor
|
6
6
|
|
7
7
|
class_option :environment, :aliases => '-e', :desc => "Your stack environment (dev, staging, prod, etc)", :default => 'default'
|
8
|
-
class_option :profile, desc: 'AWS profile'
|
9
|
-
class_option :region, desc: 'AWS region'
|
8
|
+
class_option :profile, desc: 'AWS profile', :default => 'default'
|
9
|
+
class_option :region, desc: 'AWS region'
|
10
10
|
class_option :debug, type: :boolean, default: false
|
11
11
|
class_option :verbose, type: :boolean, default: false
|
12
12
|
class_option :assume_role, type: :hash, :desc => 'IAM role name and optional duration to keep the STS token valid'
|
@@ -31,31 +31,37 @@ module Stackit
|
|
31
31
|
no_commands do
|
32
32
|
|
33
33
|
def init_cli
|
34
|
-
Stackit.aws.region = options[:region] if options[:region]
|
35
|
-
Stackit.environment = options[:environment].to_sym if options[:environment]
|
36
34
|
Stackit.debug = !!options[:debug]
|
35
|
+
Stackit.environment = options[:environment].to_sym
|
36
|
+
|
37
37
|
if Stackit.debug
|
38
38
|
Stackit.logger.level = Logger::DEBUG
|
39
|
-
Stackit.logger.debug "Initializing CLI in
|
39
|
+
Stackit.logger.debug "Initializing CLI in DEBUG mode!"
|
40
40
|
begin
|
41
41
|
require 'pry-byebug'
|
42
42
|
rescue LoadError; end
|
43
43
|
elsif options[:verbose]
|
44
44
|
Stackit.logger.level = Logger::INFO
|
45
|
+
Stackit.logger.debug "Initializing CLI with INFO logging level"
|
45
46
|
else
|
46
47
|
Stackit.logger.level = Logger::ERROR
|
47
48
|
end
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
|
50
|
+
Stackit.logger.debug "Environment: #{Stackit.environment}"
|
51
|
+
|
52
|
+
Stackit.aws.credentials = Stackit.aws.load_credentials(options[:environment])
|
53
|
+
|
54
|
+
Stackit.aws.profile = options[:profile] if options[:profile]
|
55
|
+
Stackit.logger.debug "Profile: #{Stackit.aws.profile}"
|
56
|
+
|
57
|
+
Stackit.aws.region = options[:region] if options[:region]
|
58
|
+
Stackit.logger.debug "Region: #{Stackit.aws.region}"
|
59
|
+
|
55
60
|
if options[:assume_role] && options[:assume_role].has_key?('name')
|
56
61
|
name = options[:assume_role]['name']
|
57
62
|
duration = options[:assume_role].has_key?('duration') ? options[:assume_role]['duration'] : 3600
|
58
63
|
Stackit.aws.assume_role!(name, duration)
|
64
|
+
Stackit.logger.debug "Assumed Role: #{name}"
|
59
65
|
end
|
60
66
|
end
|
61
67
|
|
data/lib/stackit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Hahn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|