cody 0.9.6 → 0.9.7

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: 3ced92e5c3ceacd71102a3f6501a0436ff14f4af9fbcaaa13bd29980a107e47e
4
- data.tar.gz: e2a1d2624728f7d57f5fd825e2c6c7b91489119b072a5c4e7b3e439044c058e8
3
+ metadata.gz: fa39f80f5ce459188463bc201140ce7d85ced81312ae2ddeb0d14f8ec8144e22
4
+ data.tar.gz: b85a6c790d4932ce0972f3b744273f6e58ddbc30032133c1cfc2cc7a41b16728
5
5
  SHA512:
6
- metadata.gz: 7b586e1cca3f2d5a84982ce3db857037d6cbafdfad5389be350e4aeab31e07ca8aab13dbc78977dd75bcf604da18fffa9a410dde6922f65df42c20c77b1567af
7
- data.tar.gz: cea281d6d71645ba05ca0de2c410b75205d2434362b813b0ca2dc82b97c28f70817e0f4088751b72d2a01f9427153e4f5f687f721d0d148fd7d5ec2464f99fc3
6
+ metadata.gz: 49fddfb01decedd5d9abe75ca313135e1b2bf46f807fca161dce1d30e54354bb1bc4e19dcde57db9f4690f1c1b43de5a0cdd1c854d7cb941e42453b35991e118
7
+ data.tar.gz: fe7f0374ca5fc899f40f907c73715c8f86fc1b58591e9ffbdd3e04323fd7ad1e00a3016007be3e60e40d49ee07231b030ca2a3a03b97648800f40504b7267318
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.7]
7
+ - #25 cody list: add sort-by option
8
+
6
9
  ## [0.9.6]
7
10
  - #24 refactor: add dsl base class so `project_name` method is available to all dsl classes
8
11
  - cody list: fix for projects with no builds yet
data/lib/cody/cli.rb CHANGED
@@ -62,6 +62,7 @@ module Cody
62
62
  desc "list", "list codebuild project."
63
63
  long_desc Help.text(:list)
64
64
  option :format, desc: "Output formats: #{CliFormat.formats.join(', ')}"
65
+ option :sort_by, desc: "Sort by column: name, status, time"
65
66
  def list
66
67
  List.new(options).run
67
68
  end
data/lib/cody/list.rb CHANGED
@@ -24,7 +24,12 @@ module Cody
24
24
  end
25
25
 
26
26
  def projects
27
- list_projects.map { |p| Project.new(p) }
27
+ projects = list_projects.map { |p| Project.new(p) }
28
+ if @options[:sort_by]
29
+ projects.sort_by { |p| p.send(@options[:sort_by]) }
30
+ else
31
+ projects # default name
32
+ end
28
33
  end
29
34
  memoize :projects
30
35
 
@@ -5,6 +5,8 @@ class Cody::List
5
5
  extend Memoist
6
6
 
7
7
  delegate :build_status, :start_time, :end_time, to: :build
8
+ alias_method :time, :end_time
9
+ alias_method :status, :build_status
8
10
 
9
11
  attr_reader :name
10
12
  def initialize(name)
data/lib/cody/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cody
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-25 00:00:00.000000000 Z
11
+ date: 2020-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport