pgtk 0.5.1 → 0.6.0

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: 245dbd21cb7796048e37a1d806c90f0b4d2425329c42f928e33b0ed38cf66d58
4
- data.tar.gz: 50323ae62ebce8af600b11abef5ccf604b89a7195cfdce1eabfcebf00818b6db
3
+ metadata.gz: 7293e42c36671150eaed8552af95773be01e5cd4e4b14b8676ea344ef2605b7b
4
+ data.tar.gz: 64b75a87d6a4da5f1d08838b6cf78b33d04b803c045d94bb1e8417b604159a90
5
5
  SHA512:
6
- metadata.gz: 4872bbb574b040af4b2d34036df9f662a142f166ab0fce75841e087fc3bcd1efd84a6690640b43d9bcc99bff08d5a02db185b15b1e851704cd568fd2dacbad9d
7
- data.tar.gz: f2e65dbbc22983f2028cf677a2068f8a3c28a8509413ba5c8b7b19aebc326a5462cb457cd5fc826d4f29d9ef29ecd69bc7a97ecf6e90ea040dd1ca98fb9e7307
6
+ metadata.gz: 6a0f3303e20d5db61f551c92f9bab742ba7054a6dc1eb8b0d6f509ab7107fdbd34e25328e08e49d099e361bede1772524b31bc46bb4c228104929b6646a9bf2f
7
+ data.tar.gz: a38b061fea757147e8b482702ef22953c00a71697f1d24a9b43166be22052fec451440d504fef45798056dae2c71ec70d9fcd661fc9b9a5e5b3b0dc5adcce0fc
data/lib/pgtk/pool.rb CHANGED
@@ -57,6 +57,11 @@ class Pgtk::Pool
57
57
  @log = Log.new(log)
58
58
  end
59
59
 
60
+ # Get the version of PostgreSQL server.
61
+ def version
62
+ @version ||= exec('SHOW server_version')[0]['server_version']
63
+ end
64
+
60
65
  # Start it with a fixed number of connections. The amount of connections
61
66
  # is specified in +max+ argument and should be big enough to handle
62
67
  # the amount of parallel connections you may have to the database. However,
data/lib/pgtk/version.rb CHANGED
@@ -28,5 +28,5 @@ require_relative '../pgtk'
28
28
  # License:: MIT
29
29
  module Pgtk
30
30
  # Current version of the library.
31
- VERSION = '0.5.1'
31
+ VERSION = '0.6.0'
32
32
  end
data/test/test_pool.rb CHANGED
@@ -33,6 +33,13 @@ require_relative '../lib/pgtk/pool'
33
33
  # Copyright:: Copyright (c) 2017-2018 Yegor Bugayenko
34
34
  # License:: MIT
35
35
  class TestPool < Minitest::Test
36
+ def test_reads_version
37
+ bootstrap do |pool|
38
+ ver = pool.version
39
+ assert(ver.start_with?('1'))
40
+ end
41
+ end
42
+
36
43
  def test_basic
37
44
  bootstrap do |pool|
38
45
  id = pool.exec(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgtk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace