swa 0.8.3 → 0.8.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: '0863918be3963c4a4fefbf9f7d4c7f049617cf5e6b9fe53ca1d3743eace7c364'
4
- data.tar.gz: d1d2972dbcfd1c90379202aabc80dbc4968c231bf27054842270d98aae5a6e00
3
+ metadata.gz: f97ea85d4f432b6ea61fb652ce14f5ea50f1827aa3056437869f9eb6fcd28f83
4
+ data.tar.gz: 00e6d4f165f754f6dc4d03d4c45c09075b7235961527d1792eec649f8475b67e
5
5
  SHA512:
6
- metadata.gz: dcb11477f1210b8a6e766a0ed9b3623d60d4a7cc4b95b643cf2b634e95cb4230c024e5853e7cf4b71bc789cd006885d5ab7313275739bc7d31daf706739d2d6f
7
- data.tar.gz: e7c298215ee0cf718992d8afde6b78ab1c8e00b25a82d3f8cd45615112bc544db33791350abb2698991f5b0d9e3d711fefaf8c38dcc4341c5664c3eaab326814
6
+ metadata.gz: da5a54d7e1ec1da3b3860cf27ae60e5548eb007679ff7158eb6c8e0ae7f82b49592c553b6920b230773302a7318d5f2d651ba2bfc1d5c7c37d9256bc51fc1aa6
7
+ data.tar.gz: 10134f56ec3a62439470d5f0148a8e3df4804338ff86a18c824da2795866fd1512cfab71c75f8bd9de45b1f3f5b1ab7b3c092825e4d88b6c89c47c3640bf084c
@@ -148,8 +148,7 @@ module Swa
148
148
  end
149
149
 
150
150
  def query_for(query_method, response_key, model, **query_args)
151
- records = athena_client.public_send(query_method, **query_args).public_send(response_key)
152
- model.list(records)
151
+ model.list_from_query(athena_client, query_method, response_key, **query_args)
153
152
  end
154
153
 
155
154
  def output_results_as_csv(result_set)
@@ -211,8 +211,7 @@ module Swa
211
211
  end
212
212
 
213
213
  def query_for(query_method, response_key, model, **query_args)
214
- records = glue_client.public_send(query_method, **query_args).public_send(response_key)
215
- model.list(records)
214
+ model.list_from_query(glue_client, query_method, response_key, **query_args)
216
215
  end
217
216
 
218
217
  end
@@ -54,9 +54,8 @@ module Swa
54
54
  ::Aws::KMS::Client.new(aws_config)
55
55
  end
56
56
 
57
- def query_for(query_method, response_key, model)
58
- records = kms_client.public_send(query_method).public_send(response_key)
59
- model.list(records)
57
+ def query_for(query_method, response_key, model, **query_args)
58
+ model.list_from_query(kms_client, query_method, response_key, **query_args)
60
59
  end
61
60
 
62
61
  end
@@ -59,8 +59,7 @@ module Swa
59
59
  end
60
60
 
61
61
  def query_for(query_method, response_key, model, **query_args)
62
- records = lf_client.public_send(query_method, **query_args).public_send(response_key)
63
- model.list(records)
62
+ model.list_from_query(lf_client, query_method, response_key, **query_args)
64
63
  end
65
64
 
66
65
  end
data/lib/swa/record.rb CHANGED
@@ -9,6 +9,13 @@ module Swa
9
9
  records.lazy.map(&method(:new))
10
10
  end
11
11
 
12
+ def self.list_from_query(client, query_method, response_key, **query_args)
13
+ records = client.public_send(query_method, **query_args).each.lazy.flat_map { |page|
14
+ page.public_send(response_key)
15
+ }
16
+ list(records)
17
+ end
18
+
12
19
  def initialize(aws_record)
13
20
  @aws_record = aws_record
14
21
  end
data/lib/swa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Swa
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-21 00:00:00.000000000 Z
11
+ date: 2024-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler