prick 0.40.2 → 0.40.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/prick/version.rb +1 -1
  3. data/lib/prick.rb +3 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d80ed9e4a9e952293015fa4bbdf82e6032433c9c588a403b1da37d80dffd04a3
4
- data.tar.gz: 7395791928b6a93006f7dcca640340dcc5311e696d3d29fec7935d1eab5bf08b
3
+ metadata.gz: b66e68bf5c00a531bddd762ce76357bc5e4c0c3aa7e8622cee61451d6d338b42
4
+ data.tar.gz: 3d61860d6c2d84961fd390fcac1753a89b3ce3b68aa701c699df969150a3b4a8
5
5
  SHA512:
6
- metadata.gz: 6871aa71a977fc72ec39b55369217de688eb0d6db93617435fb467c3b696729e7a9b58f4f9645a2850ff71f6d0be25cd9d9322b07c8022b5b66c715b37509b78
7
- data.tar.gz: 88be83c01859557aae5a9b47d0ed49e7b69e3a819f49b80d316ffdfab8c428dff152c2267a7a25a8e46a9a4e1b624c3f374355b8be2bcd5e2af2a374d02abf73
6
+ metadata.gz: 5b04b72a101ab8e8f8a6d8bdc3675f02b6f38d3b63daabb38ff4cb664ffe05b598b80175cc9b4c75bed93cfc9a6afd253a0c767e38d08544f45047ad44808a1e
7
+ data.tar.gz: 9fd135fd3df5ec9b15b663ed95604aa93af13b4f76985ab035051c2a4962947f586aaad90e0eff2b78908fd0f68e2601dc0bbfb87b104322e7111a4b5d99bdf6
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.2"
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.2
4
+ version: 0.40.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen