drone-builds 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/drone/builds/cli.rb +9 -1
- data/lib/drone/builds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc8566a96dc4b85497b5796023fb0346e909a8e
|
4
|
+
data.tar.gz: 2c088fd00f33c43c6dae547f2838d8c973e70874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b123a6b8cd76bd821c7a2158710f02ea008d42cd6724f4686df28ec4b4522f01eed743a6709dc1a45d6d05a7aac95964cf7e347f85151468344b42fdce54c84d
|
7
|
+
data.tar.gz: 12cec74ae0d997d74c51d35440d5b836346fb0d10a369d16d0690cc712e44493fdecbcdc4c4a286cc49d0ce9e1e2c21da36eaa21a2904d6fab88b71dfadeecca
|
data/lib/drone/builds/cli.rb
CHANGED
@@ -23,7 +23,15 @@ class Drone::Builds::Cli < Thor
|
|
23
23
|
|
24
24
|
desc "show", "show a build"
|
25
25
|
method_option :filter, type: :string, aliases: "-f", desc: "filter builds output lines"
|
26
|
-
|
26
|
+
method_option :last, type: :numeric, default: 1, aliases: "-l", desc: "show nth last build"
|
27
|
+
def show(id = nil)
|
28
|
+
if id.nil? && options[:last]
|
29
|
+
last = self.class.client.list(limit: options[:last])[0]
|
30
|
+
id = last["id"] if last
|
31
|
+
end
|
32
|
+
|
33
|
+
abort "id is required" if id.to_s.empty?
|
34
|
+
|
27
35
|
self.class.client.show(id, filter: options[:filter]) { |line| puts line }
|
28
36
|
end
|
29
37
|
|
data/lib/drone/builds/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drone-builds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|