prick 0.25.0 → 0.25.2

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: 44a5c61834f4d74cadac1d13ceecd0de91a01ebe3b10f456cb1c79b8f4e26503
4
- data.tar.gz: d6841d97964a6c1e7bf8d91d70463893d9d1c7a763ee7e1b3d8ddcfc02db272b
3
+ metadata.gz: 3dc4e433b296e10221975eb85be4abea219720e0612c0f9720369fd69e18daa1
4
+ data.tar.gz: 68215c2e6557dd7288bd3754a65780d4b6c3794ed10c7aecc714b856f5d94fc8
5
5
  SHA512:
6
- metadata.gz: 4a9264bd04ef820b04c838d50520d92f294bc5171e80292345297f0278d11a51d71f65e3138e52de4e559e9dfe9fb843ae29dc4bf8265205514f1459476d28d4
7
- data.tar.gz: 0f518d3c71e7acdbe905351d8a91da488bcfe07010cce4d2bd39144e1fd51d517176564ccfe5d9ac5992b35eb76b60fca2df4849503ea6fc4a3764904dd697a1
6
+ metadata.gz: fd193deed4c0d020c6396ebb3862aaa8a65c6edbd1c28e822548db28412a60fb7e85ef357d1a72f883adc6375463415d926129988c8938cab767ce2ebf99a29b
7
+ data.tar.gz: 22c84f80ecc0eaec3d73e1c87586e705074d3793cafef5e954aaf9538c9fad04b012f50527a63bc611272c324f91e122e4366ac9d7315e91cd43a9ecabc33f2e
data/lib/builder/node.rb CHANGED
@@ -61,7 +61,7 @@ module Prick
61
61
  def read_source
62
62
  file = File.read(path)
63
63
  @source_lines = 1 + 1 + file.count("\n")
64
- ["set search_path to #{schema};\n", file]
64
+ ["set search_path to #{schema}, pg_temp;\n", file]
65
65
  end
66
66
  end
67
67
 
@@ -152,7 +152,7 @@ module Prick
152
152
  raise Prick::Error, "Failed executing #{path} called from #{parent.path}"
153
153
  end
154
154
  @source_lines = 1 + 1 + sql.count("\n")
155
- ["set search_path to #{schema};\n", sql]
155
+ ["set search_path to #{schema}, pg_temp;\n", sql]
156
156
  end
157
157
  end
158
158
 
@@ -47,12 +47,18 @@ module Prick
47
47
 
48
48
  def add(*nodes)
49
49
  nodes = Array(nodes).flatten
50
+ term_nodes = [] # Ugly hack to do recursive init/term but preserve order within a term block
50
51
  @nodes.concat(nodes)
51
52
  @all_nodes.concat(nodes)
52
53
  nodes.each { |node|
53
54
  @schemas[node.schema] += 1
54
- @kind_nodes[node.phase]&.append(node)
55
+ if node.phase == :term
56
+ term_nodes << node
57
+ else
58
+ @kind_nodes[node.phase]&.append(node)
59
+ end
55
60
  }
61
+ term_nodes.reverse.each { |node| @kind_nodes[:term]&.append node }
56
62
  self
57
63
  end
58
64
 
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.25.0"
4
+ VERSION = "0.25.2"
5
5
  end
@@ -17,7 +17,7 @@ module Prick::SubCommand
17
17
  time "Load build object" do
18
18
  if super_conn.rdbms.exist? database
19
19
  conn = PgConn.new(database, username)
20
- if conn.schema.exist_table? "prick", "versions"
20
+ if conn.schema.exist_table? "prick", "versions" && !conn.empty?("prick.versions")
21
21
  built_at = conn.value("select built_at from prick.versions")
22
22
  end
23
23
  else
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.25.0
4
+ version: 0.25.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic