sqlite3 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ require "helper"
2
+
3
+ class TestDatabaseQueries < Test::Unit::TestCase
4
+ def setup
5
+ @db_filename = "test_database.db"
6
+ File.delete(@db_filename) if File.exists?(@db_filename)
7
+ @db = SQLite3::Database.new(@db_filename)
8
+ @db.execute("CREATE TABLE t1(id INTEGER PRIMARY KEY ASC, t TEXT, nu NUMERIC, i INTEGER, no BLOB)")
9
+ end
10
+
11
+ def teardown
12
+ File.delete(@db_filename) if File.exists?(@db_filename)
13
+ end
14
+
15
+ def test_tables_empty
16
+ assert_equal [], @db.execute("SELECT * FROM t1")
17
+ end
18
+
19
+ def test_insert_and_select
20
+ @db.execute("INSERT INTO t1 VALUES(NULL, 'text1', 1.22, 42, NULL)")
21
+ rows = @db.execute("SELECT * FROM t1")
22
+ assert_equal 1, rows.size
23
+ row = rows[0]
24
+ assert_equal "text1", row[1]
25
+ assert_equal "1.22", row[2]
26
+ assert_equal "42", row[3]
27
+ assert_nil row[4]
28
+ end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jakub Ku\xC5\xBAma"
@@ -9,20 +9,20 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-08 00:00:00 +01:00
12
+ date: 2009-11-17 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: thoughtbot-shoulda
16
+ name: test-unit
17
17
  type: :development
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
23
+ version: "2.0"
24
24
  version:
25
- description: SQLite3 bindings to Ruby 1.8/1.9
25
+ description: SQLite3/Ruby FFI bindings
26
26
  email: qoobaa@gmail.com
27
27
  executables: []
28
28
 
@@ -37,14 +37,33 @@ files:
37
37
  - LICENSE
38
38
  - README.rdoc
39
39
  - Rakefile
40
+ - VERSION
40
41
  - lib/sqlite3.rb
42
+ - lib/sqlite3/constants.rb
43
+ - lib/sqlite3/database.rb
44
+ - lib/sqlite3/driver/ffi/api.rb
45
+ - lib/sqlite3/driver/ffi/driver.rb
46
+ - lib/sqlite3/errors.rb
47
+ - lib/sqlite3/pragmas.rb
48
+ - lib/sqlite3/resultset.rb
49
+ - lib/sqlite3/statement.rb
50
+ - lib/sqlite3/translator.rb
51
+ - lib/sqlite3/value.rb
52
+ - lib/sqlite3/version.rb
41
53
  - test/helper.rb
42
- - test/test_sqlite3.rb
54
+ - test/test_database_initialization.rb
55
+ - test/test_database_queries.rb
43
56
  has_rdoc: true
44
57
  homepage: http://github.com/qoobaa/sqlite3
45
58
  licenses: []
46
59
 
47
- post_install_message:
60
+ post_install_message: |+
61
+
62
+ WARNING!
63
+
64
+ This is an early alpha version of SQLite3/Ruby FFI bindings!
65
+ If you need native, production ready bindings install sqlite3-ruby instead.
66
+
48
67
  rdoc_options:
49
68
  - --charset=UTF-8
50
69
  require_paths:
@@ -67,7 +86,8 @@ rubyforge_project:
67
86
  rubygems_version: 1.3.5
68
87
  signing_key:
69
88
  specification_version: 3
70
- summary: SQLite3 bindings to Ruby 1.8/1.9
89
+ summary: SQLite3/Ruby FFI bindings
71
90
  test_files:
72
- - test/test_sqlite3.rb
73
91
  - test/helper.rb
92
+ - test/test_database_queries.rb
93
+ - test/test_database_initialization.rb
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestSqlite3 < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end