prick 0.47.0 → 0.47.1

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: 6132b3743cc00dba96e3f612a7f4aba150d50b6fc49dde9cc4fba02077c7bdfe
4
+ data.tar.gz: 13fb9740a59f487f30169931fd8b6efcfc4332964979042f0aff8af5f3df1e0a
5
5
  SHA512:
6
- metadata.gz: c3a5c9fc7067343094ce6684d099fd4a53f65fb0ab79dfcb9a2daf80cb47a3b0d8f25ce573524589b2368acc14ecb34637d4c07d51e574ac0267e6db1984f283
7
- data.tar.gz: b4d63a84a815bef10f170a09e2f0bdff2dd41ebf18e6e406f7e71b953f4f228a31c75460ff2a78d0689551ac1925f732fef2e500aca8e00179b0394b23aa43d7
6
+ metadata.gz: 7c47703c827137d10397f1993bc81f09a9c5e19eedae5708fd0728819a20b9403cceca3c9da0aff5c43a0386c70c9b2b52bc21adcc2d94ca613a12a336f4cb2c
7
+ data.tar.gz: 416f78b89764f1f0d63cb707b198991fbd5382feadec65691e35263f5736b975f3d921145e31cae7b62ec0d97d2be4b143fc9cdbfecc6407292ad3a945547f42
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
 
@@ -66,7 +65,7 @@ module Prick::SubCommand
66
65
  end
67
66
 
68
67
  if row[:success]
69
- clean = row[:clean]
68
+ clean = row.delete(:clean)
70
69
  same_revision = row[:branch] == git_branch && row[:rev] == git_rev
71
70
  up2date = fs_time <= row[:built_at]
72
71
 
@@ -90,13 +89,16 @@ module Prick::SubCommand
90
89
  # Convert built_at to string
91
90
  row[:built_at] = row[:built_at]&.strftime("%Y-%m-%d %H:%M")
92
91
 
92
+ # Add dirty flag
93
+ row[:rev] = (clean ? " " : "*") + row[:rev]
94
+
93
95
  # Add current database marker
94
96
  last_column = (is_current_database ? "*" : "")
95
97
 
96
98
  rows << row.values + [last_column]
97
99
  }
98
100
 
99
- headers = %w(database project version branch rev clean environment built success state) + [" "]
101
+ headers = %w(database project version branch rev environment built success state) + [" "]
100
102
  Fmt.puts_table(headers, rows, bold: current_database_row)
101
103
  end
102
104
  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.1"
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen