do_postgres 0.10.12 → 0.10.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 162f451acd048e1a31af6dc23e0245210f285e11
4
+ data.tar.gz: d613d93286d5768cd1f4415dac896bb77417a25e
5
+ SHA512:
6
+ metadata.gz: 4cc69ee0a7937b41549e2d5826bdcde1e1161b300880fc4029521bae1f08d8e5b1c2f21692346b0b5ca046d4943aac75d94a24d7da31af17b7dd09d03a909b07
7
+ data.tar.gz: e70729f62d37f272394c93c8ab8aa8e06972f1adc49b15fd1c51c369555d26ef4364b4127e77c9e974b4018c8c191d8dfd5b80f425d2fd309a0dae4df5517bc4
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.10.13 2013-05-27
2
+
3
+ * Fix segfault on invalid API usage
4
+ * Windows binary for Ruby 2.0
5
+
1
6
  ## 0.10.12 2013-01-21
2
7
 
3
8
  * jdbc-postgres driver loading fix
data/README.markdown CHANGED
@@ -14,14 +14,16 @@ This driver implements the DataObjects API for the PostgreSQL relational databas
14
14
 
15
15
  An example of usage:
16
16
 
17
- # default user (postgres, postgres), default port (5432)
18
- DataObjects::Connection.new("postgres://host/database")
19
- # specified user, specified port
20
- DataObjects::Connection.new("postgres://user:pass@host:8888/database")
17
+ ```ruby
18
+ # default user (postgres, postgres), default port (5432)
19
+ DataObjects::Connection.new("postgres://host/database")
20
+ # specified user, specified port
21
+ DataObjects::Connection.new("postgres://user:pass@host:8888/database")
21
22
 
22
- @connection = DataObjects::Connection.new("postgres://localhost/employees")
23
- @reader = @connection.create_command('SELECT * FROM users').execute_reader
24
- @reader.next!
23
+ @connection = DataObjects::Connection.new("postgres://localhost/employees")
24
+ @reader = @connection.create_command('SELECT * FROM users').execute_reader
25
+ @reader.next!
26
+ ```
25
27
 
26
28
  ## Requirements
27
29
 
@@ -38,7 +40,9 @@ Additionally you should have the following prerequisites:
38
40
 
39
41
  To install the gem:
40
42
 
41
- gem install do_postgres
43
+ ```ruby
44
+ gem install do_postgres
45
+ ```
42
46
 
43
47
  To compile and install from source:
44
48
 
@@ -59,15 +63,15 @@ To compile and install from source:
59
63
  * Run `rake-compiler cross-ruby`.
60
64
  * Run `rake-compiler update-config`.
61
65
 
62
- * For JRuby extensions:
63
- * Install the Java Development Kit (provided if you are
64
- on a recent version of Mac OS X) from <http://java.sun.com>.
65
- * Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
66
- you have configured the `JRUBY_HOME` environment variable to point to your
67
- JRuby installation.
68
- * Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
66
+ * For JRuby extensions:
67
+ * Install the Java Development Kit (provided if you are
68
+ on a recent version of Mac OS X) from <http://java.sun.com>.
69
+ * Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
70
+ you have configured the `JRUBY_HOME` environment variable to point to your
71
+ JRuby installation.
72
+ * Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
69
73
 
70
- * Then, install this driver with `(jruby -S) rake install`.
74
+ * Then, install this driver with `(jruby -S) rake install`.
71
75
 
72
76
  For more information, see the PostgreSQL driver wiki page:
73
77
  <http://wiki.github.com/datamapper/do/postgresql>.
@@ -545,7 +545,8 @@ VALUE do_postgres_cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
545
545
  PGconn *db = DATA_PTR(postgres_connection);
546
546
  PGresult *response = do_postgres_cCommand_execute(self, connection, db, query);
547
547
 
548
- if (PQresultStatus(response) != PGRES_TUPLES_OK) {
548
+ int status = PQresultStatus(response);
549
+ if(status != PGRES_TUPLES_OK && status != PGRES_COMMAND_OK) {
549
550
  do_postgres_raise_error(self, response, query);
550
551
  }
551
552
 
@@ -565,8 +566,7 @@ VALUE do_postgres_cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
565
566
  if (field_types == Qnil || 0 == RARRAY_LEN(field_types)) {
566
567
  field_types = rb_ary_new();
567
568
  infer_types = 1;
568
- }
569
- else if (RARRAY_LEN(field_types) != field_count) {
569
+ } else if (RARRAY_LEN(field_types) != field_count) {
570
570
  // Whoops... wrong number of types passed to set_types. Close the reader and raise
571
571
  // and error
572
572
  rb_funcall(reader, rb_intern("close"), 0);
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Postgres
3
- VERSION = '0.10.12'
3
+ VERSION = '0.10.13'
4
4
  end
5
5
  end
data/tasks/compile.rake CHANGED
@@ -70,7 +70,7 @@ begin
70
70
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
71
71
  ext.java_compiling do |gem|
72
72
  gem.add_dependency 'jdbc-postgres', '>=8.2'
73
- gem.add_dependency 'do_jdbc', '0.10.12'
73
+ gem.add_dependency 'do_jdbc', '0.10.13'
74
74
  end
75
75
  end
76
76
  rescue LoadError
data/tasks/release.rake CHANGED
@@ -3,7 +3,7 @@ task :build_all do
3
3
  `rake clean`
4
4
  `rake build`
5
5
  `rake java gem`
6
- `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2`
6
+ `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0`
7
7
  end
8
8
 
9
9
  desc 'Release all gems (native, binaries for JRuby and Windows)'
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_postgres
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 10
8
- - 12
9
- version: 0.10.12
4
+ version: 0.10.13
10
5
  platform: ruby
11
6
  authors:
12
7
  - Dirkjan Bussink
@@ -14,8 +9,7 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2013-01-21 00:00:00 +01:00
18
- default_executable:
12
+ date: 2013-05-27 00:00:00 Z
19
13
  dependencies:
20
14
  - !ruby/object:Gem::Dependency
21
15
  name: data_objects
@@ -24,11 +18,7 @@ dependencies:
24
18
  requirements:
25
19
  - - "="
26
20
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 10
30
- - 12
31
- version: 0.10.12
21
+ version: 0.10.13
32
22
  type: :runtime
33
23
  version_requirements: *id001
34
24
  - !ruby/object:Gem::Dependency
@@ -38,9 +28,6 @@ dependencies:
38
28
  requirements:
39
29
  - - ~>
40
30
  - !ruby/object:Gem::Version
41
- segments:
42
- - 2
43
- - 5
44
31
  version: "2.5"
45
32
  type: :development
46
33
  version_requirements: *id002
@@ -51,9 +38,6 @@ dependencies:
51
38
  requirements:
52
39
  - - ~>
53
40
  - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- - 7
57
41
  version: "0.7"
58
42
  type: :development
59
43
  version_requirements: *id003
@@ -108,10 +92,11 @@ files:
108
92
  - tasks/release.rake
109
93
  - tasks/retrieve.rake
110
94
  - tasks/spec.rake
111
- has_rdoc: true
112
95
  homepage:
113
96
  licenses: []
114
97
 
98
+ metadata: {}
99
+
115
100
  post_install_message:
116
101
  rdoc_options: []
117
102
 
@@ -119,22 +104,17 @@ require_paths:
119
104
  - lib
120
105
  required_ruby_version: !ruby/object:Gem::Requirement
121
106
  requirements:
122
- - - ">="
107
+ - &id004
108
+ - ">="
123
109
  - !ruby/object:Gem::Version
124
- segments:
125
- - 0
126
110
  version: "0"
127
111
  required_rubygems_version: !ruby/object:Gem::Requirement
128
112
  requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- segments:
132
- - 0
133
- version: "0"
113
+ - *id004
134
114
  requirements: []
135
115
 
136
116
  rubyforge_project: dorb
137
- rubygems_version: 1.3.6
117
+ rubygems_version: 2.0.3
138
118
  signing_key:
139
119
  specification_version: 3
140
120
  summary: DataObjects PostgreSQL Driver