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 +4 -4
- data/exe/prick +5 -0
- data/lib/prick/builder/batch.rb +4 -0
- data/lib/prick/builder/builder.rb +5 -2
- data/lib/prick/builder/node.rb +1 -1
- data/lib/prick/local/timer.rb +1 -1
- data/lib/prick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d21f671634521afdb6a2f711b98042f5561496f45fcbfc75446a622cc4f0209c
|
4
|
+
data.tar.gz: cd77bebc7e51297f7a768ae7b3d15267ea0591a8a9338ca73ba9d4e04589f6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?
|
data/lib/prick/builder/batch.rb
CHANGED
@@ -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
|
data/lib/prick/builder/node.rb
CHANGED
@@ -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]
|
data/lib/prick/local/timer.rb
CHANGED
data/lib/prick/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|