swift-db-sqlite3 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.3 (2012-09-09)
2
+
3
+ * ensure sql is stringified before sqlite3_prepare_v2
4
+
1
5
  == 0.1.2 (2012-07-28)
2
6
 
3
7
  * Fixed compiler warnings on i386.
@@ -18,17 +18,13 @@ lib_paths = %w(
18
18
  /sw/lib
19
19
  )
20
20
 
21
- def ensure_library name, lib_paths, hint = nil
22
- unless find_library(name, 'main', *lib_paths)
23
- puts $/, '#' * 80, hint, '#' * 80, $/ if hint
24
- raise "unable to find #{name}"
25
- end
26
- end
27
-
28
- find_header('sqlite3.h', *inc_paths) or raise 'unable to locate sqlite3 headers'
29
- find_header('uuid/uuid.h', *inc_paths) or raise 'unable to locate uuid headers'
30
-
31
- ensure_library 'sqlite3', lib_paths, 'please install sqlite3 development libraries'
32
- ensure_library 'uuid', lib_paths, 'please install uuid development libraries'
21
+ uuid_inc, uuid_lib = dir_config('uuid', '/usr/include/uuid', '/usr/lib')
22
+ sqlite3_inc, sqlite3_lib = dir_config('sqlite3')
23
+
24
+ find_header 'uuid/uuid.h', *inc_paths.dup.unshift(uuid_inc).compact
25
+ find_header 'sqlite3.h', *inc_paths.dup.unshift(sqlite3_inc).compact
26
+
27
+ find_library 'uuid', 'main', *lib_paths.dup.unshift(uuid_lib).compact
28
+ find_library 'sqlite3', 'main', *lib_paths.dup.unshift(sqlite3_lib).compact
33
29
 
34
30
  create_makefile('swift_db_sqlite3_ext')
@@ -53,6 +53,7 @@ VALUE db_sqlite3_statement_allocate(VALUE klass) {
53
53
  VALUE db_sqlite3_statement_initialize(VALUE self, VALUE adapter, VALUE sql) {
54
54
  Statement *s = db_sqlite3_statement_handle(self);
55
55
 
56
+ sql = TO_S(sql);
56
57
  s->s = 0;
57
58
  s->c = db_sqlite3_adapter_handle_safe(adapter)->connection;
58
59
  s->adapter = adapter;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swift-db-sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-29 00:00:00.000000000 Z
12
+ date: 2012-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -35,25 +35,25 @@ extensions:
35
35
  - ext/swift/db/sqlite3/extconf.rb
36
36
  extra_rdoc_files: []
37
37
  files:
38
+ - ext/swift/db/sqlite3/statement.c
38
39
  - ext/swift/db/sqlite3/adapter.c
39
- - ext/swift/db/sqlite3/common.c
40
40
  - ext/swift/db/sqlite3/datetime.c
41
- - ext/swift/db/sqlite3/main.c
42
- - ext/swift/db/sqlite3/result.c
43
- - ext/swift/db/sqlite3/statement.c
44
41
  - ext/swift/db/sqlite3/typecast.c
42
+ - ext/swift/db/sqlite3/result.c
43
+ - ext/swift/db/sqlite3/common.c
44
+ - ext/swift/db/sqlite3/main.c
45
45
  - ext/swift/db/sqlite3/adapter.h
46
- - ext/swift/db/sqlite3/common.h
47
- - ext/swift/db/sqlite3/datetime.h
48
- - ext/swift/db/sqlite3/result.h
49
46
  - ext/swift/db/sqlite3/statement.h
50
47
  - ext/swift/db/sqlite3/typecast.h
48
+ - ext/swift/db/sqlite3/common.h
49
+ - ext/swift/db/sqlite3/result.h
50
+ - ext/swift/db/sqlite3/datetime.h
51
51
  - ext/swift/db/sqlite3/extconf.rb
52
+ - test/test_encoding.rb
52
53
  - test/helper.rb
53
54
  - test/test_adapter.rb
54
- - test/test_encoding.rb
55
- - lib/swift-db-sqlite3.rb
56
55
  - lib/swift/db/sqlite3.rb
56
+ - lib/swift-db-sqlite3.rb
57
57
  - README.md
58
58
  - CHANGELOG
59
59
  homepage: http://github.com/deepfryed/swift-db-sqlite3
@@ -82,3 +82,4 @@ signing_key:
82
82
  specification_version: 3
83
83
  summary: Swift sqlite3 adapter
84
84
  test_files: []
85
+ has_rdoc: