prick 0.47.0 → 0.47.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0b2c89a6c361464beb0f61da45df83e0d0f1ccc2d00beade78b2f25da3adc13
4
- data.tar.gz: 0701613c1743c4e95cf7a801b770340f6e8bceffdfccab71125c05bda3baf4f9
3
+ metadata.gz: fb047cb78bf93a959a23b9ae57cf4a5fc0c90c0904cb8c762fbb64d46d035d15
4
+ data.tar.gz: 626dc588fa8ac02599ac8912623135e38e8f21c8eb406324ec315accfdd9e478
5
5
  SHA512:
6
- metadata.gz: c3a5c9fc7067343094ce6684d099fd4a53f65fb0ab79dfcb9a2daf80cb47a3b0d8f25ce573524589b2368acc14ecb34637d4c07d51e574ac0267e6db1984f283
7
- data.tar.gz: b4d63a84a815bef10f170a09e2f0bdff2dd41ebf18e6e406f7e71b953f4f228a31c75460ff2a78d0689551ac1925f732fef2e500aca8e00179b0394b23aa43d7
6
+ metadata.gz: 360bdb1f0c4155f9a332b1e40ff2ec03c4403b95990e8ee1e9e6a170d7d7f33828a5b27375fcf54160867ee7991d998a5f4080a5767b771667d5b41b2f640d19
7
+ data.tar.gz: 5891f8ebfbbfd1920673310f47b19ca257f064ddab71201bee63ba6ed8b64c1385aab75ee4f68443150ecdc2c954ef6f90af2067a5ce614ce1fb90be2137856e
data/exe/prick CHANGED
@@ -190,7 +190,7 @@ SPEC = %(
190
190
  the snapshot. Only one snapshot can be created at a time
191
191
 
192
192
  reset!
193
- Restore database to the last snapshot. TODO
193
+ Restore database to the last snapshot
194
194
 
195
195
  version!
196
196
  Print project version
@@ -54,8 +54,7 @@ module Prick::SubCommand
54
54
  Prick.databases { |database, conn|
55
55
  row = conn.record(%(
56
56
  select
57
- '#{database}' as "database", name, version, branch, rev, clean, environment,
58
- built_at, success
57
+ '#{database}' as "database", name, version, branch, rev, clean, environment, built_at, success
59
58
  from prick.versions
60
59
  ))
61
60
 
@@ -65,8 +64,10 @@ module Prick::SubCommand
65
64
  current_database_row = rows.size
66
65
  end
67
66
 
67
+ # Clean repository
68
+ clean = row.delete(:clean)
69
+
68
70
  if row[:success]
69
- clean = row[:clean]
70
71
  same_revision = row[:branch] == git_branch && row[:rev] == git_rev
71
72
  up2date = fs_time <= row[:built_at]
72
73
 
@@ -90,13 +91,16 @@ module Prick::SubCommand
90
91
  # Convert built_at to string
91
92
  row[:built_at] = row[:built_at]&.strftime("%Y-%m-%d %H:%M")
92
93
 
94
+ # Add dirty flag
95
+ row[:rev] = (clean ? " " : "+") + row[:rev]
96
+
93
97
  # Add current database marker
94
98
  last_column = (is_current_database ? "*" : "")
95
99
 
96
100
  rows << row.values + [last_column]
97
101
  }
98
102
 
99
- headers = %w(database project version branch rev clean environment built success state) + [" "]
103
+ headers = %w(database project version branch rev environment built success state) + [" "]
100
104
  Fmt.puts_table(headers, rows, bold: current_database_row)
101
105
  end
102
106
  end
data/lib/prick/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prick
4
- VERSION = "0.47.0"
4
+ VERSION = "0.47.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.47.0
4
+ version: 0.47.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen