aws_clim 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac0cd640f3b253853487800afc8dce04cfc1792d3322d62099d0d3ec0e6988e4
4
- data.tar.gz: 39eeb60f7b3ec2613a7a3c6ef12ff772c437412fa1ebffd2d1c9a3fe4cc59c24
3
+ metadata.gz: b58d1cc08420aea4f5c6c34a6f27272e07d743b80f9a6714bc6be584b602424a
4
+ data.tar.gz: 36946a492c1ef267ae6c410bffaaffb0441f9d5ba92c1c4d67af6b6330fb5e0b
5
5
  SHA512:
6
- metadata.gz: 456cda408a13813578cad9b2c777e982e8c95bdb4de14e55503fe0a7cf9124e2e03d34d49a9552d07a5924e9dc2e1d87f5a065794ae3b92ea0b102dac1d168d2
7
- data.tar.gz: b054f592c2f7584e8e3ee9facd0e59f1b01b165a5c2ae44fcf1e206e34e6cab1a0c1c9fba978cde57a0fef3bbd3aa264a6a1f6a00af21be32dfded73050561c5
6
+ metadata.gz: 7f5153c491f9aa5f7a21f9750d73f6d85e271114f18aac33767e15f86f120f21cb6b0d40bc88f2e272f67c379580f81343c716d9b120639dfeeecd8f2b1c9955
7
+ data.tar.gz: 398d78d972a507dbc1ec1068b6ecfcce5f2a3a9becef69ab68aee237092aec535b93c8780b350c8531974eb32abaf92db3af81ef2a24696ba633b94e8f393865
@@ -1,3 +1,3 @@
1
1
  module AwsClim
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
data/lib/aws_clim.rb CHANGED
@@ -330,6 +330,10 @@ class AwsClim
330
330
  define_method service_name do |*ps|
331
331
  execute(service_name, ps)
332
332
  end
333
+
334
+ define_method "#{service_name}_help" do
335
+ execute(service_name, 'help').data
336
+ end
333
337
  end
334
338
 
335
339
  def execute(service, options)
@@ -338,7 +342,14 @@ class AwsClim
338
342
  out, err, status = Open3.capture3(cmd)
339
343
 
340
344
  if status.success?
341
- OpenStruct.new(success?: true, error?: false, data: JSON.parse(out, object_class: OpenStruct))
345
+ data =
346
+ begin
347
+ JSON.parse(out, object_class: OpenStruct)
348
+ rescue JSON::ParserError => e
349
+ out
350
+ end
351
+
352
+ OpenStruct.new(success?: true, error?: false, data: data)
342
353
  else
343
354
  OpenStruct.new(success?: false, error?: true, data: err)
344
355
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_clim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew S Aguiar