prick 0.20.27 → 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: cb6da68d55bd73eae53e53518648219fb43dfb7fd74efc96ac9e8cecb901db76
4
- data.tar.gz: 01d468a6faa5a575c6a36805bd3073f854e197f2846ab11ccb723d6b0fefd661
3
+ metadata.gz: 722515198da4c147ce92b509e47ab06a18f6dcb0e55dffee916047d48086dde9
4
+ data.tar.gz: 3fa9993f901a7f17af137d5bdf45663cb632b5563b6e5fee3bedd2c903105aad
5
5
  SHA512:
6
- metadata.gz: 5bbb991c2733e270ad00913cefeaf7d50dce15b18e5abc4994e45946d9d83aaad1659ecc9d3a2d0b08e4a3119fb10ff1ed1d13ea0dbf4464cfa9ceaa0c0736f6
7
- data.tar.gz: bff7a39be7d12a4e7ff3a6325a2b945a69064025929c96c4c579bfa29877cc2fd22365f5fffc284831c687cf051cc84b524ed2899d7c47c8d97e92186302a48f
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,7 +131,7 @@ 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
@@ -139,11 +139,12 @@ module Prick
139
139
  pipe.puts [conn.name, conn.user]
140
140
  sql = pipe.wait
141
141
  rescue Errno::EPIPE
142
- raise Prick::Error, "Pipe fail on #{pipe.cmd} #{args.join(" ")}"
142
+ raise Prick::Error, "Pipe fail in #{path} called from #{parent.path}\n" +
143
+ "Tip: Read username/database from standard input"
143
144
  end
144
145
  if pipe.status != 0
145
146
  $stderr.puts pipe.error
146
- raise Prick::Error, "Failed executing #{pipe.cmd} #{args.join(" ")}"
147
+ raise Prick::Error, "Failed executing #{path} called from #{parent.path}"
147
148
  end
148
149
  @source_lines = 1 + 1 + sql.count("\n")
149
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.27"
4
+ VERSION = "0.20.28"
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.20.27
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-12 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