pgsql 1.1 → 1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/conn.c +4 -3
  3. data/lib/module.c +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWY3ODAyYTYzODU1N2FlMWY0Yjc5ZWI4MjI2YjRkZmMyMzYxZmU0Yw==
4
+ ZWE3YWVlMjYyYWFkNzg5YmMwMTUwMjZlYWE4YmE0NDE5MTQ3OWJlZQ==
5
5
  data.tar.gz: !binary |-
6
- NzY1ODM3ZTQ0Zjc4NzJjYTZiZjNkOGNkYTI1ZTBkYWMzY2M0NjdiOA==
6
+ ZjRhNzNhMmUwMzVkMzM1YjNhMTMwM2U3OTIxODY1MjhhOTI0OWMxZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmI2NzZmODRhMjVkMmM2OGQ0ODg0NDZmZGYzZGI0NzY2YTM0YzU0MzVjNmVm
10
- NmE0NmEzOWM4Njk3NjkxZTVjZmU0YmQzNDQ4NDY1ZjRmYjg5MzIzNTBjYTM0
11
- YWNiMjgyYmMyYjRkMWM5MTEyNTRmYWVkYzQ1Mzg4ZjNkZDdiYjE=
9
+ ZjNlNzJjZjBmYWZkYTc2NzM2YmZlNjY0MzA2MDQ1ZmEzY2Q2NGVlMDBlMGI4
10
+ NjFlYTM0MTk4Yjk1ZjJmN2M1ODRhNGQzOGY3MWJjNGU4ZmE0NmJjYjA4NzZj
11
+ ZjA2NjY3NmE2ZjcwYmEyNWU5MDQ0MTJiZmMyMTMwMmQzN2UxNmY=
12
12
  data.tar.gz: !binary |-
13
- YTNkM2RiNjc3ZTcyMWIyYmVkNTE0NDRmODIyYzc4ZmRiMjQ3NTc0MmIxNzYw
14
- ZGVjMmNiMWMxNDA5MmMxMjkxNTcyNzQyNTljNGUyZTRkYjIzMDVlZTFkYjQy
15
- NDEyZTQ5MzA5NDU0NmE2YWRiODYyMTgwMDJmMDM3MDRkN2U1NDA=
13
+ NDI2NGYzYzczNzFkODcxMDM2YzAyZWU2NzFjNjBhYjk2MWNmOWVlOTAxNjJk
14
+ ODIyZDUwOGYwYzUzOTY5YWZlOGI1YzQzZWQzMmY5NjgyOWFkZTYwYzFjOGRm
15
+ NjVlMzA2YzAxZjMwMWI0MmFmMWYyMjYwNTA3ZTYwMzJhOGI4NTY=
data/lib/conn.c CHANGED
@@ -345,14 +345,15 @@ static const char re_connstr[] =
345
345
  void
346
346
  connstr_to_hash( VALUE params, VALUE str)
347
347
  {
348
- VALUE re, match, m;
348
+ VALUE re, match, k, m;
349
349
 
350
350
  re = rb_reg_new( re_connstr, sizeof re_connstr - 1, 0);
351
351
  if (RTEST( rb_reg_match( re, str))) {
352
352
  match = rb_backref_get();
353
353
  #define ADD_TO_RES( key, n) \
354
- m = rb_reg_nth_match( n, match); \
355
- if (!NIL_P( m)) rb_hash_aset( params, ID2SYM( rb_intern( key)), m)
354
+ k = ID2SYM( rb_intern( key)); m = rb_reg_nth_match( n, match); \
355
+ if (NIL_P( rb_hash_aref( params, k)) && !NIL_P(m)) \
356
+ rb_hash_aset( params, k, m)
356
357
  ADD_TO_RES( KEY_USER, 1);
357
358
  ADD_TO_RES( KEY_PASSWORD, 2);
358
359
  ADD_TO_RES( KEY_HOST, 3);
data/lib/module.c CHANGED
@@ -7,7 +7,7 @@
7
7
  #include "conn.h"
8
8
 
9
9
 
10
- #define PGSQL_VERSION "1.1"
10
+ #define PGSQL_VERSION "1.2"
11
11
 
12
12
 
13
13
  VALUE rb_mPg;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgsql
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-05 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autorake