swa 0.7.0 → 0.7.1

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: b1dfb1773a649e5d9e24e8ee24739cb6b2df451bb2cd4ffdf6a9b4336c067d87
4
- data.tar.gz: dc90877d13ad90f7df91dfcec228639de7dd1393b42f2378ee2236421e1d44a4
3
+ metadata.gz: 588a6a0445908b4b0c24eeab23190c51143c2b603f801c7c64fe8d296ac42180
4
+ data.tar.gz: 21f835b69987db9c4011e4672c1e2bed5a5bf1b2f84112662fb72af1114499c7
5
5
  SHA512:
6
- metadata.gz: 52ee4e00fd3bc9c3001d6a8168a3278f387da0a31732d9dd2bbb4a1971b9066150638ccdf757eac652ff8f6116b58d820262c030d1b018c32605b4475c59feb1
7
- data.tar.gz: ec4a90e0a5a3e973c051227c33adb9d63048d82a31ca745a9c754593d738c76d0c58f3f6fbdfe75e9beae5c9dd4aa159b38016c2c444ac6ac1453aa5b3b8721f
6
+ metadata.gz: c3633166d5fd54e8299875540f0415b36ee092a01d7e3f055d415910ce9268456f89afe5fe88c79df37597d7dd452a8ffd5c5f935bfb397a1afe0353302e6b1c
7
+ data.tar.gz: 9189b5b62448a4430865f4965824c05513b334a0af372df722145a5d945996a15874bab4b3f7b9e7396308adde75633201c3e4c7f9264ac5535dd25ef97956ed
@@ -2,6 +2,7 @@ require "aws-sdk-glue"
2
2
  require "swa/cli/base_command"
3
3
  require "swa/cli/collection_behaviour"
4
4
  require "swa/cli/item_behaviour"
5
+ require "swa/glue/crawl"
5
6
  require "swa/glue/crawler"
6
7
  require "swa/glue/database"
7
8
  require "swa/glue/job"
@@ -21,6 +22,18 @@ module Swa
21
22
 
22
23
  include ItemBehaviour
23
24
 
25
+ subcommand ["crawls"], "Show crawls" do
26
+
27
+ include CollectionBehaviour
28
+
29
+ private
30
+
31
+ def collection
32
+ query_for(:list_crawls, :crawls, Swa::Glue::Crawl, :crawler_name => name)
33
+ end
34
+
35
+ end
36
+
24
37
  private
25
38
 
26
39
  def item
@@ -0,0 +1,25 @@
1
+ require "swa/record"
2
+
3
+ module Swa
4
+ module Glue
5
+
6
+ class Crawl < Record
7
+
8
+ def summary
9
+ [
10
+ crawl_id,
11
+ pad(state, 9),
12
+ start_time.iso8601,
13
+ end_time.iso8601
14
+ ].join(" ")
15
+ end
16
+
17
+ delegate :crawl_id
18
+ delegate :state
19
+ delegate :start_time
20
+ delegate :end_time
21
+
22
+ end
23
+
24
+ end
25
+ end
@@ -19,7 +19,7 @@ module Swa
19
19
  delegate :role
20
20
 
21
21
  def last_crawl_status
22
- aws_record.last_crawl.status
22
+ aws_record.last_crawl&.status || "NEW"
23
23
  end
24
24
 
25
25
  end
data/lib/swa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Swa
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -279,6 +279,7 @@ files:
279
279
  - lib/swa/ec2/volume.rb
280
280
  - lib/swa/ec2/vpc.rb
281
281
  - lib/swa/elb/load_balancer.rb
282
+ - lib/swa/glue/crawl.rb
282
283
  - lib/swa/glue/crawler.rb
283
284
  - lib/swa/glue/database.rb
284
285
  - lib/swa/glue/job.rb