do_postgres 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/Manifest.txt +15 -5
- data/Rakefile +7 -121
- data/ext/do_postgres_ext/do_postgres_ext.c +245 -108
- data/ext/do_postgres_ext/extconf.rb +3 -1
- data/lib/do_postgres.rb +5 -2
- data/lib/do_postgres/version.rb +1 -1
- data/spec/command_spec.rb +9 -0
- data/spec/connection_spec.rb +19 -0
- data/spec/encoding_spec.rb +8 -0
- data/spec/lib/rspec_immediate_feedback_formatter.rb +3 -0
- data/spec/reader_spec.rb +8 -0
- data/spec/result_spec.rb +86 -0
- data/spec/spec_helper.rb +90 -57
- data/spec/typecast/array_spec.rb +8 -0
- data/spec/typecast/bigdecimal_spec.rb +9 -0
- data/spec/typecast/boolean_spec.rb +9 -0
- data/spec/typecast/byte_array_spec.rb +8 -0
- data/spec/typecast/class_spec.rb +8 -0
- data/spec/typecast/date_spec.rb +9 -0
- data/spec/typecast/datetime_spec.rb +9 -0
- data/spec/typecast/float_spec.rb +9 -0
- data/spec/typecast/integer_spec.rb +8 -0
- data/spec/typecast/nil_spec.rb +10 -0
- data/spec/typecast/range_spec.rb +8 -0
- data/spec/typecast/string_spec.rb +8 -0
- data/spec/typecast/time_spec.rb +8 -0
- data/tasks/gem.rake +61 -0
- data/tasks/install.rake +15 -0
- data/tasks/native.rake +35 -0
- data/tasks/release.rake +75 -0
- data/tasks/retrieve.rake +79 -0
- data/tasks/spec.rake +18 -0
- metadata +72 -44
- data/.gitignore +0 -0
- data/autobuild.rb +0 -90
- data/buildfile +0 -27
- data/ext-java/src/main/java/DoPostgresExtService.java +0 -23
- data/ext-java/src/main/java/do_postgres/PostgresDriverDefinition.java +0 -12
- data/script/timezone_spec_runner.rb +0 -28
- data/script/timezones.txt +0 -562
- data/spec/integration/do_postgres_spec.rb +0 -312
- data/spec/integration/logging_spec.rb +0 -53
- data/spec/integration/quoting_spec.rb +0 -25
- data/spec/integration/timezone_spec.rb +0 -66
- data/spec/spec.opts +0 -2
- data/spec/unit/transaction_spec.rb +0 -28
data/spec/spec.opts
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper'
|
3
|
-
|
4
|
-
describe DataObjects::Postgres::Transaction do
|
5
|
-
|
6
|
-
before :each do
|
7
|
-
@connection = mock("connection")
|
8
|
-
DataObjects::Connection.should_receive(:new).with("mock://mock/mock").once.and_return(@connection)
|
9
|
-
@transaction = DataObjects::Postgres::Transaction.new("mock://mock/mock")
|
10
|
-
@transaction.id.replace("id")
|
11
|
-
@command = mock("command")
|
12
|
-
end
|
13
|
-
|
14
|
-
{
|
15
|
-
:begin => "BEGIN",
|
16
|
-
:commit => "COMMIT PREPARED 'id'",
|
17
|
-
:rollback => "ROLLBACK",
|
18
|
-
:rollback_prepared => "ROLLBACK PREPARED 'id'",
|
19
|
-
:prepare => "PREPARE TRANSACTION 'id'"
|
20
|
-
}.each do |method, command|
|
21
|
-
it "should execute #{command} on ##{method}" do
|
22
|
-
@command.should_receive(:execute_non_query).once
|
23
|
-
@connection.should_receive(:create_command).once.with(command).and_return(@command)
|
24
|
-
@transaction.send(method)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|