prick 0.39.6 → 0.39.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prick/local/fmt.rb +6 -4
- data/lib/prick/subcommand/prick-list.rb +10 -2
- data/lib/prick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d27db668e8163dce24bb6c7548f5332a5f5e8c72ee4a5e266b10a032a06b782
|
4
|
+
data.tar.gz: c3e293fec4e73625c45e28198f112a52cef7d83816274ca3a63231cfc6746c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02fcb89d65a6c99e95b9263266c84353eac7a572a6338bcabde51d699377a4c32161dd785ef1b9ccdd16f58ba85e92174ba09e086eda7fd11426449d30c2fa2e
|
7
|
+
data.tar.gz: 7079b45ddf107b13c1ea22e131ea580c16c9e3378fc0f0ff3e1eb22b8b0e8b3c22a61e3732efb1f58180a29fc97d5453a0ff2a96cec2c4d3ac1a5083948a8e97
|
data/lib/prick/local/fmt.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
module Fmt
|
3
3
|
# Print table
|
4
|
-
def self.puts_table(headers, table)
|
4
|
+
def self.puts_table(headers, table, bold: nil)
|
5
5
|
widths = headers.map(&:size)
|
6
6
|
signs = []
|
7
7
|
types = []
|
@@ -58,8 +58,10 @@ module Fmt
|
|
58
58
|
}
|
59
59
|
puts
|
60
60
|
|
61
|
-
|
61
|
+
table.each.with_index { |row, rownum|
|
62
62
|
# for index, sign, width, type, value in signs.zip(indexes, signs, widths, types, row) # FIXME doesn't work?
|
63
|
+
print "\033[1m" if rownum == bold
|
64
|
+
|
63
65
|
for i in (0...headers.size)
|
64
66
|
index, sign, width, type, value = indexes[i], signs[i], widths[i], types[i], row[i]
|
65
67
|
|
@@ -92,8 +94,8 @@ module Fmt
|
|
92
94
|
printf "%#{sign}#{width}#{type} ", "#{value}"
|
93
95
|
end
|
94
96
|
end
|
95
|
-
puts
|
96
|
-
|
97
|
+
puts (rownum == bold ? "\033[0m" : "")
|
98
|
+
}
|
97
99
|
end
|
98
100
|
end
|
99
101
|
|
@@ -50,6 +50,7 @@ module Prick::SubCommand
|
|
50
50
|
git_rev = Git.id[0...8]
|
51
51
|
|
52
52
|
rows = []
|
53
|
+
current_database_row = nil
|
53
54
|
Prick.databases { |database, conn|
|
54
55
|
row = conn.record(%(
|
55
56
|
select
|
@@ -58,6 +59,12 @@ module Prick::SubCommand
|
|
58
59
|
from prick.versions
|
59
60
|
))
|
60
61
|
|
62
|
+
# Detect is this is the current database
|
63
|
+
if Prick.state.database == database
|
64
|
+
is_current_database = true
|
65
|
+
current_database_row = rows.size
|
66
|
+
end
|
67
|
+
|
61
68
|
if row[:success]
|
62
69
|
clean = row[:clean]
|
63
70
|
same_revision = row[:branch] == git_branch && row[:rev] == git_rev
|
@@ -84,12 +91,13 @@ module Prick::SubCommand
|
|
84
91
|
row[:built_at] = row[:built_at]&.strftime("%Y-%m-%d %H:%M")
|
85
92
|
|
86
93
|
# Add current database marker
|
87
|
-
last_column = (
|
94
|
+
last_column = (is_current_database ? "*" : "")
|
95
|
+
|
88
96
|
rows << row.values + [last_column]
|
89
97
|
}
|
90
98
|
|
91
99
|
headers = %w(database project version branch rev clean environment built success state) + [" "]
|
92
|
-
Fmt.puts_table(headers, rows)
|
100
|
+
Fmt.puts_table(headers, rows, bold: current_database_row)
|
93
101
|
end
|
94
102
|
end
|
95
103
|
|
data/lib/prick/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.
|
4
|
+
version: 0.39.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|