cody 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/cody/list.rb +8 -2
- data/lib/cody/list/project.rb +6 -4
- data/lib/cody/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22929a25e0fafdc9d19bfa921105ef9f28be2acf0adfae1164ca043ec321dbe3
|
4
|
+
data.tar.gz: 211bcae67f008e1d6e2962528e32d8012daef8e4630e4532d726bda1dbaba9b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34ef5640382ec916cc32ecba494d00e7a3267737002ecab7e2de51d8663c402b85837c46019eb9ecc8d0d0666b543be038d1d3ba3b14a3ac2a9ebfdcd1351d0
|
7
|
+
data.tar.gz: e1d51c1772d212f96dc2fd88e0d40c3a0af6a30888d594e1af5be636f63a30130d6a83c08ac56dec2c4af9871470136df74831e538c68e7ded6e9ee0415e4b09
|
data/CHANGELOG.md
CHANGED
data/lib/cody/list.rb
CHANGED
@@ -10,10 +10,15 @@ module Cody
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def run
|
13
|
+
if projects.size > 15
|
14
|
+
puts "Number of projects: #{projects.size}"
|
15
|
+
puts "Can take a while for a large number of projects..."
|
16
|
+
end
|
17
|
+
|
13
18
|
presenter = CliFormat::Presenter.new(@options)
|
14
|
-
presenter.header = ["Name", "Status"]
|
19
|
+
presenter.header = ["Name", "Status", "Time"]
|
15
20
|
projects.each do |project|
|
16
|
-
presenter.rows << [project.name, project.
|
21
|
+
presenter.rows << [project.name, project.build_status, project.end_time]
|
17
22
|
end
|
18
23
|
presenter.show
|
19
24
|
end
|
@@ -21,6 +26,7 @@ module Cody
|
|
21
26
|
def projects
|
22
27
|
list_projects.map { |p| Project.new(p) }
|
23
28
|
end
|
29
|
+
memoize :projects
|
24
30
|
|
25
31
|
def list_projects
|
26
32
|
projects = []
|
data/lib/cody/list/project.rb
CHANGED
@@ -4,17 +4,19 @@ class Cody::List
|
|
4
4
|
include Cody::AwsServices
|
5
5
|
extend Memoist
|
6
6
|
|
7
|
+
delegate :build_status, :start_time, :end_time, to: :build
|
8
|
+
|
7
9
|
attr_reader :name
|
8
10
|
def initialize(name)
|
9
11
|
@name = name # Simple string
|
10
12
|
end
|
11
13
|
|
12
|
-
def
|
14
|
+
def build
|
13
15
|
resp = codebuild.batch_get_builds(ids: [build_id])
|
14
|
-
|
15
|
-
build.build_status
|
16
|
+
resp.builds.first # most recent build
|
16
17
|
end
|
17
|
-
memoize :
|
18
|
+
memoize :build
|
19
|
+
alias_method :load, :build # interface to eager load
|
18
20
|
|
19
21
|
def build_id
|
20
22
|
resp = codebuild.list_builds_for_project(project_name: @name)
|
data/lib/cody/version.rb
CHANGED