lsaws 0.3.1 → 0.4.0

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: e2b87621670d3747c4c1b6cb9979c7401f7e736ceb8c257819a42dc31b190471
4
- data.tar.gz: ab3227e58e62f14a718858242bd2cdd5ffd8f6a5f15acc38550605a01aea2352
3
+ metadata.gz: c0d598275bd859c635b9624e2f68ec448fa7686e96277d378a7c5271c69e5a8e
4
+ data.tar.gz: 224fedf7610162c977569cfae53ef7d95ed369cd0c5b957c3b31b7d8da463ac6
5
5
  SHA512:
6
- metadata.gz: 4eeb107b1267e40dadb27fccb5dc619f53807410c68c3b85cda9c5e63e3c57da9ab731b422f1c236a0b3bc7a2701e4bffee989257676a9e3cff20cfc9ce2b07c
7
- data.tar.gz: a725ba9efec0bf251516ca30a8841dac825ca3dacaf2adf00dcef453f2806e22d946512a6b4f6e70bb6f72547f2204e474065f623f86bc258e0a48624c8e9aef
6
+ metadata.gz: 56b968c07fc55cf482ada438f0b611bfe3c7b898ed4cd8b390d540d7672eac01a7a127ede7f466e40bf873aacd517584a7389097c89a2ba29f6d631228aefd64
7
+ data.tar.gz: e60474fcaf6278d16c6355f1fad79e1ce3577ea821b450f90a590daba6a0adb27a9c4e09087896e198c0e10f91c95cca9db47e1f99ded6e70c56a02e3dc4c17e
data/lib/lsaws/cli.rb CHANGED
@@ -29,6 +29,19 @@ module Lsaws
29
29
  OptionParser.new do |opt|
30
30
  opt.banner = "Usage: lsaws [options] <sdk> [entity_type]"
31
31
 
32
+ opt.on("--endpoint ENDPOINT", "AWS endpoint") do |o|
33
+ @options[:endpoint] = o
34
+ end
35
+
36
+ opt.on("--endpoint-url ENDPOINT", "AWS endpoint (aws cli compatible option)") do |o|
37
+ @options[:endpoint] = o
38
+ end
39
+
40
+ opt.on("-p", "--profile PROFILE", "AWS profile") do |o|
41
+ @options[:profile] = o
42
+ ENV['AWS_PROFILE'] = o
43
+ end
44
+
32
45
  opt.on("-o", "--output FMT", SUPPORTED_FORMATS, "Format: #{SUPPORTED_FORMATS.join("/")}") do |f|
33
46
  @options[:format] = f.to_sym
34
47
  end
data/lib/lsaws/lister.rb CHANGED
@@ -41,9 +41,13 @@ module Lsaws
41
41
  end
42
42
  params[:max_results] = @options[:max_results] if @options[:max_results]
43
43
 
44
+ ctor_params = {}
45
+ ctor_params[:endpoint] = @options[:endpoint] if @options[:endpoint]
46
+
44
47
  sdkp = SDKParser.new(sdk)
45
48
  client_class = edef["client_class"] || sdkp.client_class_name
46
- client = Kernel.const_get(client_class).new
49
+ client = Kernel.const_get(client_class).new(ctor_params)
50
+
47
51
  method_name = edef["method"] || sdkp.etype2method(type)
48
52
  _abort_with_list(sdk, type) unless method_name
49
53
  warn "[d] #{method_name} #{params}" if @options[:debug]
data/lib/lsaws/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lsaws
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lsaws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey "Zed" Zaikin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-16 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.3.7
89
+ rubygems_version: 3.5.6
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: User-friendly AWS resources listing tool