awshark 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/awshark.gemspec +2 -1
- data/lib/awshark/cloud_formation/template.rb +19 -10
- data/lib/awshark/subcommands/cloud_formation.rb +1 -0
- data/lib/awshark/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbb6b1c8acc6985b27bae79aceffe7e15898e37a975cdef6eac0678ab3d644f2
|
4
|
+
data.tar.gz: 141dde43ded62f04ac26d2fea21f38b5b829a6d755ea42c0d0aa0ccfaeb2d316
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8307e5b068979c55a48f7b87b8aab75b32b8b5f0e4e2c4e42fce39b57b78c6dea08441ebcaaca30a8615b2bf56875ca10fe514da61d574f6e71cec52338d9327
|
7
|
+
data.tar.gz: f8372c0258917758924fadd5aab3f074b17b7dc1ffb2c124af5aba1146dcc560845090d366ce780cfb1f1e4fb6aad4574db0d345a8ed29fb9a6be74a03fd22e8
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -53,8 +53,8 @@ You can also run `bin/console` for an interactive prompt that will allow you to
|
|
53
53
|
To install this gem onto your local machine, run
|
54
54
|
|
55
55
|
gem build awshark.gemspec
|
56
|
-
gem install --local awshark-
|
57
|
-
rm awshark-
|
56
|
+
gem install --local awshark-1.1.0.gem
|
57
|
+
rm awshark-1.1.0.gem
|
58
58
|
|
59
59
|
|
60
60
|
### Contributing
|
data/awshark.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'awshark'
|
9
9
|
spec.version = Awshark::VERSION
|
10
10
|
spec.authors = ['Joergen Dahlke']
|
11
|
-
spec.email = ['joergen.dahlke@
|
11
|
+
spec.email = ['joergen.dahlke@gmail.com']
|
12
12
|
|
13
13
|
spec.summary = 'Custom CLI for for AWS related tasks'
|
14
14
|
spec.description = 'Custom CLI for for AWS to simplify common tasks with EC2, S3 and Cloud Formation'
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_dependency 'aws-sdk-ecr'
|
37
37
|
spec.add_dependency 'aws-sdk-rds'
|
38
38
|
spec.add_dependency 'aws-sdk-s3'
|
39
|
+
spec.add_dependency 'aws-sdk-ssm', '~> 1.117.0'
|
39
40
|
spec.add_dependency 'diffy'
|
40
41
|
spec.add_dependency 'mini_mime'
|
41
42
|
spec.add_dependency 'recursive-open-struct'
|
@@ -28,16 +28,18 @@ module Awshark
|
|
28
28
|
|
29
29
|
# @returns [Hash]
|
30
30
|
def context
|
31
|
-
@context ||=
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
@context ||=
|
32
|
+
begin
|
33
|
+
context = load_file(context_path) || {}
|
34
|
+
context = context[stage] if context.key?(stage)
|
35
|
+
|
36
|
+
{
|
37
|
+
context: RecursiveOpenStruct.new(context),
|
38
|
+
aws_account_id: Awshark.config.aws_account_id,
|
39
|
+
stage: stage,
|
40
|
+
ssm: ssm
|
41
|
+
}
|
42
|
+
end
|
41
43
|
end
|
42
44
|
|
43
45
|
# @returns [Integer]
|
@@ -59,6 +61,13 @@ module Awshark
|
|
59
61
|
|
60
62
|
private
|
61
63
|
|
64
|
+
def ssm
|
65
|
+
proc do |key|
|
66
|
+
@ssm_client ||= Aws::SSM::Client.new
|
67
|
+
@ssm_client.get_parameter(name: key, with_decryption: true)&.parameter&.value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
62
71
|
def region
|
63
72
|
Aws.config[:region] || 'eu-central-1'
|
64
73
|
end
|
data/lib/awshark/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awshark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joergen Dahlke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: aws-sdk-ssm
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.117.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.117.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: diffy
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,7 +223,7 @@ dependencies:
|
|
209
223
|
description: Custom CLI for for AWS to simplify common tasks with EC2, S3 and Cloud
|
210
224
|
Formation
|
211
225
|
email:
|
212
|
-
- joergen.dahlke@
|
226
|
+
- joergen.dahlke@gmail.com
|
213
227
|
executables:
|
214
228
|
- awshark
|
215
229
|
extensions: []
|