ruby-postgres 0.7.1.2005.12.21 → 0.7.1.2006.04.05

Sign up to get free protection for your applications and to get access to all the features.
data/postgres.c CHANGED
@@ -83,7 +83,7 @@ static VALUE pgresult_clear _((VALUE));
83
83
  static VALUE pgresult_result_with_clear _((VALUE));
84
84
  static VALUE pgresult_new _((PGresult*));
85
85
 
86
- static int translate_results = 1;
86
+ static int translate_results = 0;
87
87
 
88
88
  /* Large Object support */
89
89
  typedef struct pglarge_object
@@ -195,7 +195,7 @@ pgconn_s_translate_results_set(self, fact)
195
195
  VALUE self, fact;
196
196
  {
197
197
  translate_results = (fact == Qfalse || fact == Qnil) ? 0 : 1;
198
- return Qnil;
198
+ return fact;
199
199
  }
200
200
 
201
201
  static VALUE format_array_element(VALUE obj);
@@ -600,7 +600,7 @@ pgconn_async_exec(obj, str)
600
600
 
601
601
  Check_Type(str, T_STRING);
602
602
 
603
- while (result = PQgetResult(conn)) {
603
+ while ((result = PQgetResult(conn))) {
604
604
  PQclear(result);
605
605
  }
606
606
 
@@ -1235,10 +1235,9 @@ fetch_pgresult(result, row, column)
1235
1235
  return PARSE(rb_cDate, string);
1236
1236
  case TIMEOID:
1237
1237
  case TIMETZOID:
1238
- return PARSE(rb_cTime, string);
1239
1238
  case TIMESTAMPOID:
1240
1239
  case TIMESTAMPTZOID:
1241
- return PARSE(rb_cDateTime, string);
1240
+ return PARSE(rb_cTime, string);
1242
1241
 
1243
1242
  default:
1244
1243
  return rb_tainted_str_new2(string);
@@ -21,9 +21,12 @@ SPEC = Gem::Specification.new do |s|
21
21
  s.extensions = 'extconf.rb'
22
22
  end
23
23
 
24
- s.files = Dir.chdir(File.exists?('_darcs') ? '_darcs/current' : '.') do
25
- Dir['**/*'].reject { |file| file =~ /\.gem$/ }
24
+ if File.exists? '_darcs'
25
+ s.files = Dir.chdir('_darcs/current') { Dir['**/*'] }
26
+ else
27
+ s.files = Dir['**/*']
26
28
  end
29
+ s.files.reject { |file| file =~ /\.gem$/ }
27
30
 
28
31
  end
29
32
 
data/tests/tc_postgres.rb CHANGED
@@ -1,9 +1,9 @@
1
- require 'postgres'
2
1
  require 'test/unit'
3
2
 
4
3
  class PostgresTestCase < Test::Unit::TestCase
5
4
 
6
5
  def setup
6
+ PGconn.translate_results = true
7
7
  @conn = PGconn.new('dbname' => 'template1')
8
8
  end
9
9
 
@@ -33,7 +33,7 @@ EOT
33
33
  assert_equal("12345I\000ITEST", tuple['bytea_value'])
34
34
  assert_equal(Date.parse('2005-11-30'), tuple['date_value'])
35
35
  assert_equal(Time.parse('12:00:00'), tuple['time_value'])
36
- assert_equal(DateTime.parse('2005-11-30 12:00:00'), tuple['date_time_value'])
36
+ assert_equal(Time.parse('2005-11-30 12:00:00'), tuple['date_time_value'])
37
37
  assert_equal(1.5, tuple['float_value'])
38
38
  assert_equal(BigDecimal("12345.5678"), tuple['numeric_value'])
39
39
  assert_equal(1235, tuple['numeric_10_value'])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ruby-postgres
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.1.2005.12.21
7
- date: 2005-12-21
6
+ version: 0.7.1.2006.04.05
7
+ date: 2006-04-05 00:00:00 -05:00
8
8
  summary: Ruby extension library providing an API to PostgreSQL
9
9
  require_paths:
10
- - "."
10
+ - .
11
11
  email: davelee.com@gmail.com
12
12
  homepage: http://ruby.scripting.ca/postgres/
13
13
  rubyforge_project: ruby-postgres
@@ -18,43 +18,49 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
27
28
  authors:
28
- - "Yukihiro Matsumoto, Eiji Matsumoto, Noboru Saitou, Dave Lee"
29
+ - Yukihiro Matsumoto, Eiji Matsumoto, Noboru Saitou, Dave Lee
29
30
  files:
30
- - ChangeLog
31
- - Contributors
32
- - doc
33
- - extconf.rb
34
- - libpq-compat.c
35
- - MANIFEST
36
- - postgres.c
37
- - README
38
- - README.ja
39
- - ruby-postgres.gemspec
40
- - sample
41
- - tests
42
- - type-oids.h
43
- - doc/postgres.html
44
- - doc/postgres.jp.html
45
- - sample/losample.rb
46
- - sample/psql.rb
47
- - sample/psqlHelp.rb
48
- - sample/test1.rb
49
- - sample/test2.rb
50
- - sample/test4.rb
51
- - tests/tc_postgres.rb
31
+ - sample
32
+ - Contributors
33
+ - ruby-postgres.gemspec
34
+ - tests
35
+ - ChangeLog
36
+ - libpq-compat.c
37
+ - README
38
+ - doc
39
+ - MANIFEST
40
+ - postgres.c
41
+ - extconf.rb
42
+ - type-oids.h
43
+ - README.ja
44
+ - sample/psqlHelp.rb
45
+ - sample/losample.rb
46
+ - sample/test4.rb
47
+ - sample/test2.rb
48
+ - sample/test1.rb
49
+ - sample/psql.rb
50
+ - tests/tc_postgres.rb
51
+ - doc/postgres.jp.html
52
+ - doc/postgres.html
52
53
  test_files: []
54
+
53
55
  rdoc_options: []
56
+
54
57
  extra_rdoc_files: []
58
+
55
59
  executables: []
60
+
56
61
  extensions:
57
- - extconf.rb
62
+ - extconf.rb
58
63
  requirements:
59
- - PostgreSQL libpq library and headers
60
- dependencies: []
64
+ - PostgreSQL libpq library and headers
65
+ dependencies: []
66
+