prick 0.46.1 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/prick +5 -2
- data/lib/prick/builder/builder.rb +1 -1
- data/lib/prick/builder/parser.rb +13 -6
- data/lib/prick/state.rb +1 -1
- data/lib/prick/subcommand/prick-build.rb +5 -2
- data/lib/prick/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0b2c89a6c361464beb0f61da45df83e0d0f1ccc2d00beade78b2f25da3adc13
|
4
|
+
data.tar.gz: 0701613c1743c4e95cf7a801b770340f6e8bceffdfccab71125c05bda3baf4f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3a5c9fc7067343094ce6684d099fd4a53f65fb0ab79dfcb9a2daf80cb47a3b0d8f25ce573524589b2368acc14ecb34637d4c07d51e574ac0267e6db1984f283
|
7
|
+
data.tar.gz: b4d63a84a815bef10f170a09e2f0bdff2dd41ebf18e6e406f7e71b953f4f228a31c75460ff2a78d0689551ac1925f732fef2e500aca8e00179b0394b23aa43d7
|
data/exe/prick
CHANGED
@@ -140,10 +140,12 @@ SPEC = %(
|
|
140
140
|
useful to run 'prick snapshot' immediately after you complete building
|
141
141
|
the database
|
142
142
|
|
143
|
-
build! --step -f,force -t,time --dump=KIND? -- [SCHEMA]
|
143
|
+
build! --step -f,force -t,time --dump=KIND? --path=BUILD_FILE -- [SCHEMA]
|
144
144
|
Build the project. If SCHEMA is defined, later schemas are excluded. KIND
|
145
145
|
can be 'nodes', 'allnodes' or 'batches' (the default). Schemas marked
|
146
|
-
with 'no refresh' is not built unless the --force is present
|
146
|
+
with 'no refresh' is not built unless the --force is present. The --file
|
147
|
+
option sets the initial build file or directory, default is
|
148
|
+
SCHEMA_DIR/build.yml
|
147
149
|
|
148
150
|
make! --step -t,time --dump=KIND? -- [SCHEMA]
|
149
151
|
@ Only rebuild changed files
|
@@ -441,6 +443,7 @@ begin
|
|
441
443
|
# exclude = cmd.exclude? ? cmd.exclude.split(",") : []
|
442
444
|
Prick::SubCommand.build(
|
443
445
|
database, username, args.expect(0..1),
|
446
|
+
path: cmd.path,
|
444
447
|
force: cmd.force?, step: cmd.step?, timer: cmd.time?, dump: dump)
|
445
448
|
|
446
449
|
when :make!
|
@@ -62,7 +62,7 @@ module Prick
|
|
62
62
|
|
63
63
|
def initialize(conn, path, clean = true, single: false, touched: false, load_pool: true, step: false)
|
64
64
|
File.exist?(path) or raise Error, "Can't find #{path}"
|
65
|
-
single || File.
|
65
|
+
! single || File.file?(path) or raise Error, "Not a file - #{path}"
|
66
66
|
|
67
67
|
@conn = conn
|
68
68
|
@path = path
|
data/lib/prick/builder/parser.rb
CHANGED
@@ -17,9 +17,9 @@ module Prick
|
|
17
17
|
def parse(path, single: false)
|
18
18
|
File.exist?(path) or raise Error, "Can't find #{path}"
|
19
19
|
if single
|
20
|
-
|
20
|
+
parse_single(path)
|
21
21
|
else
|
22
|
-
|
22
|
+
parse_path(nil, path)
|
23
23
|
end
|
24
24
|
self
|
25
25
|
end
|
@@ -34,7 +34,7 @@ module Prick
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def parse_single(path, schema: nil)
|
38
38
|
File.exist?(path) or raise Error, "Can't find #{file}"
|
39
39
|
dir = File.dirname(path)
|
40
40
|
file = File.basename(path)
|
@@ -44,8 +44,15 @@ module Prick
|
|
44
44
|
unit
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
48
|
-
|
47
|
+
def parse_path(parent, path)
|
48
|
+
if File.directory?(path)
|
49
|
+
dir = path
|
50
|
+
build_file = "#{path}/build.yml".sub(/\/\//, "/")
|
51
|
+
elsif File.file?(path)
|
52
|
+
dir = File.dirname(path)
|
53
|
+
build_file = path
|
54
|
+
end
|
55
|
+
|
49
56
|
if File.exist? build_file
|
50
57
|
parse_build_file(parent, dir, build_file)
|
51
58
|
else
|
@@ -161,7 +168,7 @@ module Prick
|
|
161
168
|
else
|
162
169
|
(path, args = parse_file_entry(unit, dir, entry)) or return nil
|
163
170
|
if File.directory? path
|
164
|
-
|
171
|
+
parse_path(unit, path)
|
165
172
|
elsif File.executable?(path)
|
166
173
|
SysExecNode.new(unit, phase, path, args)
|
167
174
|
elsif File.file? path
|
data/lib/prick/state.rb
CHANGED
@@ -191,7 +191,7 @@ module Prick
|
|
191
191
|
"PRICK_SPOOLDIR" => File.join(Prick.state.prick_dir, SPOOL_DIR),
|
192
192
|
"PRICK_TMPDIR" => File.join(Prick.state.prick_dir, TMP_DIR),
|
193
193
|
"PRICK_CLONEDIR" => File.join(Prick.state.prick_dir, CLONE_DIR),
|
194
|
-
"PRICK_SPECDIR" => File.join(Prick.state.prick_dir,
|
194
|
+
"PRICK_SPECDIR" => File.join(Prick.state.prick_dir, SPEC_DIR),
|
195
195
|
})
|
196
196
|
end
|
197
197
|
|
@@ -5,10 +5,13 @@ require_relative '../builder/builder.rb'
|
|
5
5
|
module Prick::SubCommand
|
6
6
|
def self.build(
|
7
7
|
database, username, schema,
|
8
|
-
|
8
|
+
path: nil, # Default SCHEMA_DIR
|
9
9
|
force: false, # Build all schemas
|
10
10
|
step: false, timer: nil, dump: nil)
|
11
11
|
|
12
|
+
path ||= Prick.state.schema_dir
|
13
|
+
File.exist?(path) or Prick.error "Can't find #{path}"
|
14
|
+
|
12
15
|
Timer.on! if timer
|
13
16
|
|
14
17
|
Timer.time "Prick::Command#build" do
|
@@ -30,7 +33,7 @@ module Prick::SubCommand
|
|
30
33
|
end
|
31
34
|
conn = Prick.state.connection
|
32
35
|
|
33
|
-
builder = Prick::Build::Builder.new(conn,
|
36
|
+
builder = Prick::Build::Builder.new(conn, path, step: step)
|
34
37
|
|
35
38
|
if exist # Empty (part of) the database
|
36
39
|
if force
|
data/lib/prick/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.47.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: semantic
|
@@ -258,7 +257,6 @@ files:
|
|
258
257
|
homepage: http://www.nowhere.com/
|
259
258
|
licenses: []
|
260
259
|
metadata: {}
|
261
|
-
post_install_message:
|
262
260
|
rdoc_options: []
|
263
261
|
require_paths:
|
264
262
|
- lib
|
@@ -273,8 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
271
|
- !ruby/object:Gem::Version
|
274
272
|
version: '0'
|
275
273
|
requirements: []
|
276
|
-
rubygems_version: 3.
|
277
|
-
signing_key:
|
274
|
+
rubygems_version: 3.6.9
|
278
275
|
specification_version: 4
|
279
276
|
summary: A release control and management system for postgresql
|
280
277
|
test_files: []
|