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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67841f173240bc31ab6ba1f4c4c9febec06e4e4dea9520515755fa004ab5b686
4
- data.tar.gz: cfb1dc519da6e62cd739c450bc09cf16c9f46ac7e748ec07a0f282dc939d3c6d
3
+ metadata.gz: 722515198da4c147ce92b509e47ab06a18f6dcb0e55dffee916047d48086dde9
4
+ data.tar.gz: 3fa9993f901a7f17af137d5bdf45663cb632b5563b6e5fee3bedd2c903105aad
5
5
  SHA512:
6
- metadata.gz: 9db538b5a1f996d0957692ce81bed5e9c0436d598c68b57124795ea0d4760f27fe3b629b8c65a085f9b947730ff3c9dfac5568823827018c20c104ca29682978
7
- data.tar.gz: 07210b0c1898fe19c00290d5916df9fd884b9fc2c5b0ad89d33c634be64f1b05045c19f172082fb2dc7b9d4c8ff58b059318411ff52a7b0ed91881ebe1d44060
6
+ metadata.gz: 5ff2373784785d306415949290f208e2b5747152c965252ac05ed4f8c00c5a899c463ac56ef4fae0eea8a9b22e2ac3d261380611adef3b43854451986ee28cf3
7
+ data.tar.gz: 0baf00ac8c4ff4ce4c2ea741589576cb2cda5dcba130bf5b425f0a73861383dda1facb5214559a2141aab16fb5177750587d5ab9def80fd9f3e904d8f7f5b2b6
data/exe/prick CHANGED
@@ -242,6 +242,7 @@ rescue ShellOpts::Error, Prick::Error => ex
242
242
  ShellOpts.error(ex.message)
243
243
  end
244
244
 
245
+
245
246
  __END__
246
247
 
247
248
  -n,name=NAME
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}(#{(args || []).join(", ")})" end
134
+ def inspect() "#{path} #{(args || []).join(" ")}" end
135
135
 
136
136
  protected
137
137
  def read_source
138
- pipe.puts [conn.name, conn.user]
139
- sql = pipe.wait
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 #{pipe.cmd}"
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]
@@ -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
- raise Error, "Unrecognized file type #{File.basename(path)} in #{dir}"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prick
4
- VERSION = "0.20.25"
4
+ VERSION = "0.20.28"
5
5
  end
data/prick.gemspec CHANGED
@@ -48,3 +48,4 @@ end
48
48
 
49
49
 
50
50
 
51
+
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.25
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 00:00:00.000000000 Z
11
+ date: 2022-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic