aws_clim 1.0.7 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/aws_clim/version.rb +1 -1
- data/lib/aws_clim.rb +15 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aa25c093256eba1d7b758bc4911266c5725085401bdf9c8f87db08ad59d9d07
|
4
|
+
data.tar.gz: 8049a22e1d7297059dd44fc7484c7be6ec635c21cb4e977d029623b9594d4d41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc65ab9c4be6c94c47ac7d1ce2e63711b05024fa8b069a7bde2cd5be32f87d82c9a7b616686a5c1a2929a4b6863aa3175c042d721ae09e5520bf66345a2e3d3
|
7
|
+
data.tar.gz: 25c0f83b975be4aec94f8c1c22fcabaacc095d575fb3b56b4819d05dd25d8297072d230ecce9d4e8f5c10b293c8d1e5193175869a51895a14fb49612c63bd5b6
|
data/README.md
CHANGED
@@ -65,6 +65,10 @@ result.error?
|
|
65
65
|
result.data
|
66
66
|
```
|
67
67
|
|
68
|
+
## Warning
|
69
|
+
|
70
|
+
As AwsClim rely on aws cli executable, some services can be unavailable depending of your version.
|
71
|
+
|
68
72
|
## License
|
69
73
|
|
70
74
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/aws_clim/version.rb
CHANGED
data/lib/aws_clim.rb
CHANGED
@@ -8,6 +8,7 @@ class AwsClim
|
|
8
8
|
@global_options = global_options
|
9
9
|
end
|
10
10
|
|
11
|
+
# https://docs.aws.amazon.com/cli/latest/reference/
|
11
12
|
SERVICES = %w(
|
12
13
|
accessanalyzer
|
13
14
|
account
|
@@ -337,6 +338,17 @@ class AwsClim
|
|
337
338
|
execute(service_name, ps)
|
338
339
|
end
|
339
340
|
|
341
|
+
define_method "#{service_name.gsub('-', '_')}!" do |*ps|
|
342
|
+
result = execute(service_name, ps)
|
343
|
+
|
344
|
+
if result.error?
|
345
|
+
puts result.data
|
346
|
+
exit 1
|
347
|
+
end
|
348
|
+
|
349
|
+
result
|
350
|
+
end
|
351
|
+
|
340
352
|
define_method "#{service_name.gsub('-', '_')}_help" do
|
341
353
|
execute(service_name, 'help').data
|
342
354
|
end
|
@@ -377,7 +389,9 @@ class AwsClim
|
|
377
389
|
|
378
390
|
def format_option(option)
|
379
391
|
if option.is_a?(Array)
|
380
|
-
|
392
|
+
name, value = option
|
393
|
+
|
394
|
+
"--#{name}=\"#{value.gsub('"', '\\"')}\""
|
381
395
|
elsif option.is_a?(Hash)
|
382
396
|
format_options(option.to_a)
|
383
397
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_clim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew S Aguiar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: wraps aws cli in a very small and flexible ruby class
|
14
14
|
email:
|