do_postgres 0.10.0-java → 0.10.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +22 -0
- data/LICENSE +1 -1
- data/README.markdown +106 -3
- data/Rakefile +56 -9
- data/ext/do_postgres/compat.h +55 -0
- data/ext/do_postgres/do_postgres.c +1060 -0
- data/ext/do_postgres/error.h +483 -0
- data/ext/do_postgres/extconf.rb +43 -0
- data/ext/do_postgres/pg_config.h +689 -0
- data/lib/do_postgres.rb +12 -16
- data/lib/do_postgres/do_postgres.jar +0 -0
- data/lib/do_postgres/version.rb +1 -1
- data/spec/command_spec.rb +2 -2
- data/spec/connection_spec.rb +22 -7
- data/spec/encoding_spec.rb +2 -1
- data/spec/reader_spec.rb +1 -1
- data/spec/result_spec.rb +12 -13
- data/spec/spec_helper.rb +27 -36
- data/spec/typecast/array_spec.rb +1 -1
- data/spec/typecast/bigdecimal_spec.rb +2 -2
- data/spec/typecast/boolean_spec.rb +2 -2
- data/spec/typecast/byte_array_spec.rb +1 -1
- data/spec/typecast/class_spec.rb +1 -1
- data/spec/typecast/date_spec.rb +2 -2
- data/spec/typecast/datetime_spec.rb +2 -2
- data/spec/typecast/float_spec.rb +2 -2
- data/spec/typecast/integer_spec.rb +1 -1
- data/spec/typecast/nil_spec.rb +3 -3
- data/spec/typecast/other_spec.rb +8 -0
- data/spec/typecast/range_spec.rb +1 -1
- data/spec/typecast/string_spec.rb +1 -1
- data/spec/typecast/time_spec.rb +1 -1
- data/tasks/compile.rake +81 -0
- data/tasks/release.rake +12 -71
- data/tasks/retrieve.rake +5 -9
- data/tasks/spec.rake +19 -15
- metadata +120 -107
- data/HISTORY.markdown +0 -12
- data/Manifest.txt +0 -34
- data/lib/do_postgres_ext.jar +0 -0
- data/spec/lib/rspec_immediate_feedback_formatter.rb +0 -3
- data/tasks/gem.rake +0 -8
- data/tasks/install.rake +0 -15
- data/tasks/native.rake +0 -35
data/tasks/release.rake
CHANGED
@@ -1,75 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
desc 'Builds all gems (native, binaries for JRuby and Windows)'
|
2
|
+
task :build_all do
|
3
|
+
`rake clean`
|
4
|
+
`rake build`
|
5
|
+
`rake java gem`
|
6
|
+
`rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1`
|
6
7
|
end
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
# compare versions to avoid mistakes
|
15
|
-
unless ver == GEM_SPEC.version.to_s then
|
16
|
-
fail "Version mismatch (supplied and specification versions differ)."
|
17
|
-
end
|
18
|
-
|
19
|
-
# no rubyforge project? no release for you!
|
20
|
-
if GEM_SPEC.rubyforge_project == 'TODO' or GEM_SPEC.rubyforge_project.nil? then
|
21
|
-
fail "Must define rubyforge_project in your gem specification."
|
22
|
-
end
|
23
|
-
|
24
|
-
# instantiate a RubyForge object
|
25
|
-
rf = RubyForge.new
|
26
|
-
|
27
|
-
# read project info and overview
|
28
|
-
notes = begin
|
29
|
-
r = File.read("README.markdown")
|
30
|
-
r.split(/^(.*\n\-+)/)[1..4].join.strip
|
31
|
-
rescue
|
32
|
-
warn "Missing README.markdown"
|
33
|
-
''
|
34
|
-
end
|
35
|
-
|
36
|
-
# read changes
|
37
|
-
changes = begin
|
38
|
-
h = File.read("HISTORY.markdown")
|
39
|
-
h.split(/^(##+ .*)/)[1..2].join.strip
|
40
|
-
rescue
|
41
|
-
warn "Missing HISTORY.markdown"
|
42
|
-
''
|
43
|
-
end
|
44
|
-
|
45
|
-
# build the configuration for the release
|
46
|
-
config = Hash.new
|
47
|
-
config["release_notes"] = notes
|
48
|
-
config["release_changes"] = changes
|
49
|
-
config["preformatted"] = true
|
50
|
-
|
51
|
-
# prepare configuration
|
52
|
-
rf.configure config
|
53
|
-
|
54
|
-
files = FileList["pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version}*.*"].to_a
|
55
|
-
fail "No files found for the release." if files.empty?
|
56
|
-
|
57
|
-
puts "Logging in RubyForge..."
|
58
|
-
rf.login
|
59
|
-
|
60
|
-
puts "Files to upload:"
|
61
|
-
files.each do |f|
|
62
|
-
puts " * #{f}"
|
63
|
-
end
|
64
|
-
|
65
|
-
puts "Releasing #{GEM_SPEC.name} version #{GEM_SPEC.version}..."
|
66
|
-
rf.add_release GEM_SPEC.rubyforge_project, GEM_SPEC.name, GEM_SPEC.version, *files
|
67
|
-
puts "Done."
|
68
|
-
end
|
69
|
-
#Rake::Task['release'].prerequisites.unshift('clean', 'cross', 'native')
|
70
|
-
else
|
71
|
-
warn "no GEM_SPEC is found or defined. 'release' task cannot work without it."
|
9
|
+
desc 'Release all gems (native, binaries for JRuby and Windows)'
|
10
|
+
task :release_all => :build_all do
|
11
|
+
Dir["pkg/do_postgres-#{DataObjects::Postgres::VERSION}*.gem"].each do |gem_path|
|
12
|
+
command = "gem push #{gem_path}"
|
13
|
+
puts "Executing #{command.inspect}:"
|
14
|
+
sh command
|
72
15
|
end
|
73
|
-
else
|
74
|
-
warn "rubyforge gem is required to generate releases, please install it (gem install rubyforge)."
|
75
16
|
end
|
data/tasks/retrieve.rake
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
gem
|
2
|
+
gem 'rake-compiler', '~>0.7'
|
3
3
|
require 'rake/clean'
|
4
4
|
require 'rake/extensioncompiler'
|
5
5
|
|
@@ -29,14 +29,10 @@ begin
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def copy(from, to)
|
32
|
-
|
33
|
-
from.gsub!(/\//, '\\')
|
34
|
-
to.gsub!(/\//, '\\')
|
35
|
-
end
|
36
|
-
sh "#{WINDOWS ? 'copy' : 'cp'} #{from} #{to}"
|
32
|
+
FileUtils.cp(from, to)
|
37
33
|
end
|
38
34
|
|
39
|
-
version =
|
35
|
+
version = BINARY_VERSION
|
40
36
|
file "vendor/postgresql-#{version}-1-binaries-no-installer.zip" => ['vendor'] do |t|
|
41
37
|
url = "http://wwwmaster.postgresql.org/redir/107/h/binary/v#{version}/win32/#{File.basename(t.name)}"
|
42
38
|
when_writing "downloading #{t.name}" do
|
@@ -52,8 +48,8 @@ begin
|
|
52
48
|
cd "vendor" do
|
53
49
|
sh "unzip #{full_file} pgsql/bin/** pgsql/include/** pgsql/lib/**"
|
54
50
|
end
|
55
|
-
copy "ext/
|
56
|
-
copy "ext/
|
51
|
+
copy "ext/do_postgres/pg_config.h", "vendor/pgsql/include/pg_config.h"
|
52
|
+
copy "ext/do_postgres/pg_config.h", "vendor/pgsql/include/server/pg_config.h"
|
57
53
|
|
58
54
|
# update file timestamp to avoid Rake perform this extraction again.
|
59
55
|
touch t.name
|
data/tasks/spec.rake
CHANGED
@@ -1,19 +1,23 @@
|
|
1
|
-
|
2
|
-
require 'spec/rake/spectask'
|
1
|
+
require 'rake/testtask'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
spec_defaults = lambda do |spec|
|
4
|
+
spec.libs << 'lib' << 'spec'
|
5
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
6
|
+
spec.verbose = true
|
7
|
+
end
|
8
|
+
|
9
|
+
Rake::TestTask.new(:spec => [ :clean, :compile ], &spec_defaults)
|
10
|
+
Rake::TestTask.new(:spec_no_compile, &spec_defaults)
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
begin
|
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'
|
18
22
|
end
|
19
23
|
end
|
metadata
CHANGED
@@ -1,43 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
3
|
-
requirements:
|
4
|
-
- - '>='
|
5
|
-
- !ruby/object:Gem::Version
|
6
|
-
version: "0"
|
7
|
-
version:
|
8
|
-
email: d.bussink@gmail.com
|
9
|
-
cert_chain: []
|
10
|
-
|
11
|
-
summary: DataObjects PostgreSQL Driver
|
12
|
-
post_install_message:
|
13
|
-
extra_rdoc_files: []
|
14
|
-
|
15
|
-
homepage: http://github.com/datamapper/do
|
16
|
-
signing_key:
|
17
2
|
name: do_postgres
|
18
|
-
|
19
|
-
|
20
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.1
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- Dirkjan Bussink
|
21
8
|
autorequire:
|
22
|
-
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
23
11
|
|
12
|
+
date: 2010-01-09 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: data_objects
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.10.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bacon
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "1.1"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake-compiler
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0.7"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: jdbc-postgres
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "8.2"
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: do_jdbc
|
57
|
+
type: :runtime
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.10.1
|
64
|
+
version:
|
65
|
+
description: Implements the DataObjects API for PostgreSQL
|
66
|
+
email: d.bussink@gmail.com
|
24
67
|
executables: []
|
25
68
|
|
26
|
-
|
27
|
-
|
28
|
-
|
69
|
+
extensions: []
|
70
|
+
|
71
|
+
extra_rdoc_files:
|
72
|
+
- README.markdown
|
73
|
+
- ChangeLog.markdown
|
74
|
+
- LICENSE
|
29
75
|
files:
|
30
|
-
- lib/do_postgres.rb
|
31
76
|
- lib/do_postgres/encoding.rb
|
32
77
|
- lib/do_postgres/transaction.rb
|
33
78
|
- lib/do_postgres/version.rb
|
79
|
+
- lib/do_postgres.rb
|
34
80
|
- spec/command_spec.rb
|
35
81
|
- spec/connection_spec.rb
|
36
82
|
- spec/encoding_spec.rb
|
37
83
|
- spec/reader_spec.rb
|
38
84
|
- spec/result_spec.rb
|
39
85
|
- spec/spec_helper.rb
|
40
|
-
- spec/lib/rspec_immediate_feedback_formatter.rb
|
41
86
|
- spec/typecast/array_spec.rb
|
42
87
|
- spec/typecast/bigdecimal_spec.rb
|
43
88
|
- spec/typecast/boolean_spec.rb
|
@@ -48,102 +93,70 @@ files:
|
|
48
93
|
- spec/typecast/float_spec.rb
|
49
94
|
- spec/typecast/integer_spec.rb
|
50
95
|
- spec/typecast/nil_spec.rb
|
96
|
+
- spec/typecast/other_spec.rb
|
51
97
|
- spec/typecast/range_spec.rb
|
52
98
|
- spec/typecast/string_spec.rb
|
53
99
|
- spec/typecast/time_spec.rb
|
54
|
-
- tasks/
|
55
|
-
- tasks/install.rake
|
56
|
-
- tasks/native.rake
|
100
|
+
- tasks/compile.rake
|
57
101
|
- tasks/release.rake
|
58
102
|
- tasks/retrieve.rake
|
59
103
|
- tasks/spec.rake
|
104
|
+
- ext/do_postgres/extconf.rb
|
105
|
+
- ext/do_postgres/do_postgres.c
|
106
|
+
- ext/do_postgres/compat.h
|
107
|
+
- ext/do_postgres/error.h
|
108
|
+
- ext/do_postgres/pg_config.h
|
60
109
|
- LICENSE
|
61
110
|
- Rakefile
|
62
|
-
-
|
111
|
+
- ChangeLog.markdown
|
63
112
|
- README.markdown
|
64
|
-
-
|
65
|
-
|
113
|
+
- lib/do_postgres/do_postgres.jar
|
114
|
+
has_rdoc: false
|
115
|
+
homepage:
|
116
|
+
licenses: []
|
117
|
+
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options:
|
120
|
+
- --charset=UTF-8
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: "0"
|
128
|
+
version:
|
66
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
130
|
requirements:
|
68
|
-
- -
|
131
|
+
- - ">="
|
69
132
|
- !ruby/object:Gem::Version
|
70
133
|
version: "0"
|
71
134
|
version:
|
72
|
-
extensions: []
|
73
|
-
|
74
|
-
rubygems_version: 1.3.3
|
75
135
|
requirements: []
|
76
136
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
-
|
87
|
-
|
88
|
-
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
version: 0.9.12
|
104
|
-
version:
|
105
|
-
type: :runtime
|
106
|
-
version_requirement:
|
107
|
-
name: extlib
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - "="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: 0.10.0
|
114
|
-
version:
|
115
|
-
type: :runtime
|
116
|
-
version_requirement:
|
117
|
-
name: data_objects
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
version_requirements: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - '>='
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: "8.2"
|
124
|
-
version:
|
125
|
-
type: :runtime
|
126
|
-
version_requirement:
|
127
|
-
name: jdbc-postgres
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
version_requirements: !ruby/object:Gem::Requirement
|
130
|
-
requirements:
|
131
|
-
- - "="
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: 0.10.0
|
134
|
-
version:
|
135
|
-
type: :runtime
|
136
|
-
version_requirement:
|
137
|
-
name: do_jdbc
|
138
|
-
- !ruby/object:Gem::Dependency
|
139
|
-
version_requirements: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - ~>
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: 1.2.0
|
144
|
-
version:
|
145
|
-
type: :development
|
146
|
-
version_requirement:
|
147
|
-
name: rspec
|
148
|
-
bindir: bin
|
149
|
-
has_rdoc: true
|
137
|
+
rubyforge_project: dorb
|
138
|
+
rubygems_version: 1.3.5
|
139
|
+
signing_key:
|
140
|
+
specification_version: 3
|
141
|
+
summary: DataObjects PostgreSQL Driver
|
142
|
+
test_files:
|
143
|
+
- spec/command_spec.rb
|
144
|
+
- spec/connection_spec.rb
|
145
|
+
- spec/encoding_spec.rb
|
146
|
+
- spec/reader_spec.rb
|
147
|
+
- spec/result_spec.rb
|
148
|
+
- spec/spec_helper.rb
|
149
|
+
- spec/typecast/array_spec.rb
|
150
|
+
- spec/typecast/bigdecimal_spec.rb
|
151
|
+
- spec/typecast/boolean_spec.rb
|
152
|
+
- spec/typecast/byte_array_spec.rb
|
153
|
+
- spec/typecast/class_spec.rb
|
154
|
+
- spec/typecast/date_spec.rb
|
155
|
+
- spec/typecast/datetime_spec.rb
|
156
|
+
- spec/typecast/float_spec.rb
|
157
|
+
- spec/typecast/integer_spec.rb
|
158
|
+
- spec/typecast/nil_spec.rb
|
159
|
+
- spec/typecast/other_spec.rb
|
160
|
+
- spec/typecast/range_spec.rb
|
161
|
+
- spec/typecast/string_spec.rb
|
162
|
+
- spec/typecast/time_spec.rb
|
data/HISTORY.markdown
DELETED
data/Manifest.txt
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
.gitignore
|
2
|
-
HISTORY.markdown
|
3
|
-
LICENSE
|
4
|
-
Manifest.txt
|
5
|
-
README.markdown
|
6
|
-
Rakefile
|
7
|
-
autobuild.rb
|
8
|
-
buildfile
|
9
|
-
ext-java/src/main/java/DoPostgresExtService.java
|
10
|
-
ext-java/src/main/java/do_postgres/PostgresDriverDefinition.java
|
11
|
-
ext/do_postgres_ext/do_postgres_ext.c
|
12
|
-
ext/do_postgres_ext/extconf.rb
|
13
|
-
lib/do_postgres.rb
|
14
|
-
lib/do_postgres/transaction.rb
|
15
|
-
lib/do_postgres/version.rb
|
16
|
-
script/timezone_spec_runner.rb
|
17
|
-
script/timezones.txt
|
18
|
-
spec/command_spec.rb
|
19
|
-
spec/connection_spec.rb
|
20
|
-
spec/reader_spec.rb
|
21
|
-
spec/result_spec.rb
|
22
|
-
spec/spec.opts
|
23
|
-
spec/spec_helper.rb
|
24
|
-
spec/typecast/bigdecimal_spec.rb
|
25
|
-
spec/typecast/boolean_spec.rb
|
26
|
-
spec/typecast/byte_array_spec.rb
|
27
|
-
spec/typecast/class_spec.rb
|
28
|
-
spec/typecast/date_spec.rb
|
29
|
-
spec/typecast/datetime_spec.rb
|
30
|
-
spec/typecast/float_spec.rb
|
31
|
-
spec/typecast/integer_spec.rb
|
32
|
-
spec/typecast/nil_spec.rb
|
33
|
-
spec/typecast/string_spec.rb
|
34
|
-
spec/typecast/time_spec.rb
|