pg 0.18.1 → 0.19.0

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.
@@ -102,7 +102,7 @@ describe PG::TypeMapByClass do
102
102
 
103
103
  it "should allow mixed type conversions" do
104
104
  res = @conn.exec_params( "SELECT $1, $2, $3", [5, 1.23, :TestSymbol], 0, tm )
105
- expect( res.values ).to eq([['5', '1.23', '[:TestSymbol]']])
105
+ expect( res.values ).to eq([['5', '1.23', "[:TestSymbol, #{@conn.internal_encoding.inspect}]"]])
106
106
  expect( res.ftype(0) ).to eq(20)
107
107
  end
108
108
 
@@ -116,7 +116,7 @@ describe PG::TypeMapByMriType do
116
116
 
117
117
  it "should allow mixed type conversions" do
118
118
  res = @conn.exec_params( "SELECT $1, $2, $3", [5, 1.23, :TestSymbol], 0, tm )
119
- expect( res.values ).to eq([['5', '1.23', '[:TestSymbol]']])
119
+ expect( res.values ).to eq([['5', '1.23', "[:TestSymbol, #{@conn.internal_encoding.inspect}]"]])
120
120
  expect( res.ftype(0) ).to eq(20)
121
121
  end
122
122
 
data/spec/pg/type_spec.rb CHANGED
@@ -15,6 +15,8 @@ describe "PG::Type derivations" do
15
15
  let!(:textdec_string) { PG::TextDecoder::String.new }
16
16
  let!(:textenc_timestamp) { PG::TextEncoder::TimestampWithoutTimeZone.new }
17
17
  let!(:textdec_timestamp) { PG::TextDecoder::TimestampWithoutTimeZone.new }
18
+ let!(:textenc_timestamptz) { PG::TextEncoder::TimestampWithTimeZone.new }
19
+ let!(:textdec_timestamptz) { PG::TextDecoder::TimestampWithTimeZone.new }
18
20
  let!(:textenc_bytea) { PG::TextEncoder::Bytea.new }
19
21
  let!(:textdec_bytea) { PG::TextDecoder::Bytea.new }
20
22
  let!(:binaryenc_int2) { PG::BinaryEncoder::Int2.new }
@@ -37,6 +39,14 @@ describe "PG::Type derivations" do
37
39
  end.new
38
40
  end
39
41
 
42
+ let!(:intenc_incrementer_with_encoding) do
43
+ Class.new(PG::SimpleEncoder) do
44
+ def encode(value, encoding)
45
+ r = (value.to_i + 1).to_s + " #{encoding}"
46
+ r.encode!(encoding)
47
+ end
48
+ end.new
49
+ end
40
50
  let!(:intenc_incrementer_with_int_result) do
41
51
  Class.new(PG::SimpleEncoder) do
42
52
  def encode(value)
@@ -85,6 +95,55 @@ describe "PG::Type derivations" do
85
95
  expect( textdec_bytea.decode("\\377\\000") ).to eq( "\xff\0".b )
86
96
  end
87
97
 
98
+ context 'timestamps' do
99
+ it 'decodes timestamps without timezone' do
100
+ expect( textdec_timestamp.decode('2016-01-02 23:23:59.123456') ).
101
+ to be_within(0.000001).of( Time.new(2016,01,02, 23, 23, 59.123456) )
102
+ end
103
+ it 'decodes timestamps with hour timezone' do
104
+ expect( textdec_timestamptz.decode('2015-01-26 17:26:42.691511-04') ).
105
+ to be_within(0.000001).of( Time.new(2015,01,26, 17, 26, 42.691511, "-04:00") )
106
+ expect( textdec_timestamptz.decode('2015-01-26 17:26:42.691511+10') ).
107
+ to be_within(0.000001).of( Time.new(2015,01,26, 17, 26, 42.691511, "+10:00") )
108
+ end
109
+ it 'decodes timestamps with hour:minute timezone' do
110
+ expect( textdec_timestamptz.decode('2015-01-26 17:26:42.691511-04:15') ).
111
+ to be_within(0.000001).of( Time.new(2015,01,26, 17, 26, 42.691511, "-04:15") )
112
+ expect( textdec_timestamptz.decode('2015-01-26 17:26:42.691511-0430') ).
113
+ to be_within(0.000001).of( Time.new(2015,01,26, 17, 26, 42.691511, "-04:30") )
114
+ expect( textdec_timestamptz.decode('2015-01-26 17:26:42.691511+10:45') ).
115
+ to be_within(0.000001).of( Time.new(2015,01,26, 17, 26, 42.691511, "+10:45") )
116
+ end
117
+ it 'decodes timestamps with hour:minute:sec timezone' do
118
+ # SET TIME ZONE 'Europe/Dublin'; -- Was UTC−00:25:21 until 1916
119
+ # SELECT '1900-01-01'::timestamptz;
120
+ # -- "1900-01-01 00:00:00-00:25:21"
121
+ expect( textdec_timestamptz.decode('1916-01-01 00:00:00-00:25:21') ).
122
+ to be_within(0.000001).of( Time.new(1916, 1, 1, 0, 0, 0, "-00:25:21") )
123
+ end
124
+ end
125
+
126
+ context 'identifier quotation' do
127
+ it 'should build an array out of an quoted identifier string' do
128
+ quoted_type = PG::TextDecoder::Identifier.new
129
+ expect( quoted_type.decode(%["A.".".B"]) ).to eq( ["A.", ".B"] )
130
+ expect( quoted_type.decode(%["'A"".""B'"]) ).to eq( ['\'A"."B\''] )
131
+ end
132
+
133
+ it 'should split unquoted identifier string' do
134
+ quoted_type = PG::TextDecoder::Identifier.new
135
+ expect( quoted_type.decode(%[a.b]) ).to eq( ['a','b'] )
136
+ expect( quoted_type.decode(%[a]) ).to eq( ['a'] )
137
+ end
138
+
139
+ it 'should split identifier string with correct character encoding' do
140
+ quoted_type = PG::TextDecoder::Identifier.new
141
+ v = quoted_type.decode(%[Héllo].encode("iso-8859-1")).first
142
+ expect( v.encoding ).to eq( Encoding::ISO_8859_1 )
143
+ expect( v ).to eq( %[Héllo].encode(Encoding::ISO_8859_1) )
144
+ end
145
+ end
146
+
88
147
  it "should raise when decode method is called with wrong args" do
89
148
  expect{ textdec_int.decode() }.to raise_error(ArgumentError)
90
149
  expect{ textdec_int.decode("123", 2, 3, 4) }.to raise_error(ArgumentError)
@@ -156,10 +215,39 @@ describe "PG::Type derivations" do
156
215
  expect( textenc_bytea.encode("\x00\x01\x02\x03\xef".b) ).to eq( "\\x00010203ef" )
157
216
  end
158
217
 
218
+ context 'identifier quotation' do
219
+ it 'should quote and escape identifier' do
220
+ quoted_type = PG::TextEncoder::Identifier.new
221
+ expect( quoted_type.encode(['schema','table','col']) ).to eq( %["schema"."table"."col"] )
222
+ expect( quoted_type.encode(['A.','.B']) ).to eq( %["A.".".B"] )
223
+ expect( quoted_type.encode(%['A"."B']) ).to eq( %["'A"".""B'"] )
224
+ expect( quoted_type.encode( nil ) ).to be_nil
225
+ end
226
+
227
+ it 'should quote identifiers with correct character encoding' do
228
+ quoted_type = PG::TextEncoder::Identifier.new
229
+ v = quoted_type.encode(['Héllo'], "iso-8859-1")
230
+ expect( v ).to eq( %["Héllo"].encode(Encoding::ISO_8859_1) )
231
+ expect( v.encoding ).to eq( Encoding::ISO_8859_1 )
232
+ end
233
+
234
+ it "will raise a TypeError for invalid arguments to quote_ident" do
235
+ quoted_type = PG::TextEncoder::Identifier.new
236
+ expect{ quoted_type.encode( [nil] ) }.to raise_error(TypeError)
237
+ expect{ quoted_type.encode( [['a']] ) }.to raise_error(TypeError)
238
+ end
239
+ end
240
+
159
241
  it "should encode with ruby encoder" do
160
242
  expect( intenc_incrementer.encode(3) ).to eq( "4 " )
161
243
  end
162
244
 
245
+ it "should encode with ruby encoder and given character encoding" do
246
+ r = intenc_incrementer_with_encoding.encode(3, Encoding::CP850)
247
+ expect( r ).to eq( "4 CP850" )
248
+ expect( r.encoding ).to eq( Encoding::CP850 )
249
+ end
250
+
163
251
  it "should return when ruby encoder returns non string values" do
164
252
  expect( intenc_incrementer_with_int_result.encode(3) ).to eq( 4 )
165
253
  end
@@ -347,20 +435,6 @@ describe "PG::Type derivations" do
347
435
  array_type = PG::TextDecoder::Array.new elements_type: nil
348
436
  expect( array_type.decode(%[{3,4}]) ).to eq( ['3','4'] )
349
437
  end
350
-
351
- context 'identifier quotation' do
352
- it 'should build an array out of an quoted identifier string' do
353
- quoted_type = PG::TextDecoder::Identifier.new elements_type: textdec_string
354
- expect( quoted_type.decode(%["A.".".B"]) ).to eq( ["A.", ".B"] )
355
- expect( quoted_type.decode(%["'A"".""B'"]) ).to eq( ['\'A"."B\''] )
356
- end
357
-
358
- it 'should split unquoted identifier string' do
359
- quoted_type = PG::TextDecoder::Identifier.new elements_type: textdec_string
360
- expect( quoted_type.decode(%[a.b]) ).to eq( ['a','b'] )
361
- expect( quoted_type.decode(%[a]) ).to eq( ['a'] )
362
- end
363
- end
364
438
  end
365
439
 
366
440
  describe '#encode' do
@@ -401,9 +475,18 @@ describe "PG::Type derivations" do
401
475
  end
402
476
 
403
477
  context 'array of types with encoder in ruby space' do
404
- it 'encodes with quotation' do
478
+ it 'encodes with quotation and default character encoding' do
479
+ array_type = PG::TextEncoder::Array.new elements_type: intenc_incrementer, needs_quotation: true
480
+ r = array_type.encode([3,4])
481
+ expect( r ).to eq( %[{"4 ","5 "}] )
482
+ expect( r.encoding ).to eq( Encoding::ASCII_8BIT )
483
+ end
484
+
485
+ it 'encodes with quotation and given character encoding' do
405
486
  array_type = PG::TextEncoder::Array.new elements_type: intenc_incrementer, needs_quotation: true
406
- expect( array_type.encode([3,4]) ).to eq( %[{"4 ","5 "}] )
487
+ r = array_type.encode([3,4], Encoding::CP850)
488
+ expect( r ).to eq( %[{"4 ","5 "}] )
489
+ expect( r.encoding ).to eq( Encoding::CP850 )
407
490
  end
408
491
 
409
492
  it 'encodes without quotation' do
@@ -411,6 +494,20 @@ describe "PG::Type derivations" do
411
494
  expect( array_type.encode([3,4]) ).to eq( %[{4 ,5 }] )
412
495
  end
413
496
 
497
+ it 'encodes with default character encoding' do
498
+ array_type = PG::TextEncoder::Array.new elements_type: intenc_incrementer_with_encoding
499
+ r = array_type.encode([3,4])
500
+ expect( r ).to eq( %[{"4 ASCII-8BIT","5 ASCII-8BIT"}] )
501
+ expect( r.encoding ).to eq( Encoding::ASCII_8BIT )
502
+ end
503
+
504
+ it 'encodes with given character encoding' do
505
+ array_type = PG::TextEncoder::Array.new elements_type: intenc_incrementer_with_encoding
506
+ r = array_type.encode([3,4], Encoding::CP850)
507
+ expect( r ).to eq( %[{"4 CP850","5 CP850"}] )
508
+ expect( r.encoding ).to eq( Encoding::CP850 )
509
+ end
510
+
414
511
  it "should raise when ruby encoder returns non string values" do
415
512
  array_type = PG::TextEncoder::Array.new elements_type: intenc_incrementer_with_int_result, needs_quotation: false
416
513
  expect{ array_type.encode([3,4]) }.to raise_error(TypeError)
@@ -422,27 +519,18 @@ describe "PG::Type derivations" do
422
519
  expect( textenc_float_array.encode(1234) ).to eq( "1234" )
423
520
  end
424
521
 
425
- context 'identifier quotation' do
426
- it 'should quote and escape identifier' do
427
- quoted_type = PG::TextEncoder::Identifier.new elements_type: textenc_string
428
- expect( quoted_type.encode(['schema','table','col']) ).to eq( %["schema"."table"."col"] )
429
- expect( quoted_type.encode(['A.','.B']) ).to eq( %["A.".".B"] )
430
- expect( quoted_type.encode(%['A"."B']) ).to eq( %["'A"".""B'"] )
431
- end
432
-
433
- it 'shouldn\'t quote or escape identifier if requested to not do' do
434
- quoted_type = PG::TextEncoder::Identifier.new elements_type: textenc_string,
435
- needs_quotation: false
436
- expect( quoted_type.encode(['a','b']) ).to eq( %[a.b] )
437
- expect( quoted_type.encode(%[a.b]) ).to eq( %[a.b] )
438
- end
439
- end
440
-
441
522
  context 'literal quotation' do
442
523
  it 'should quote and escape literals' do
443
524
  quoted_type = PG::TextEncoder::QuotedLiteral.new elements_type: textenc_string_array
444
525
  expect( quoted_type.encode(["'A\",","\\B'"]) ).to eq( %['{"''A\\",","\\\\B''"}'] )
445
526
  end
527
+
528
+ it 'should quote literals with correct character encoding' do
529
+ quoted_type = PG::TextEncoder::QuotedLiteral.new elements_type: textenc_string_array
530
+ v = quoted_type.encode(["Héllo"], "iso-8859-1")
531
+ expect( v.encoding ).to eq( Encoding::ISO_8859_1 )
532
+ expect( v ).to eq( %['{Héllo}'].encode(Encoding::ISO_8859_1) )
533
+ end
446
534
  end
447
535
  end
448
536
 
@@ -489,11 +577,22 @@ describe "PG::Type derivations" do
489
577
  expect( e.encode("xxxx") ).to eq("eHh4eA==")
490
578
  expect( e.encode("xxxxx") ).to eq("eHh4eHg=")
491
579
  expect( e.encode("\0\n\t") ).to eq("AAoJ")
580
+ expect( e.encode("(\xFBm") ).to eq("KPtt")
581
+ end
582
+
583
+ it 'should encode Strings as base64 with correct character encoding' do
584
+ e = PG::TextEncoder::ToBase64.new
585
+ v = e.encode("Héllo".encode("utf-16le"), "iso-8859-1")
586
+ expect( v ).to eq("SOlsbG8=")
587
+ expect( v.encoding ).to eq(Encoding::ISO_8859_1)
492
588
  end
493
589
 
494
590
  it "should encode Strings as base64 in BinaryDecoder" do
495
591
  e = PG::BinaryDecoder::ToBase64.new
496
592
  expect( e.decode("x") ).to eq("eA==")
593
+ v = e.decode("Héllo".encode("utf-16le"))
594
+ expect( v ).to eq("SADpAGwAbABvAA==")
595
+ expect( v.encoding ).to eq(Encoding::ASCII_8BIT)
497
596
  end
498
597
 
499
598
  it "should encode Integers as base64" do
@@ -517,6 +616,7 @@ describe "PG::Type derivations" do
517
616
  expect( e.decode("eHh4eA==") ).to eq("xxxx")
518
617
  expect( e.decode("eHh4eHg=") ).to eq("xxxxx")
519
618
  expect( e.decode("AAoJ") ).to eq("\0\n\t")
619
+ expect( e.decode("KPtt") ).to eq("(\xFBm")
520
620
  end
521
621
 
522
622
  it "should decode base64 in BinaryEncoder" do
@@ -579,6 +679,12 @@ describe "PG::Type derivations" do
579
679
  expect( encoder.encode([:xyz, 123, 2456, 34567, 456789, 5678901, [1,2,3], 12.1, "abcdefg", nil]) ).
580
680
  to eq("xyz\t123\t2456\t34567\t456789\t5678901\t[1, 2, 3]\t12.1\tabcdefg\t\\N\n")
581
681
  end
682
+
683
+ it 'should output a string with correct character encoding' do
684
+ v = encoder.encode(["Héllo"], "iso-8859-1")
685
+ expect( v.encoding ).to eq( Encoding::ISO_8859_1 )
686
+ expect( v ).to eq( "Héllo\n".encode(Encoding::ISO_8859_1) )
687
+ end
582
688
  end
583
689
 
584
690
  context "with TypeMapByClass" do
@@ -643,6 +749,12 @@ describe "PG::Type derivations" do
643
749
  it "should decode different types of Ruby objects" do
644
750
  expect( decoder.decode("123\t \0#\t#\n#\r#\\ \t234\t#\x01#\002\n".gsub("#", "\\"))).to eq( ["123", " \0\t\n\r\\ ", "234", "\x01\x02"] )
645
751
  end
752
+
753
+ it 'should respect input character encoding' do
754
+ v = decoder.decode("Héllo\n".encode("iso-8859-1")).first
755
+ expect( v.encoding ).to eq(Encoding::ISO_8859_1)
756
+ expect( v ).to eq("Héllo".encode("iso-8859-1"))
757
+ end
646
758
  end
647
759
  end
648
760
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -11,144 +11,163 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANnZWQx
14
+ MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MQwwCgYDVQQDDANnZWQx
15
15
  GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
16
- HhcNMTQwMzE5MDQzNTI2WhcNMTUwMzE5MDQzNTI2WjA+MQwwCgYDVQQDDANnZWQx
16
+ HhcNMTYwODIwMTgxNzQyWhcNMTcwODIwMTgxNzQyWjA+MQwwCgYDVQQDDANnZWQx
17
17
  GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
18
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDb92mkyYwuGBg1oRxt2tkH
19
- +Uo3LAsaL/APBfSLzy8o3+B3AUHKCjMUaVeBoZdWtMHB75X3VQlvXfZMyBxj59Vo
20
- cDthr3zdao4HnyrzAIQf7BO5Y8KBwVD+yyXCD/N65TTwqsQnO3ie7U5/9ut1rnNr
21
- OkOzAscMwkfQxBkXDzjvAWa6UF4c5c9kR/T79iA21kDx9+bUMentU59aCJtUcbxa
22
- 7kcKJhPEYsk4OdxR9q2dphNMFDQsIdRO8rywX5FRHvcb+qnXC17RvxLHtOjysPtp
23
- EWsYoZMxyCDJpUqbwoeiM+tAHoz2ABMv3Ahie3Qeb6+MZNAtMmaWfBx3dg2u+/WN
24
- AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSZ0hCV
25
- qoHr122fGKelqffzEQBhszAcBgNVHREEFTATgRFnZWRARmFlcmllTVVELm9yZzAc
26
- BgNVHRIEFTATgRFnZWRARmFlcmllTVVELm9yZzANBgkqhkiG9w0BAQUFAAOCAQEA
27
- TuL1Bzl6TBs1YEzEubFHb9XAPgehWzzUudjDKzTRd+uyZmxnomBqTCQjT5ucNRph
28
- 3jZ6bhLNooLQxTjIuHodeGcEMHZdt4Yi7SyPmw5Nry12z6wrDp+5aGps3HsE5WsQ
29
- Zq2EuyEOc96g31uoIvjNdieKs+1kE+K+dJDjtw+wTH2i63P7r6N/NfPPXpxsFquo
30
- wcYRRrHdR7GhdJeT+V8Q8Bi5bglCUGdx+8scMgkkePc98k9osQHypbACmzO+Bqkv
31
- c7ZKPJcWBv0sm81+FCZXNACn2f9jfF8OQinxVs0O052KbGuEQaaiGIYeuuwQE2q6
32
- ggcrPfcYeTwWlfZPu2LrBg==
18
+ ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC/JWGRHO+USzR97vXjkFgt
19
+ 83qeNf2KHkcvrRTSnR64i6um/ziin0I0oX23H7VYrDJC9A/uoUa5nGRJS5Zw/+wW
20
+ ENcvWVZS4iUzi4dsYJGY6yEOsXh2CcF46+QevV8iE+UmbkU75V7Dy1JCaUOyizEt
21
+ TH5UHsOtUU7k9TYARt/TgYZKuaoAMZZd5qyVqhF1vV+7/Qzmp89NGflXf2xYP26a
22
+ 4MAX2qqKX/FKXqmFO+AGsbwYTEds1mksBF3fGsFgsQWxftG8GfZQ9+Cyu2+l1eOw
23
+ cZ+lPcg834G9DrqW2zhqUoLr1MTly4pqxYGb7XoDhoR7dd1kFE2a067+DzWC/ADt
24
+ +QkcqWUm5oh1fN0eqr7NsZlVJDulFgdiiYPQiIN7UNsii4Wc9aZqBoGcYfBeQNPZ
25
+ soo/6za/bWajOKUmDhpqvaiRv9EDpVLzuj53uDoukMMwxCMfgb04+ckQ0t2G7wqc
26
+ /D+K9JW9DDs3Yjgv9k4h7YMhW5gftosd+NkNC/+Y2CkCAwEAAaN1MHMwCQYDVR0T
27
+ BAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHKN/nkRusdqCJEuq3lgB3fJvyTg
28
+ MBwGA1UdEQQVMBOBEWdlZEBGYWVyaWVNVUQub3JnMBwGA1UdEgQVMBOBEWdlZEBG
29
+ YWVyaWVNVUQub3JnMA0GCSqGSIb3DQEBCwUAA4IBgQAPJzKiT0zBU7kpqe0aS2qb
30
+ FI0PJ4y5I8buU4IZGUD5NEt/N7pZNfOyBxkrZkXhS44Fp+xwBH5ebLbq/WY78Bqd
31
+ db0z6ZgW4LMYMpWFfbXsRbd9TU2f52L8oMAhxOvF7Of5qJMVWuFQ8FPagk2iHrdH
32
+ inYLQagqAF6goWTXgAJCdPd6SNeeSNqA6vlY7CV1Jh5kfNJJ6xu/CVij1GzCLu/5
33
+ DMOr26DBv+qLJRRC/2h34uX71q5QgeOyxvMg+7V3u/Q06DXyQ2VgeeqiwDFFpEH0
34
+ PFkdPO6ZqbTRcLfNH7mFgCBJjsfSjJrn0sPBlYyOXgCoByfZnZyrIMH/UY+lgQqS
35
+ 6Von1VDsfQm0eJh5zYZD64ZF86phSR7mUX3mXItwH04HrZwkWpvgd871DZVR3i1n
36
+ w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
37
+ p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
33
38
  -----END CERTIFICATE-----
34
- date: 2015-01-05 00:00:00.000000000 Z
39
+ date: 2016-09-22 00:00:00.000000000 Z
35
40
  dependencies:
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: hoe-mercurial
38
43
  requirement: !ruby/object:Gem::Requirement
39
44
  requirements:
40
- - - ~>
45
+ - - "~>"
41
46
  - !ruby/object:Gem::Version
42
47
  version: '1.4'
43
48
  type: :development
44
49
  prerelease: false
45
50
  version_requirements: !ruby/object:Gem::Requirement
46
51
  requirements:
47
- - - ~>
52
+ - - "~>"
48
53
  - !ruby/object:Gem::Version
49
54
  version: '1.4'
50
55
  - !ruby/object:Gem::Dependency
51
56
  name: hoe-deveiate
52
57
  requirement: !ruby/object:Gem::Requirement
53
58
  requirements:
54
- - - ~>
59
+ - - "~>"
55
60
  - !ruby/object:Gem::Version
56
- version: '0.6'
61
+ version: '0.7'
57
62
  type: :development
58
63
  prerelease: false
59
64
  version_requirements: !ruby/object:Gem::Requirement
60
65
  requirements:
61
- - - ~>
66
+ - - "~>"
62
67
  - !ruby/object:Gem::Version
63
- version: '0.6'
68
+ version: '0.7'
64
69
  - !ruby/object:Gem::Dependency
65
70
  name: hoe-highline
66
71
  requirement: !ruby/object:Gem::Requirement
67
72
  requirements:
68
- - - ~>
73
+ - - "~>"
69
74
  - !ruby/object:Gem::Version
70
75
  version: '0.2'
71
76
  type: :development
72
77
  prerelease: false
73
78
  version_requirements: !ruby/object:Gem::Requirement
74
79
  requirements:
75
- - - ~>
80
+ - - "~>"
76
81
  - !ruby/object:Gem::Version
77
82
  version: '0.2'
78
83
  - !ruby/object:Gem::Dependency
79
84
  name: rdoc
80
85
  requirement: !ruby/object:Gem::Requirement
81
86
  requirements:
82
- - - ~>
87
+ - - "~>"
83
88
  - !ruby/object:Gem::Version
84
89
  version: '4.0'
85
90
  type: :development
86
91
  prerelease: false
87
92
  version_requirements: !ruby/object:Gem::Requirement
88
93
  requirements:
89
- - - ~>
94
+ - - "~>"
90
95
  - !ruby/object:Gem::Version
91
96
  version: '4.0'
92
97
  - !ruby/object:Gem::Dependency
93
98
  name: rake-compiler
94
99
  requirement: !ruby/object:Gem::Requirement
95
100
  requirements:
96
- - - ~>
101
+ - - "~>"
97
102
  - !ruby/object:Gem::Version
98
103
  version: '0.9'
99
104
  type: :development
100
105
  prerelease: false
101
106
  version_requirements: !ruby/object:Gem::Requirement
102
107
  requirements:
103
- - - ~>
108
+ - - "~>"
104
109
  - !ruby/object:Gem::Version
105
110
  version: '0.9'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake-compiler-dock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.5'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.5'
106
125
  - !ruby/object:Gem::Dependency
107
126
  name: hoe
108
127
  requirement: !ruby/object:Gem::Requirement
109
128
  requirements:
110
- - - ~>
129
+ - - "~>"
111
130
  - !ruby/object:Gem::Version
112
131
  version: '3.12'
113
132
  type: :development
114
133
  prerelease: false
115
134
  version_requirements: !ruby/object:Gem::Requirement
116
135
  requirements:
117
- - - ~>
136
+ - - "~>"
118
137
  - !ruby/object:Gem::Version
119
138
  version: '3.12'
120
139
  - !ruby/object:Gem::Dependency
121
140
  name: hoe-bundler
122
141
  requirement: !ruby/object:Gem::Requirement
123
142
  requirements:
124
- - - ~>
143
+ - - "~>"
125
144
  - !ruby/object:Gem::Version
126
145
  version: '1.0'
127
146
  type: :development
128
147
  prerelease: false
129
148
  version_requirements: !ruby/object:Gem::Requirement
130
149
  requirements:
131
- - - ~>
150
+ - - "~>"
132
151
  - !ruby/object:Gem::Version
133
152
  version: '1.0'
134
153
  - !ruby/object:Gem::Dependency
135
154
  name: rspec
136
155
  requirement: !ruby/object:Gem::Requirement
137
156
  requirements:
138
- - - ~>
157
+ - - "~>"
139
158
  - !ruby/object:Gem::Version
140
159
  version: '3.0'
141
160
  type: :development
142
161
  prerelease: false
143
162
  version_requirements: !ruby/object:Gem::Requirement
144
163
  requirements:
145
- - - ~>
164
+ - - "~>"
146
165
  - !ruby/object:Gem::Version
147
166
  version: '3.0'
148
167
  description: |-
149
168
  Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
150
169
 
151
- It works with {PostgreSQL 8.4 and later}[http://www.postgresql.org/support/versioning/].
170
+ It works with {PostgreSQL 9.1 and later}[http://www.postgresql.org/support/versioning/].
152
171
 
153
172
  A small example usage:
154
173
 
@@ -160,7 +179,7 @@ description: |-
160
179
  conn = PG.connect( dbname: 'sales' )
161
180
  conn.exec( "SELECT * FROM pg_stat_activity" ) do |result|
162
181
  puts " PID | User | Query"
163
- result.each do |row|
182
+ result.each do |row|
164
183
  puts " %7d | %-16s | %s " %
165
184
  row.values_at('procpid', 'usename', 'current_query')
166
185
  end
@@ -202,7 +221,7 @@ extra_rdoc_files:
202
221
  - ext/pg_type_map_in_ruby.c
203
222
  - ext/util.c
204
223
  files:
205
- - .gemtest
224
+ - ".gemtest"
206
225
  - BSDL
207
226
  - ChangeLog
208
227
  - Contributors.rdoc
@@ -289,33 +308,27 @@ files:
289
308
  - spec/pg_spec.rb
290
309
  homepage: https://bitbucket.org/ged/ruby-pg
291
310
  licenses:
292
- - BSD
293
- - Ruby
294
- - GPL
311
+ - BSD-3-Clause
295
312
  metadata: {}
296
313
  post_install_message:
297
314
  rdoc_options:
298
- - -f
299
- - fivefish
300
- - -t
301
- - 'pg: The Ruby Interface to PostgreSQL'
302
- - -m
315
+ - "--main"
303
316
  - README.rdoc
304
317
  require_paths:
305
318
  - lib
306
319
  required_ruby_version: !ruby/object:Gem::Requirement
307
320
  requirements:
308
- - - '>='
321
+ - - ">="
309
322
  - !ruby/object:Gem::Version
310
- version: 1.9.3
323
+ version: 2.0.0
311
324
  required_rubygems_version: !ruby/object:Gem::Requirement
312
325
  requirements:
313
- - - '>='
326
+ - - ">="
314
327
  - !ruby/object:Gem::Version
315
328
  version: '0'
316
329
  requirements: []
317
330
  rubyforge_project:
318
- rubygems_version: 2.4.5
331
+ rubygems_version: 2.6.2
319
332
  signing_key:
320
333
  specification_version: 4
321
334
  summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]