prick 0.39.8 → 0.39.9

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: db7a57d14d65cd631793874989d504c0b9aeeeee1022e4d57fd451ff62663e19
4
+ data.tar.gz: 20c53aa36943b9b2d8dd17c4f4fbc125d6b416392251f98b03cbbbe5e015a5eb
5
5
  SHA512:
6
- metadata.gz: cc493ec4c4f87ac990c545da92be73817669fe71418fd3aa20c1604369a4860d7c03218a727546172b5f6f67761b338f1f1db1c5f1f08d351fda5ebdb88f59fb
7
- data.tar.gz: 767d9ea5b0911f70603b4414fee3d29e259a5489c18a7d8edb6d1699d2915d3a7b096dcae7a0882e8d547e0ad6a3e5c73d560628b109214b71fe010cb792281f
6
+ metadata.gz: 312a5a5e15b995d47b75464ca5284e8b192f978dcf3ab6cc6a282fe482aeff2a76a6ff18be1d6b67b7aa44b4864378f7d02ffe06d184a88ff79cc9f8395dea0e
7
+ data.tar.gz: 8f952347b1992b473904a5865a612f72717b4376c357392cae82b4db60904b30e336ccafc9ee63f6566a258bbe109d5745e5aab5cbbabf52d25d4469cfd56750
@@ -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.9"
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.9
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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic