prick 0.40.1 → 0.40.3

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: bed31b32457d15c5393b4b3edfdb2f338e069b058fde44f5fb32677161c6ae08
4
- data.tar.gz: 0d5a5310477c17b1ef31ff8124b190ea9625fec2e54637f53c8988af229f29ea
3
+ metadata.gz: b66e68bf5c00a531bddd762ce76357bc5e4c0c3aa7e8622cee61451d6d338b42
4
+ data.tar.gz: 3d61860d6c2d84961fd390fcac1753a89b3ce3b68aa701c699df969150a3b4a8
5
5
  SHA512:
6
- metadata.gz: 5434d7ba61b03b67756e8ec89dbf2eeec58f17cc87d1f14fe8f7787bf6d448ef8cd3c2bb3ac2df9464ba86128b12ed3d824f1286a36b5d3284043779286b84dc
7
- data.tar.gz: 8c99d17d014c9e8de628f043ede068c260188af26975da2a136882d84171a862dddd3defdacf697839b723d75c0ae7ca569f0b26323e4063aac7ed2ea222d598
6
+ metadata.gz: 5b04b72a101ab8e8f8a6d8bdc3675f02b6f38d3b63daabb38ff4cb664ffe05b598b80175cc9b4c75bed93cfc9a6afd253a0c767e38d08544f45047ad44808a1e
7
+ data.tar.gz: 9fd135fd3df5ec9b15b663ed95604aa93af13b4f76985ab035051c2a4962947f586aaad90e0eff2b78908fd0f68e2601dc0bbfb87b104322e7111a4b5d99bdf6
@@ -169,7 +169,7 @@ module Prick
169
169
 
170
170
  def execute_system
171
171
  begin
172
- yield
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
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.40.1"
4
+ VERSION = "0.40.3"
5
5
  end
data/lib/prick.rb CHANGED
@@ -2,11 +2,12 @@
2
2
  require 'pg_conn'
3
3
 
4
4
  module Prick
5
- def self.conn(database, username)
5
+ def self.conn(database, username = nil)
6
6
  if self.respond_to?(:owner_conn)
7
7
  self.owner_conn
8
8
  else
9
- PgConn.new(database, username)
9
+ !database.nil? or raise ArgumentError, "No database given"
10
+ PgConn.new(database, username || database)
10
11
  end
11
12
  end
12
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.1
4
+ version: 0.40.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen