pg 0.11.0-x86-mingw32 → 0.12.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/ChangeLog +1647 -462
- data/Contributors.rdoc +39 -0
- data/History.rdoc +61 -0
- data/Manifest.txt +43 -0
- data/README.OS_X.rdoc +68 -0
- data/README.ja.rdoc +7 -0
- data/{README → README.rdoc} +38 -18
- data/{README.windows → README.windows.rdoc} +23 -31
- data/Rakefile +104 -318
- data/Rakefile.cross +234 -0
- data/ext/compat.c +2 -2
- data/ext/extconf.rb +10 -2
- data/ext/pg.c +223 -43
- data/ext/vc/pg.sln +26 -0
- data/ext/vc/pg_18/pg.vcproj +216 -0
- data/ext/vc/pg_19/pg_19.vcproj +209 -0
- data/lib/1.8/pg_ext.so +0 -0
- data/lib/1.9/pg_ext.so +0 -0
- data/lib/pg.rb +5 -7
- data/misc/openssl-pg-segfault.rb +31 -0
- data/sample/async_api.rb +109 -0
- data/sample/async_copyto.rb +39 -0
- data/sample/copyfrom.rb +81 -0
- data/sample/copyto.rb +19 -0
- data/sample/cursor.rb +21 -0
- data/sample/losample.rb +69 -0
- data/sample/notify_wait.rb +43 -0
- data/sample/psql.rb +1181 -0
- data/sample/psqlHelp.rb +158 -0
- data/sample/test1.rb +60 -0
- data/sample/test2.rb +44 -0
- data/sample/test4.rb +71 -0
- data/sample/test_binary_values.rb +35 -0
- data/spec/lib/helpers.rb +6 -4
- data/spec/m17n_spec.rb +2 -2
- data/spec/pgconn_spec.rb +51 -6
- data/spec/pgresult_spec.rb +30 -4
- metadata +147 -86
- data.tar.gz.sig +0 -3
- data/Contributors +0 -32
- data/README.OS_X +0 -19
- data/README.ja +0 -183
- data/Rakefile.local +0 -312
- data/rake/191_compat.rb +0 -26
- data/rake/dependencies.rb +0 -76
- data/rake/documentation.rb +0 -123
- data/rake/helpers.rb +0 -502
- data/rake/hg.rb +0 -318
- data/rake/manual.rb +0 -787
- data/rake/packaging.rb +0 -129
- data/rake/publishing.rb +0 -341
- data/rake/style.rb +0 -62
- data/rake/svn.rb +0 -668
- data/rake/testing.rb +0 -152
- data/rake/verifytask.rb +0 -64
- metadata.gz.sig +0 -3
data/rake/testing.rb
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Rake tasklib for testing tasks
|
3
|
-
|
4
|
-
#
|
5
|
-
# Authors:
|
6
|
-
# * Michael Granger <ged@FaerieMUD.org>
|
7
|
-
#
|
8
|
-
|
9
|
-
unless defined?( COVERAGE_MINIMUM )
|
10
|
-
if ENV['COVVERAGE_MINIMUM']
|
11
|
-
COVERAGE_MINIMUM = Float( ENV['COVERAGE_MINIMUM'] )
|
12
|
-
else
|
13
|
-
COVERAGE_MINIMUM = 85.0
|
14
|
-
end
|
15
|
-
end
|
16
|
-
SPEC_FILES = [] unless defined?( SPEC_FILES )
|
17
|
-
TEST_FILES = [] unless defined?( TEST_FILES )
|
18
|
-
|
19
|
-
COMMON_RSPEC_OPTS = [] unless defined?( COMMON_RSPEC_OPTS )
|
20
|
-
|
21
|
-
COVERAGE_TARGETDIR = BASEDIR + 'coverage' unless defined?( COVERAGE_TARGETDIR )
|
22
|
-
RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib' unless
|
23
|
-
defined?( RCOV_EXCLUDES )
|
24
|
-
|
25
|
-
|
26
|
-
desc "Run all defined tests"
|
27
|
-
task :test do
|
28
|
-
unless SPEC_FILES.empty?
|
29
|
-
log "Running specs"
|
30
|
-
Rake::Task['spec:quiet'].invoke
|
31
|
-
end
|
32
|
-
|
33
|
-
unless TEST_FILES.empty?
|
34
|
-
log "Running unit tests"
|
35
|
-
Rake::Task[:unittests].invoke
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
### RSpec specifications
|
41
|
-
begin
|
42
|
-
gem 'rspec', '>= 2.0.0'
|
43
|
-
|
44
|
-
require 'rspec'
|
45
|
-
require 'rspec/core/rake_task'
|
46
|
-
|
47
|
-
### Task: spec
|
48
|
-
desc "Run specs"
|
49
|
-
task :spec => 'spec:doc'
|
50
|
-
task :specs => :spec
|
51
|
-
|
52
|
-
namespace :spec do
|
53
|
-
desc "Run rspec every time there's a change to one of the files"
|
54
|
-
task :autotest do
|
55
|
-
require 'autotest'
|
56
|
-
Autotest.add_discovery { "rspec2" }
|
57
|
-
Autotest.run
|
58
|
-
end
|
59
|
-
|
60
|
-
desc "Generate regular color 'doc' spec output"
|
61
|
-
RSpec::Core::RakeTask.new( :doc ) do |task|
|
62
|
-
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'd', '-c']
|
63
|
-
end
|
64
|
-
|
65
|
-
desc "Generate spec output with profiling"
|
66
|
-
RSpec::Core::RakeTask.new( :profile ) do |task|
|
67
|
-
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'p', '-p']
|
68
|
-
end
|
69
|
-
|
70
|
-
desc "Generate quiet non-colored plain-text output"
|
71
|
-
RSpec::Core::RakeTask.new( :quiet ) do |task|
|
72
|
-
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'p']
|
73
|
-
end
|
74
|
-
|
75
|
-
desc "Generate HTML output"
|
76
|
-
RSpec::Core::RakeTask.new( :html ) do |task|
|
77
|
-
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'h']
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
|
-
end
|
82
|
-
|
83
|
-
### Task: coverage (via RCov)
|
84
|
-
desc "Build test coverage reports"
|
85
|
-
RSpec::Core::RakeTask.new( :coverage ) do |task|
|
86
|
-
task.ruby_opts = [ "-I#{LIBDIR}" ]
|
87
|
-
task.rspec_opts = ['-f', 'p', '-b']
|
88
|
-
task.rcov_opts = RCOV_OPTS
|
89
|
-
task.rcov = true
|
90
|
-
end
|
91
|
-
|
92
|
-
### Task: rcov
|
93
|
-
task :rcov => :coverage
|
94
|
-
|
95
|
-
### Other coverage tasks
|
96
|
-
namespace :coverage do
|
97
|
-
desc "Generate a detailed text coverage report"
|
98
|
-
RSpec::Core::RakeTask.new( :text ) do |task|
|
99
|
-
task.rcov_opts = RCOV_OPTS + ['--text-report']
|
100
|
-
task.rcov = true
|
101
|
-
end
|
102
|
-
|
103
|
-
desc "Show differences in coverage from last run"
|
104
|
-
RSpec::Core::RakeTask.new( :diff ) do |task|
|
105
|
-
task.rspec_opts = ['-f', 'p', '-b']
|
106
|
-
task.rcov_opts = RCOV_OPTS - ['--save'] + ['--text-coverage-diff']
|
107
|
-
task.rcov = true
|
108
|
-
end
|
109
|
-
|
110
|
-
desc "Run RCov in 'spec-only' mode to check coverage from specs"
|
111
|
-
RSpec::Core::RakeTask.new( :speconly ) do |task|
|
112
|
-
task.rcov_opts = ['--exclude', RCOV_EXCLUDES, '--text-report', '--save']
|
113
|
-
task.rcov = true
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
CLOBBER.include( COVERAGE_TARGETDIR )
|
118
|
-
rescue LoadError => err
|
119
|
-
task :no_rspec do
|
120
|
-
$stderr.puts "Specification tasks not defined: %s" % [ err.message ]
|
121
|
-
end
|
122
|
-
|
123
|
-
task :spec => :no_rspec
|
124
|
-
namespace :spec do
|
125
|
-
task :autotest => :no_rspec
|
126
|
-
task :doc => :no_rspec
|
127
|
-
task :profile => :no_rspec
|
128
|
-
task :quiet => :no_rspec
|
129
|
-
task :html => :no_rspec
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
|
134
|
-
### Test::Unit tests
|
135
|
-
begin
|
136
|
-
require 'rake/testtask'
|
137
|
-
|
138
|
-
Rake::TestTask.new( :unittests ) do |task|
|
139
|
-
task.libs += [LIBDIR]
|
140
|
-
task.test_files = TEST_FILES
|
141
|
-
task.verbose = true
|
142
|
-
end
|
143
|
-
|
144
|
-
rescue LoadError => err
|
145
|
-
task :no_test do
|
146
|
-
$stderr.puts "Test tasks not defined: %s" % [ err.message ]
|
147
|
-
end
|
148
|
-
|
149
|
-
task :unittests => :no_rspec
|
150
|
-
end
|
151
|
-
|
152
|
-
|
data/rake/verifytask.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
#####################################################################
|
2
|
-
### S U B V E R S I O N T A S K S A N D H E L P E R S
|
3
|
-
#####################################################################
|
4
|
-
|
5
|
-
require 'rake/tasklib'
|
6
|
-
|
7
|
-
#
|
8
|
-
# Work around the inexplicable behaviour of the original RDoc::VerifyTask, which
|
9
|
-
# errors if your coverage isn't *exactly* the threshold.
|
10
|
-
#
|
11
|
-
|
12
|
-
# A task that can verify that the RCov coverage doesn't
|
13
|
-
# drop below a certain threshold. It should be run after
|
14
|
-
# running Spec::Rake::SpecTask.
|
15
|
-
class VerifyTask < Rake::TaskLib
|
16
|
-
|
17
|
-
COVERAGE_PERCENTAGE_PATTERN =
|
18
|
-
%r{<tt class='coverage_code'>(\d+\.\d+)%</tt>}
|
19
|
-
|
20
|
-
# Name of the task. Defaults to :verify_rcov
|
21
|
-
attr_accessor :name
|
22
|
-
|
23
|
-
# Path to the index.html file generated by RCov, which
|
24
|
-
# is the file containing the total coverage.
|
25
|
-
# Defaults to 'coverage/index.html'
|
26
|
-
attr_accessor :index_html
|
27
|
-
|
28
|
-
# Whether or not to output details. Defaults to true.
|
29
|
-
attr_accessor :verbose
|
30
|
-
|
31
|
-
# The threshold value (in percent) for coverage. If the
|
32
|
-
# actual coverage is not equal to this value, the task will raise an
|
33
|
-
# exception.
|
34
|
-
attr_accessor :threshold
|
35
|
-
|
36
|
-
def initialize( name=:verify )
|
37
|
-
@name = name
|
38
|
-
@index_html = 'coverage/index.html'
|
39
|
-
@verbose = true
|
40
|
-
yield self if block_given?
|
41
|
-
raise "Threshold must be set" if @threshold.nil?
|
42
|
-
define
|
43
|
-
end
|
44
|
-
|
45
|
-
def define
|
46
|
-
desc "Verify that rcov coverage is at least #{threshold}%"
|
47
|
-
|
48
|
-
task @name do
|
49
|
-
total_coverage = nil
|
50
|
-
if match = File.read( index_html ).match( COVERAGE_PERCENTAGE_PATTERN )
|
51
|
-
total_coverage = Float( match[1] )
|
52
|
-
else
|
53
|
-
raise "Couldn't find the coverage percentage in #{index_html}"
|
54
|
-
end
|
55
|
-
|
56
|
-
puts "Coverage: #{total_coverage}% (threshold: #{threshold}%)" if verbose
|
57
|
-
if total_coverage < threshold
|
58
|
-
raise "Coverage must be at least #{threshold}% but was #{total_coverage}%"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
# vim: set nosta noet ts=4 sw=4:
|
metadata.gz.sig
DELETED