do_postgres 0.10.3-java → 0.10.4-java
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.
- data/ChangeLog.markdown +18 -0
- data/LICENSE +1 -1
- data/README.markdown +2 -9
- data/Rakefile +12 -45
- data/ext/do_postgres/do_common.c +526 -0
- data/ext/do_postgres/do_common.h +170 -0
- data/ext/do_postgres/do_postgres.c +253 -676
- data/ext/do_postgres/error.h +126 -241
- data/lib/do_postgres.rb +8 -3
- data/lib/do_postgres/do_postgres.jar +0 -0
- data/lib/do_postgres/version.rb +1 -1
- data/spec/command_spec.rb +3 -3
- data/spec/connection_spec.rb +21 -12
- data/spec/encoding_spec.rb +4 -4
- data/spec/error/sql_error_spec.rb +2 -2
- data/spec/reader_spec.rb +2 -2
- data/spec/result_spec.rb +11 -10
- data/spec/spec_helper.rb +13 -5
- data/spec/typecast/array_spec.rb +2 -2
- data/spec/typecast/bigdecimal_spec.rb +3 -3
- data/spec/typecast/boolean_spec.rb +3 -3
- data/spec/typecast/byte_array_spec.rb +2 -2
- data/spec/typecast/class_spec.rb +2 -2
- data/spec/typecast/date_spec.rb +3 -3
- data/spec/typecast/datetime_spec.rb +3 -3
- data/spec/typecast/float_spec.rb +3 -3
- data/spec/typecast/integer_spec.rb +2 -2
- data/spec/typecast/nil_spec.rb +4 -4
- data/spec/typecast/other_spec.rb +2 -2
- data/spec/typecast/range_spec.rb +2 -2
- data/spec/typecast/string_spec.rb +2 -2
- data/spec/typecast/time_spec.rb +3 -2
- data/tasks/compile.rake +42 -45
- data/tasks/spec.rake +8 -19
- metadata +43 -42
data/spec/typecast/time_spec.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/time_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/time_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::Postgres with Time' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Time'
|
|
8
|
+
it_should_behave_like 'supporting sub second Time'
|
|
8
9
|
end
|
data/tasks/compile.rake
CHANGED
|
@@ -3,67 +3,64 @@ begin
|
|
|
3
3
|
require 'rake/extensiontask'
|
|
4
4
|
require 'rake/javaextensiontask'
|
|
5
5
|
|
|
6
|
-
# Hack to avoid "allocator undefined for Proc" issue when unpacking Gems:
|
|
7
|
-
# gemspec provided by Jeweler uses Rake::FileList for files, test_files and
|
|
8
|
-
# extra_rdoc_files, and procs cannot be marshalled.
|
|
9
6
|
def gemspec
|
|
10
|
-
@clean_gemspec ||=
|
|
7
|
+
@clean_gemspec ||= Gem::Specification::load(File.expand_path('../../do_postgres.gemspec', __FILE__))
|
|
11
8
|
end
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
unless JRUBY
|
|
11
|
+
Rake::ExtensionTask.new('do_postgres', gemspec) do |ext|
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
postgres_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'pgsql'))
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
ext.lib_dir = "lib/#{gemspec.name}"
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
# automatically add build options to avoid need of manual input
|
|
18
|
+
if RUBY_PLATFORM =~ /mswin|mingw/ then
|
|
19
|
+
ext.config_options << "--with-pgsql-server-include=#{postgres_lib}/include/server"
|
|
20
|
+
ext.config_options << "--with-pgsql-client-include=#{postgres_lib}/include"
|
|
21
|
+
ext.config_options << "--with-pgsql-win32-include=#{postgres_lib}/include/server/port/win32"
|
|
22
|
+
ext.config_options << "--with-pgsql-client-lib=#{postgres_lib}/lib"
|
|
23
|
+
else
|
|
24
|
+
ext.cross_compile = true
|
|
25
|
+
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
|
|
26
|
+
ext.cross_config_options << "--with-pgsql-server-include=#{postgres_lib}/include/server"
|
|
27
|
+
ext.cross_config_options << "--with-pgsql-client-include=#{postgres_lib}/include"
|
|
28
|
+
ext.cross_config_options << "--with-pgsql-win32-include=#{postgres_lib}/include/server/port/win32"
|
|
29
|
+
ext.cross_config_options << "--with-pgsql-client-lib=#{postgres_lib}/lib"
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
ext.cross_compiling do |gemspec|
|
|
32
|
+
gemspec.post_install_message = <<-POST_INSTALL_MESSAGE
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
======================================================================================================
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
You've installed the binary version of #{gemspec.name}.
|
|
37
|
+
It was built using PostgreSQL version #{BINARY_VERSION}.
|
|
38
|
+
It's recommended to use the exact same version to avoid potential issues.
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
At the time of building this gem, the necessary DLL files where available
|
|
41
|
+
in the following download:
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
http://wwwmaster.postgresql.org/redir/107/h/binary/v#{BINARY_VERSION}/win32/postgresql-#{BINARY_VERSION}-1-binaries-no-installer.zip
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
You can put the following files available in this package in your Ruby bin
|
|
46
|
+
directory, for example C:\\Ruby\\bin
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
- lib\\libpq.dll
|
|
49
|
+
- bin\\ssleay32.dll
|
|
50
|
+
- bin\\libeay32.dll
|
|
51
|
+
- bin\\libintl-8.dll
|
|
52
|
+
- bin\\libiconv-2.dll
|
|
53
|
+
- bin\\krb5_32.dll
|
|
54
|
+
- bin\\comerr32.dll
|
|
55
|
+
- bin\\k5sprt32.dll
|
|
56
|
+
- bin\\gssapi32.dll
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
======================================================================================================
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
POST_INSTALL_MESSAGE
|
|
61
|
+
end
|
|
63
62
|
end
|
|
64
|
-
|
|
65
63
|
end
|
|
66
|
-
|
|
67
64
|
end
|
|
68
65
|
|
|
69
66
|
Rake::JavaExtensionTask.new('do_postgres', gemspec) do |ext|
|
|
@@ -73,7 +70,7 @@ begin
|
|
|
73
70
|
ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
|
|
74
71
|
ext.java_compiling do |gem|
|
|
75
72
|
gem.add_dependency 'jdbc-postgres', '>=8.2'
|
|
76
|
-
gem.add_dependency 'do_jdbc', '0.10.
|
|
73
|
+
gem.add_dependency 'do_jdbc', '0.10.4'
|
|
77
74
|
end
|
|
78
75
|
end
|
|
79
76
|
rescue LoadError
|
data/tasks/spec.rake
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'rspec/core/rake_task'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
spec.
|
|
5
|
-
spec.
|
|
6
|
-
spec.verbose = true
|
|
3
|
+
RSpec::Core::RakeTask.new(:spec => [:clean, :compile]) do |spec|
|
|
4
|
+
spec.pattern = './spec/**/*_spec.rb'
|
|
5
|
+
spec.skip_bundler = true
|
|
7
6
|
end
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
require 'rcov/rcovtask'
|
|
14
|
-
Rcov::RcovTask.new do |spec|
|
|
15
|
-
spec.libs << 'spec'
|
|
16
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
|
17
|
-
spec.verbose = true
|
|
18
|
-
end
|
|
19
|
-
rescue LoadError
|
|
20
|
-
task :rcov do
|
|
21
|
-
abort 'RCov is not available. In order to run rcov, you must: gem install rcov'
|
|
22
|
-
end
|
|
8
|
+
RSpec::Core::RakeTask.new(:rcov => [:clean, :compile]) do |rcov|
|
|
9
|
+
rcov.pattern = "./spec/**/*_spec.rb"
|
|
10
|
+
rcov.rcov = true
|
|
11
|
+
rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
|
23
12
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: do_postgres
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 63
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 10
|
|
9
|
-
-
|
|
10
|
-
version: 0.10.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.10.4
|
|
11
11
|
platform: java
|
|
12
12
|
authors:
|
|
13
13
|
- Dirkjan Bussink
|
|
@@ -15,59 +15,56 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-03-29 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
|
-
name: data_objects
|
|
23
|
-
prerelease: false
|
|
24
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
25
23
|
none: false
|
|
26
24
|
requirements:
|
|
27
25
|
- - "="
|
|
28
26
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash:
|
|
27
|
+
hash: 63
|
|
30
28
|
segments:
|
|
31
29
|
- 0
|
|
32
30
|
- 10
|
|
33
|
-
-
|
|
34
|
-
version: 0.10.
|
|
31
|
+
- 4
|
|
32
|
+
version: 0.10.4
|
|
35
33
|
type: :runtime
|
|
34
|
+
name: data_objects
|
|
35
|
+
prerelease: false
|
|
36
36
|
version_requirements: *id001
|
|
37
37
|
- !ruby/object:Gem::Dependency
|
|
38
|
-
name: bacon
|
|
39
|
-
prerelease: false
|
|
40
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
|
41
39
|
none: false
|
|
42
40
|
requirements:
|
|
43
41
|
- - ~>
|
|
44
42
|
- !ruby/object:Gem::Version
|
|
45
|
-
hash:
|
|
43
|
+
hash: 9
|
|
46
44
|
segments:
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
version: "
|
|
45
|
+
- 2
|
|
46
|
+
- 5
|
|
47
|
+
version: "2.5"
|
|
50
48
|
type: :development
|
|
49
|
+
name: rspec
|
|
50
|
+
prerelease: false
|
|
51
51
|
version_requirements: *id002
|
|
52
52
|
- !ruby/object:Gem::Dependency
|
|
53
|
-
name: rake-compiler
|
|
54
|
-
prerelease: false
|
|
55
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
|
56
54
|
none: false
|
|
57
55
|
requirements:
|
|
58
|
-
- -
|
|
56
|
+
- - ~>
|
|
59
57
|
- !ruby/object:Gem::Version
|
|
60
|
-
hash:
|
|
58
|
+
hash: 5
|
|
61
59
|
segments:
|
|
62
60
|
- 0
|
|
63
61
|
- 7
|
|
64
|
-
|
|
65
|
-
version: 0.7.0
|
|
62
|
+
version: "0.7"
|
|
66
63
|
type: :development
|
|
64
|
+
name: rake-compiler
|
|
65
|
+
prerelease: false
|
|
67
66
|
version_requirements: *id003
|
|
68
67
|
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: jdbc-postgres
|
|
70
|
-
prerelease: false
|
|
71
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
|
72
69
|
none: false
|
|
73
70
|
requirements:
|
|
@@ -79,22 +76,24 @@ dependencies:
|
|
|
79
76
|
- 2
|
|
80
77
|
version: "8.2"
|
|
81
78
|
type: :runtime
|
|
79
|
+
name: jdbc-postgres
|
|
80
|
+
prerelease: false
|
|
82
81
|
version_requirements: *id004
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: do_jdbc
|
|
85
|
-
prerelease: false
|
|
86
83
|
requirement: &id005 !ruby/object:Gem::Requirement
|
|
87
84
|
none: false
|
|
88
85
|
requirements:
|
|
89
86
|
- - "="
|
|
90
87
|
- !ruby/object:Gem::Version
|
|
91
|
-
hash:
|
|
88
|
+
hash: 63
|
|
92
89
|
segments:
|
|
93
90
|
- 0
|
|
94
91
|
- 10
|
|
95
|
-
-
|
|
96
|
-
version: 0.10.
|
|
92
|
+
- 4
|
|
93
|
+
version: 0.10.4
|
|
97
94
|
type: :runtime
|
|
95
|
+
name: do_jdbc
|
|
96
|
+
prerelease: false
|
|
98
97
|
version_requirements: *id005
|
|
99
98
|
description: Implements the DataObjects API for PostgreSQL
|
|
100
99
|
email: d.bussink@gmail.com
|
|
@@ -103,14 +102,25 @@ executables: []
|
|
|
103
102
|
extensions: []
|
|
104
103
|
|
|
105
104
|
extra_rdoc_files:
|
|
106
|
-
- README.markdown
|
|
107
105
|
- ChangeLog.markdown
|
|
108
106
|
- LICENSE
|
|
107
|
+
- README.markdown
|
|
109
108
|
files:
|
|
109
|
+
- ChangeLog.markdown
|
|
110
|
+
- LICENSE
|
|
111
|
+
- README.markdown
|
|
112
|
+
- Rakefile
|
|
113
|
+
- ext/do_postgres/compat.h
|
|
114
|
+
- ext/do_postgres/do_common.c
|
|
115
|
+
- ext/do_postgres/do_common.h
|
|
116
|
+
- ext/do_postgres/do_postgres.c
|
|
117
|
+
- ext/do_postgres/error.h
|
|
118
|
+
- ext/do_postgres/extconf.rb
|
|
119
|
+
- ext/do_postgres/pg_config.h
|
|
120
|
+
- lib/do_postgres.rb
|
|
110
121
|
- lib/do_postgres/encoding.rb
|
|
111
122
|
- lib/do_postgres/transaction.rb
|
|
112
123
|
- lib/do_postgres/version.rb
|
|
113
|
-
- lib/do_postgres.rb
|
|
114
124
|
- spec/command_spec.rb
|
|
115
125
|
- spec/connection_spec.rb
|
|
116
126
|
- spec/encoding_spec.rb
|
|
@@ -136,23 +146,14 @@ files:
|
|
|
136
146
|
- tasks/release.rake
|
|
137
147
|
- tasks/retrieve.rake
|
|
138
148
|
- tasks/spec.rake
|
|
139
|
-
- ext/do_postgres/extconf.rb
|
|
140
|
-
- ext/do_postgres/do_postgres.c
|
|
141
|
-
- ext/do_postgres/compat.h
|
|
142
|
-
- ext/do_postgres/error.h
|
|
143
|
-
- ext/do_postgres/pg_config.h
|
|
144
|
-
- LICENSE
|
|
145
|
-
- Rakefile
|
|
146
|
-
- ChangeLog.markdown
|
|
147
|
-
- README.markdown
|
|
148
149
|
- lib/do_postgres/do_postgres.jar
|
|
149
|
-
has_rdoc:
|
|
150
|
+
has_rdoc: true
|
|
150
151
|
homepage:
|
|
151
152
|
licenses: []
|
|
152
153
|
|
|
153
154
|
post_install_message:
|
|
154
|
-
rdoc_options:
|
|
155
|
-
|
|
155
|
+
rdoc_options: []
|
|
156
|
+
|
|
156
157
|
require_paths:
|
|
157
158
|
- lib
|
|
158
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|