prick 0.20.25 → 0.20.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/prick +1 -0
- data/lib/builder/node.rb +9 -4
- data/lib/builder/parser.rb +6 -4
- data/lib/prick/version.rb +1 -1
- data/prick.gemspec +1 -0
- 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: 722515198da4c147ce92b509e47ab06a18f6dcb0e55dffee916047d48086dde9
|
4
|
+
data.tar.gz: 3fa9993f901a7f17af137d5bdf45663cb632b5563b6e5fee3bedd2c903105aad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff2373784785d306415949290f208e2b5747152c965252ac05ed4f8c00c5a899c463ac56ef4fae0eea8a9b22e2ac3d261380611adef3b43854451986ee28cf3
|
7
|
+
data.tar.gz: 0baf00ac8c4ff4ce4c2ea741589576cb2cda5dcba130bf5b425f0a73861383dda1facb5214559a2141aab16fb5177750587d5ab9def80fd9f3e904d8f7f5b2b6
|
data/exe/prick
CHANGED
data/lib/builder/node.rb
CHANGED
@@ -131,15 +131,20 @@ module Prick
|
|
131
131
|
@pipe = Command::Pipe.new(to_s, stderr: nil)
|
132
132
|
end
|
133
133
|
|
134
|
-
def inspect() "#{path}
|
134
|
+
def inspect() "#{path} #{(args || []).join(" ")}" end
|
135
135
|
|
136
136
|
protected
|
137
137
|
def read_source
|
138
|
-
|
139
|
-
|
138
|
+
begin
|
139
|
+
pipe.puts [conn.name, conn.user]
|
140
|
+
sql = pipe.wait
|
141
|
+
rescue Errno::EPIPE
|
142
|
+
raise Prick::Error, "Pipe fail in #{path} called from #{parent.path}\n" +
|
143
|
+
"Tip: Read username/database from standard input"
|
144
|
+
end
|
140
145
|
if pipe.status != 0
|
141
146
|
$stderr.puts pipe.error
|
142
|
-
raise Prick::Error, "Failed executing #{
|
147
|
+
raise Prick::Error, "Failed executing #{path} called from #{parent.path}"
|
143
148
|
end
|
144
149
|
@source_lines = 1 + 1 + sql.count("\n")
|
145
150
|
["set search_path to #{schema};\n", sql]
|
data/lib/builder/parser.rb
CHANGED
@@ -82,7 +82,7 @@ module Prick
|
|
82
82
|
name.sub!(/\/$/, "")
|
83
83
|
if name =~ /^(\S+)\s+(.*)$/ # exe
|
84
84
|
file = $1
|
85
|
-
args = $2
|
85
|
+
args = $2.split
|
86
86
|
else
|
87
87
|
file = name
|
88
88
|
end
|
@@ -111,8 +111,6 @@ module Prick
|
|
111
111
|
path, name, file, args = parse_file_entry(dir, entry)
|
112
112
|
if File.directory? path
|
113
113
|
parse_directory(unit, path)
|
114
|
-
elsif File.executable? path
|
115
|
-
ExeNode.new(unit, phase, path, args)
|
116
114
|
elsif File.file? path
|
117
115
|
case path
|
118
116
|
when /\.sql$/
|
@@ -120,7 +118,11 @@ module Prick
|
|
120
118
|
when /\.fox$/
|
121
119
|
FoxNode.new(unit, :seed, path)
|
122
120
|
else
|
123
|
-
|
121
|
+
if File.executable? path
|
122
|
+
ExeNode.new(unit, phase, path, args)
|
123
|
+
else
|
124
|
+
raise Error, "Unrecognized file type #{File.basename(path)} in #{dir}"
|
125
|
+
end
|
124
126
|
end
|
125
127
|
else
|
126
128
|
raise Error, "Can't find #{name} in #{dir} from #{unit}"
|
data/lib/prick/version.rb
CHANGED
data/prick.gemspec
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.20.
|
4
|
+
version: 0.20.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|