prick 0.40.3 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prick/version.rb +1 -1
- data/lib/prick.rb +14 -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: 285b5f300185bd9b00e975ab4a4bdffc46a5db68606325b77dfa025ba2ce23d7
|
4
|
+
data.tar.gz: 0b569c4d26020f1d29be322ff94a2f80ae2461dc4422a989850415a04166d614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '02196f54ea306130af2dc43337e4cb2408a7ce2872df6e0aa355cfb141a5067e5d0fb71f4e9650882be086c856c28ed1438704343f8177225cea676f6705d072'
|
7
|
+
data.tar.gz: 4f6288490ad69c85e5638c0b22dd973673b27ec204b6366efbdd00bb4228f7d1e2a3c8d741bedb2f07df6b723b57901c2a5e24168d9195490ad04f3ba2527c8c
|
data/lib/prick/version.rb
CHANGED
data/lib/prick.rb
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
|
2
2
|
require 'pg_conn'
|
3
3
|
|
4
|
+
# Find project root dir and set load path to include ./lib
|
5
|
+
dir = Dir.getwd
|
6
|
+
while dir != "/" && !File.exist?("#{dir}/prick.yml")
|
7
|
+
dir = File.dirname(dir)
|
8
|
+
end
|
9
|
+
|
10
|
+
if dir == "/"
|
11
|
+
defined?(RSpec) or raise ArgumentError, "Can't find prick project directory"
|
12
|
+
else
|
13
|
+
$LOAD_PATH.unshift("#{dir}/lib")
|
14
|
+
end
|
15
|
+
|
16
|
+
# Create a new database connection or an existing connection. The connection
|
17
|
+
# exists when the script is run by prick as a subprocess using fork
|
4
18
|
module Prick
|
5
19
|
def self.conn(database, username = nil)
|
6
20
|
if self.respond_to?(:owner_conn)
|
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.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|