prick 0.40.0 → 0.40.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prick/builder/node.rb +1 -24
- data/lib/prick/builder/parser.rb +0 -3
- data/lib/prick/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d80ed9e4a9e952293015fa4bbdf82e6032433c9c588a403b1da37d80dffd04a3
|
4
|
+
data.tar.gz: 7395791928b6a93006f7dcca640340dcc5311e696d3d29fec7935d1eab5bf08b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6871aa71a977fc72ec39b55369217de688eb0d6db93617435fb467c3b696729e7a9b58f4f9645a2850ff71f6d0be25cd9d9322b07c8022b5b66c715b37509b78
|
7
|
+
data.tar.gz: 88be83c01859557aae5a9b47d0ed49e7b69e3a819f49b80d316ffdfab8c428dff152c2267a7a25a8e46a9a4e1b624c3f374355b8be2bcd5e2af2a374d02abf73
|
data/lib/prick/builder/node.rb
CHANGED
@@ -169,7 +169,7 @@ module Prick
|
|
169
169
|
|
170
170
|
def execute_system
|
171
171
|
begin
|
172
|
-
|
172
|
+
Command.command(Prick.state.bash_environment, command)
|
173
173
|
rescue Command::Error => ex
|
174
174
|
message = "Error executing '#{command}'\n" + ex.stderr.map { |l| " #{l}" }.join("\n")
|
175
175
|
Prick.error message
|
@@ -216,29 +216,6 @@ module Prick
|
|
216
216
|
alias_method :execute, :execute_system
|
217
217
|
end
|
218
218
|
|
219
|
-
class RequireNode < ExecutableNode
|
220
|
-
def read_source
|
221
|
-
sql = execute_command
|
222
|
-
@source_lines = 1 + 1 + sql.count("\n")
|
223
|
-
["set search_path to #{schema}, pg_temp", sql.join("\n")]
|
224
|
-
end
|
225
|
-
|
226
|
-
def execute_command
|
227
|
-
execute {
|
228
|
-
Command.inline(Prick.state.bash_environment, path, argv: args)
|
229
|
-
}
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
class CommandNode < ExecutableNode
|
234
|
-
protected
|
235
|
-
def execute_command
|
236
|
-
execute {
|
237
|
-
Command.command(Prick.state.bash_environment, command)
|
238
|
-
}
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
219
|
# EvalNode executes the command and feeds the output into the database
|
243
220
|
class SysEvalNode < SystemCommandNode
|
244
221
|
alias_method :read_source, :read_cmd
|
data/lib/prick/builder/parser.rb
CHANGED
@@ -130,9 +130,6 @@ module Prick
|
|
130
130
|
command = args.shift
|
131
131
|
klass && command or raise "Illegal number of arguments: #{value}"
|
132
132
|
ModuleNode.new(unit, phase, path, klass, command, args)
|
133
|
-
when "require"
|
134
|
-
(path, args = parse_file_entry(unit, dir, value)) or return nil
|
135
|
-
RequireNode.new(unit, phase, path, args)
|
136
133
|
when "eval"
|
137
134
|
(path, args = parse_file_entry(unit, dir, value)) or return nil
|
138
135
|
EvalNode.new(unit, phase, path, args)
|
data/lib/prick/version.rb
CHANGED