postspec 0.4.0 → 0.5.0

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: c1f09285c5b3371fe89216b9cc46e332ece37aa56f2ba9146d06a1740556b44a
4
- data.tar.gz: b38981f91ed988e67b426043c42f30649d7a40f537474cff34a2bc45bb8e0f82
3
+ metadata.gz: 851d0b52a25e0968254628ce9785b391dd6f0b5cf5546c4b24b09734f789fd54
4
+ data.tar.gz: 5f019586c60733abde0a671d20a866542ce883f8e9f31ccc453326811eeeef21
5
5
  SHA512:
6
- metadata.gz: c108fc4f53d68390f4917400cd616e32d58d8472cb2adc476277f5d34ef45c010974f800619e24ee7495f3e10d0db9b4918daadabc02089b7cbcc9be150b8c17
7
- data.tar.gz: 57115a1312cc64fd60ea808c68496f4c995f680fe8b295cf07ec999bc960ce0823e49b99b6297c329140568058c3d385d6a22cc8389c526caf174ea7f3e10194
6
+ metadata.gz: 4972c39311dac7dbbf04251ff9a74748575aa1b3c5ac8b60bd5191fa0bb94bdadf9df3bf7cee7cea39defdb708a39c28021a65c17098fdea8ad5ed25212e9aec
7
+ data.tar.gz: b7165889d439611d2427f63cb4b2f36266188f7f0a7f676b045eb43276c7159d06171323548aa67dbd4c5787f345b8e24e6368690c5ce563b7c551de87375cbe
@@ -1,3 +1,3 @@
1
1
  module Postspec
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
data/lib/postspec.rb CHANGED
@@ -184,6 +184,9 @@ module Postspec
184
184
  # Transactionn timestamp with time zone
185
185
  def timestamptz() @conn.timestamptz end
186
186
 
187
+ # Date of timestamp
188
+ def datestamp() timestamp.to_date end
189
+
187
190
  # True if no tests failed. Default true
188
191
  def success?() @success end
189
192
 
@@ -8,6 +8,7 @@ def fox() postspec.fox end
8
8
  def db() postspec.db end
9
9
  def timestamp() postspec.timestamp end
10
10
  def timestamptz() postspec.timestamptz end
11
+ def datestamp() postspec.datestamp end
11
12
  def data() postspec.data end
12
13
  def inserted_records() postspec.inserted end
13
14
  def updated_records() postspec.updated end
@@ -50,7 +50,7 @@ $$ language plpgsql;
50
50
 
51
51
  create or replace function readonly_failure() returns trigger as $$
52
52
  begin
53
- raise 'Postspec: Can''t modify seed data in %', TG_TABLE_NAME::regclass::text;
53
+ raise 'Postspec: Can''t modify seed data in %.%', TG_TABLE_SCHEMA, TG_TABLE_NAME;
54
54
  return null;
55
55
  end;
56
56
  $$ language plpgsql immutable leakproof;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
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-27 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector