prick 0.39.8 → 0.39.10

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: d0d60cf8855c1cd7dcc4b0183a4dffbd308157cd7e15601ed5976a336ce8ceff
4
- data.tar.gz: 62e2c45a335d45430f27c33a2a078ea45555dc41b722635ee33ce3a598b409d3
3
+ metadata.gz: d21f671634521afdb6a2f711b98042f5561496f45fcbfc75446a622cc4f0209c
4
+ data.tar.gz: cd77bebc7e51297f7a768ae7b3d15267ea0591a8a9338ca73ba9d4e04589f6e3
5
5
  SHA512:
6
- metadata.gz: cc493ec4c4f87ac990c545da92be73817669fe71418fd3aa20c1604369a4860d7c03218a727546172b5f6f67761b338f1f1db1c5f1f08d351fda5ebdb88f59fb
7
- data.tar.gz: 767d9ea5b0911f70603b4414fee3d29e259a5489c18a7d8edb6d1699d2915d3a7b096dcae7a0882e8d547e0ad6a3e5c73d560628b109214b71fe010cb792281f
6
+ metadata.gz: 8b48ab4c8a4dc42df39d46a827279b6e413f04d1a1989c9aee4858e30e26a05dff7630cb22fe37f464c5e3ca3cbb3634061ed2e8cdc161b514defcdf7f9372e1
7
+ data.tar.gz: 98e31722b962566506a7157acf72b9eeb523b68f9427f98e8b633e7e056fbe38e4c57886fa88341cde5e80285cd86e3fb5bf24eb3153d95ed74b6c0d097df371
data/exe/prick CHANGED
@@ -524,6 +524,11 @@ begin
524
524
  Prick.failure "Internal error: Unhandled command - #{opts.subcommand.inspect}"
525
525
  end
526
526
 
527
+ rescue FixtureFox::ParseError => ex
528
+ $stderr.puts "Parse Error in #{ex.error_message}"
529
+ exit 1
530
+
531
+
527
532
  rescue Prick::Build::PostgresError => ex
528
533
  $stderr.puts "Error: #{ex.message}"
529
534
  if STDERR.tty?
@@ -16,9 +16,13 @@ module Prick
16
16
 
17
17
  def execute(**opts, &block)
18
18
  name = self.class.to_s.sub(/.*::/, "").split(/(?=[A-Z])/).map(&:downcase).join(" ")
19
+ node_paths = nodes.map(&:relpath)
19
20
  time "Execute #{name} (nodes: #{nodes.size})" do
20
21
  yield(**opts)
21
22
  end
23
+ if Timer.on?
24
+ ::Timer.file.indent { |f| f.puts node_paths }
25
+ end
22
26
  end
23
27
 
24
28
  def dump
@@ -88,6 +88,7 @@ module Prick
88
88
  batch = nil
89
89
 
90
90
  for node in [init_nodes, decl_nodes, fox_seed_nodes, sql_seed_nodes, term_nodes.reverse].flatten
91
+ # Create new batch if required. Order of when-clauses is important
91
92
  case node.kind
92
93
  when :module
93
94
  if batch&.kind != :module
@@ -103,7 +104,7 @@ module Prick
103
104
  batch = SqlBatch.new(self)
104
105
  end
105
106
  when :sql || node.kind == :inline
106
- if batch&.kind != :exe
107
+ if batch&.kind != :exe || step
107
108
  @batches << batch if batch
108
109
  batch = SqlBatch.new(self)
109
110
  end
@@ -113,11 +114,13 @@ module Prick
113
114
  when :fox
114
115
  @batches << batch if batch
115
116
  batch = FoxBatch.new(self)
116
- when :yml
117
+ when :yml # build.yml files
117
118
  next
118
119
  else
119
120
  raise Error, "Unexpected node kind: #{node.kind}"
120
121
  end
122
+
123
+ # Add node to current batch
121
124
  batch.nodes << node
122
125
  end
123
126
  @batches << batch if batch
@@ -9,6 +9,7 @@ module Prick
9
9
  attr_reader :args # only defined for :exe (String)
10
10
 
11
11
  def name() @name = File.basename(path) end
12
+ def relpath = path.sub(/^#{Dir.getwd}\//, "")
12
13
 
13
14
  # Note that schema defaults to 'public' which may not be what you want in
14
15
  # some cases
@@ -126,7 +127,6 @@ module Prick
126
127
  alias_method :command, :to_s
127
128
 
128
129
  def filename = File.basename(path)
129
- def relpath = path.sub(/^#{Dir.getwd}\//, "")
130
130
 
131
131
  def initialize(parent, phase, path, args = nil)
132
132
  constrain args, [String]
@@ -43,7 +43,7 @@ module Timer
43
43
  def file() ::Timer.file end
44
44
 
45
45
  def self.on!() ::Timer.on! end
46
- def self.on?() ::Time.on? end
46
+ def self.on?() ::Timer.on? end
47
47
 
48
48
  def unit() ::Timer.unit end
49
49
  def unit=(unit) ::Timer.unit = unit 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.39.8"
4
+ VERSION = "0.39.10"
5
5
  end
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.8
4
+ version: 0.39.10
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-08-08 00:00:00.000000000 Z
11
+ date: 2024-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic