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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ac17434396752c71c060dec145fdf77d33b87284e80c8ed22331f2883d5c54a
4
- data.tar.gz: ab4b5ff8c6544f6f0e430d9a8809dd1729db1d90ea21cef2ab3d3aedc07a8484
3
+ metadata.gz: 22929a25e0fafdc9d19bfa921105ef9f28be2acf0adfae1164ca043ec321dbe3
4
+ data.tar.gz: 211bcae67f008e1d6e2962528e32d8012daef8e4630e4532d726bda1dbaba9b8
5
5
  SHA512:
6
- metadata.gz: 65d3c74359eb9f40788fb48c6b78e48e4565c6a2a016388ca001818e0011153d6eb1fed87b4ad97ef9526907bb58965e31f418ba2f3cb167dac2e1f57495fddb
7
- data.tar.gz: f81511a9c4bfce6a9db58df63c84fcf6418bbf2092e48a54521bc29a9ed71baf4cb1f3e38fb6c78c327ffb1411838692b87be4b14e374f7015b29396f02507a7
6
+ metadata.gz: f34ef5640382ec916cc32ecba494d00e7a3267737002ecab7e2de51d8663c402b85837c46019eb9ecc8d0d0666b543be038d1d3ba3b14a3ac2a9ebfdcd1351d0
7
+ data.tar.gz: e1d51c1772d212f96dc2fd88e0d40c3a0af6a30888d594e1af5be636f63a30130d6a83c08ac56dec2c4af9871470136df74831e538c68e7ded6e9ee0415e4b09
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.9.4]
7
+ - #23 list command: add Time column
8
+
6
9
  ## [0.9.3]
7
10
  - #22 add badge command
8
11
 
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.status]
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 = []
@@ -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 status
14
+ def build
13
15
  resp = codebuild.batch_get_builds(ids: [build_id])
14
- build = resp.builds.first
15
- build.build_status
16
+ resp.builds.first # most recent build
16
17
  end
17
- memoize :status
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
@@ -1,3 +1,3 @@
1
1
  module Cody
2
- VERSION = "0.9.3"
2
+ VERSION = "0.9.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen