do_sqlite3 0.10.0-java → 0.10.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +32 -0
- data/LICENSE +1 -1
- data/README.markdown +101 -3
- data/Rakefile +56 -9
- data/ext/do_sqlite3/compat.h +55 -0
- data/ext/do_sqlite3/do_sqlite3.c +793 -0
- data/ext/do_sqlite3/error.h +106 -0
- data/ext/do_sqlite3/extconf.rb +26 -0
- data/lib/do_sqlite3.rb +19 -11
- data/lib/do_sqlite3/do_sqlite3.jar +0 -0
- data/lib/do_sqlite3/version.rb +1 -1
- data/spec/command_spec.rb +1 -1
- data/spec/connection_spec.rb +8 -6
- data/spec/reader_spec.rb +1 -1
- data/spec/result_spec.rb +3 -3
- data/spec/spec_helper.rb +19 -32
- data/spec/typecast/array_spec.rb +1 -1
- data/spec/typecast/bigdecimal_spec.rb +1 -1
- data/spec/typecast/boolean_spec.rb +1 -1
- data/spec/typecast/byte_array_spec.rb +1 -2
- data/spec/typecast/class_spec.rb +1 -1
- data/spec/typecast/date_spec.rb +1 -1
- data/spec/typecast/datetime_spec.rb +1 -1
- data/spec/typecast/float_spec.rb +2 -2
- data/spec/typecast/integer_spec.rb +1 -1
- data/spec/typecast/nil_spec.rb +4 -4
- data/spec/typecast/other_spec.rb +8 -0
- data/spec/typecast/range_spec.rb +1 -1
- data/spec/typecast/string_spec.rb +1 -1
- data/spec/typecast/time_spec.rb +1 -1
- data/tasks/compile.rake +64 -0
- data/tasks/release.rake +12 -71
- data/tasks/retrieve.rake +1 -1
- data/tasks/spec.rake +19 -15
- metadata +118 -107
- data/HISTORY.markdown +0 -22
- data/Manifest.txt +0 -31
- data/lib/do_sqlite3_ext.jar +0 -0
- data/spec/lib/rspec_immediate_feedback_formatter.rb +0 -3
- data/tasks/gem.rake +0 -8
- data/tasks/install.rake +0 -15
- data/tasks/native.rake +0 -35
data/spec/typecast/time_spec.rb
CHANGED
data/tasks/compile.rake
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
begin
|
2
|
+
gem 'rake-compiler', '~>0.7'
|
3
|
+
require 'rake/extensiontask'
|
4
|
+
require 'rake/javaextensiontask'
|
5
|
+
|
6
|
+
# Hack to avoid "allocator undefined for Proc" issue when unpacking Gems:
|
7
|
+
# gemspec provided by Jeweler uses Rake::FileList for files, test_files and
|
8
|
+
# extra_rdoc_files, and procs cannot be marshalled.
|
9
|
+
def gemspec
|
10
|
+
@clean_gemspec ||= eval("#{Rake.application.jeweler.gemspec.to_ruby}") # $SAFE = 3\n
|
11
|
+
end
|
12
|
+
|
13
|
+
Rake::ExtensionTask.new('do_sqlite3', gemspec) do |ext|
|
14
|
+
|
15
|
+
sqlite3_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'sqlite3'))
|
16
|
+
|
17
|
+
ext.lib_dir = "lib/#{gemspec.name}"
|
18
|
+
|
19
|
+
ext.cross_compile = true
|
20
|
+
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
|
21
|
+
ext.cross_config_options << "--with-sqlite3-dir=#{sqlite3_lib}"
|
22
|
+
|
23
|
+
ext.cross_compiling do |gemspec|
|
24
|
+
gemspec.post_install_message = <<-POST_INSTALL_MESSAGE
|
25
|
+
|
26
|
+
=============================================================================
|
27
|
+
|
28
|
+
You've installed the binary version of #{gemspec.name}.
|
29
|
+
It was built using Sqlite3 version #{BINARY_VERSION}.
|
30
|
+
It's recommended to use the exact same version to avoid potential issues.
|
31
|
+
|
32
|
+
At the time of building this gem, the necessary DLL files where available
|
33
|
+
in the following download:
|
34
|
+
|
35
|
+
http://www.sqlite.org/sqlitedll-#{BINARY_VERSION}.zip
|
36
|
+
|
37
|
+
You can put the sqlite3.dll available in this package in your Ruby bin
|
38
|
+
directory, for example C:\\Ruby\\bin
|
39
|
+
|
40
|
+
=============================================================================
|
41
|
+
|
42
|
+
POST_INSTALL_MESSAGE
|
43
|
+
end
|
44
|
+
|
45
|
+
# automatically add build options to avoid need of manual input
|
46
|
+
if RUBY_PLATFORM =~ /mswin|mingw/ then
|
47
|
+
ext.config_options << "--with-sqlite3-dir=#{sqlite3_lib}"
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
Rake::JavaExtensionTask.new('do_sqlite3', gemspec) do |ext|
|
53
|
+
ext.ext_dir = 'ext-java/src/main/java'
|
54
|
+
ext.lib_dir = "lib/#{gemspec.name}"
|
55
|
+
ext.debug = ENV.has_key?('DO_JAVA_DEBUG') && ENV['DO_JAVA_DEBUG']
|
56
|
+
ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
|
57
|
+
ext.java_compiling do |gem|
|
58
|
+
gem.add_dependency 'jdbc-sqlite3', '>=3.5.8'
|
59
|
+
gem.add_dependency 'do_jdbc', '0.10.1'
|
60
|
+
end
|
61
|
+
end
|
62
|
+
rescue LoadError
|
63
|
+
warn "To compile, install rake-compiler (gem install rake-compiler)"
|
64
|
+
end
|
data/tasks/release.rake
CHANGED
@@ -1,75 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
desc 'Builds all gems (native, binaries for JRuby and Windows)'
|
2
|
+
task :build_all do
|
3
|
+
`rake clean`
|
4
|
+
`rake build`
|
5
|
+
`rake java gem`
|
6
|
+
`rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1`
|
6
7
|
end
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
# compare versions to avoid mistakes
|
15
|
-
unless ver == GEM_SPEC.version.to_s then
|
16
|
-
fail "Version mismatch (supplied and specification versions differ)."
|
17
|
-
end
|
18
|
-
|
19
|
-
# no rubyforge project? no release for you!
|
20
|
-
if GEM_SPEC.rubyforge_project == 'TODO' or GEM_SPEC.rubyforge_project.nil? then
|
21
|
-
fail "Must define rubyforge_project in your gem specification."
|
22
|
-
end
|
23
|
-
|
24
|
-
# instantiate a RubyForge object
|
25
|
-
rf = RubyForge.new
|
26
|
-
|
27
|
-
# read project info and overview
|
28
|
-
notes = begin
|
29
|
-
r = File.read("README.markdown")
|
30
|
-
r.split(/^(.*\n\-+)/)[1..4].join.strip
|
31
|
-
rescue
|
32
|
-
warn "Missing README.markdown"
|
33
|
-
''
|
34
|
-
end
|
35
|
-
|
36
|
-
# read changes
|
37
|
-
changes = begin
|
38
|
-
h = File.read("HISTORY.markdown")
|
39
|
-
h.split(/^(##+ .*)/)[1..2].join.strip
|
40
|
-
rescue
|
41
|
-
warn "Missing HISTORY.markdown"
|
42
|
-
''
|
43
|
-
end
|
44
|
-
|
45
|
-
# build the configuration for the release
|
46
|
-
config = Hash.new
|
47
|
-
config["release_notes"] = notes
|
48
|
-
config["release_changes"] = changes
|
49
|
-
config["preformatted"] = true
|
50
|
-
|
51
|
-
# prepare configuration
|
52
|
-
rf.configure config
|
53
|
-
|
54
|
-
files = FileList["pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version}*.*"].to_a
|
55
|
-
fail "No files found for the release." if files.empty?
|
56
|
-
|
57
|
-
puts "Logging in RubyForge..."
|
58
|
-
rf.login
|
59
|
-
|
60
|
-
puts "Files to upload:"
|
61
|
-
files.each do |f|
|
62
|
-
puts " * #{f}"
|
63
|
-
end
|
64
|
-
|
65
|
-
puts "Releasing #{GEM_SPEC.name} version #{GEM_SPEC.version}..."
|
66
|
-
rf.add_release GEM_SPEC.rubyforge_project, GEM_SPEC.name, GEM_SPEC.version, *files
|
67
|
-
puts "Done."
|
68
|
-
end
|
69
|
-
#Rake::Task['release'].prerequisites.unshift('clean', 'cross', 'native')
|
70
|
-
else
|
71
|
-
warn "no GEM_SPEC is found or defined. 'release' task cannot work without it."
|
9
|
+
desc 'Release all gems (native, binaries for JRuby and Windows)'
|
10
|
+
task :release_all => :build_all do
|
11
|
+
Dir["pkg/do_sqlite3-#{DataObjects::Sqlite3::VERSION}*.gem"].each do |gem_path|
|
12
|
+
command = "gem push #{gem_path}"
|
13
|
+
puts "Executing #{command.inspect}:"
|
14
|
+
sh command
|
72
15
|
end
|
73
|
-
else
|
74
|
-
warn "rubyforge gem is required to generate releases, please install it (gem install rubyforge)."
|
75
16
|
end
|
data/tasks/retrieve.rake
CHANGED
data/tasks/spec.rake
CHANGED
@@ -1,19 +1,23 @@
|
|
1
|
-
|
2
|
-
require 'spec/rake/spectask'
|
1
|
+
require 'rake/testtask'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
spec_defaults = lambda do |spec|
|
4
|
+
spec.libs << 'lib' << 'spec'
|
5
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
6
|
+
spec.verbose = true
|
7
|
+
end
|
8
|
+
|
9
|
+
Rake::TestTask.new(:spec => [ :clean, :compile ], &spec_defaults)
|
10
|
+
Rake::TestTask.new(:spec_no_compile, &spec_defaults)
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
begin
|
13
|
+
require 'rcov/rcovtask'
|
14
|
+
Rcov::RcovTask.new do |spec|
|
15
|
+
spec.libs << 'spec'
|
16
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
17
|
+
spec.verbose = true
|
18
|
+
end
|
19
|
+
rescue LoadError
|
20
|
+
task :rcov do
|
21
|
+
abort 'RCov is not available. In order to run rcov, you must: gem install rcov'
|
18
22
|
end
|
19
23
|
end
|
metadata
CHANGED
@@ -1,41 +1,86 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
3
|
-
requirements:
|
4
|
-
- - '>='
|
5
|
-
- !ruby/object:Gem::Version
|
6
|
-
version: "0"
|
7
|
-
version:
|
8
|
-
email: d.bussink@gmail.com
|
9
|
-
cert_chain: []
|
10
|
-
|
11
|
-
summary: DataObjects Sqlite3 Driver
|
12
|
-
post_install_message:
|
13
|
-
extra_rdoc_files: []
|
14
|
-
|
15
|
-
homepage: http://github.com/datamapper/do
|
16
|
-
signing_key:
|
17
2
|
name: do_sqlite3
|
18
|
-
|
19
|
-
|
20
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.1
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- Dirkjan Bussink
|
21
8
|
autorequire:
|
22
|
-
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
23
11
|
|
12
|
+
date: 2010-01-09 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: data_objects
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.10.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bacon
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "1.1"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake-compiler
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0.7"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: jdbc-sqlite3
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 3.5.8
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: do_jdbc
|
57
|
+
type: :runtime
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.10.1
|
64
|
+
version:
|
65
|
+
description: Implements the DataObjects API for Sqlite3
|
66
|
+
email: d.bussink@gmail.com
|
24
67
|
executables: []
|
25
68
|
|
26
|
-
|
27
|
-
|
28
|
-
|
69
|
+
extensions: []
|
70
|
+
|
71
|
+
extra_rdoc_files:
|
72
|
+
- README.markdown
|
73
|
+
- ChangeLog.markdown
|
74
|
+
- LICENSE
|
29
75
|
files:
|
30
|
-
- lib/do_sqlite3.rb
|
31
76
|
- lib/do_sqlite3/transaction.rb
|
32
77
|
- lib/do_sqlite3/version.rb
|
78
|
+
- lib/do_sqlite3.rb
|
33
79
|
- spec/command_spec.rb
|
34
80
|
- spec/connection_spec.rb
|
35
81
|
- spec/reader_spec.rb
|
36
82
|
- spec/result_spec.rb
|
37
83
|
- spec/spec_helper.rb
|
38
|
-
- spec/lib/rspec_immediate_feedback_formatter.rb
|
39
84
|
- spec/typecast/array_spec.rb
|
40
85
|
- spec/typecast/bigdecimal_spec.rb
|
41
86
|
- spec/typecast/boolean_spec.rb
|
@@ -46,102 +91,68 @@ files:
|
|
46
91
|
- spec/typecast/float_spec.rb
|
47
92
|
- spec/typecast/integer_spec.rb
|
48
93
|
- spec/typecast/nil_spec.rb
|
94
|
+
- spec/typecast/other_spec.rb
|
49
95
|
- spec/typecast/range_spec.rb
|
50
96
|
- spec/typecast/string_spec.rb
|
51
97
|
- spec/typecast/time_spec.rb
|
52
|
-
- tasks/
|
53
|
-
- tasks/install.rake
|
54
|
-
- tasks/native.rake
|
98
|
+
- tasks/compile.rake
|
55
99
|
- tasks/release.rake
|
56
100
|
- tasks/retrieve.rake
|
57
101
|
- tasks/spec.rake
|
102
|
+
- ext/do_sqlite3/extconf.rb
|
103
|
+
- ext/do_sqlite3/do_sqlite3.c
|
104
|
+
- ext/do_sqlite3/compat.h
|
105
|
+
- ext/do_sqlite3/error.h
|
58
106
|
- LICENSE
|
59
107
|
- Rakefile
|
60
|
-
-
|
108
|
+
- ChangeLog.markdown
|
61
109
|
- README.markdown
|
62
|
-
-
|
63
|
-
|
110
|
+
- lib/do_sqlite3/do_sqlite3.jar
|
111
|
+
has_rdoc: false
|
112
|
+
homepage:
|
113
|
+
licenses: []
|
114
|
+
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options:
|
117
|
+
- --charset=UTF-8
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: "0"
|
125
|
+
version:
|
64
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
127
|
requirements:
|
66
|
-
- -
|
128
|
+
- - ">="
|
67
129
|
- !ruby/object:Gem::Version
|
68
130
|
version: "0"
|
69
131
|
version:
|
70
|
-
extensions: []
|
71
|
-
|
72
|
-
rubygems_version: 1.3.3
|
73
132
|
requirements: []
|
74
133
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
-
|
85
|
-
|
86
|
-
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 0.9.12
|
102
|
-
version:
|
103
|
-
type: :runtime
|
104
|
-
version_requirement:
|
105
|
-
name: extlib
|
106
|
-
- !ruby/object:Gem::Dependency
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: 0.10.0
|
112
|
-
version:
|
113
|
-
type: :runtime
|
114
|
-
version_requirement:
|
115
|
-
name: data_objects
|
116
|
-
- !ruby/object:Gem::Dependency
|
117
|
-
version_requirements: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - '>='
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: 3.5.8
|
122
|
-
version:
|
123
|
-
type: :runtime
|
124
|
-
version_requirement:
|
125
|
-
name: jdbc-sqlite3
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 0.10.0
|
132
|
-
version:
|
133
|
-
type: :runtime
|
134
|
-
version_requirement:
|
135
|
-
name: do_jdbc
|
136
|
-
- !ruby/object:Gem::Dependency
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: 1.2.0
|
142
|
-
version:
|
143
|
-
type: :development
|
144
|
-
version_requirement:
|
145
|
-
name: rspec
|
146
|
-
bindir: bin
|
147
|
-
has_rdoc: true
|
134
|
+
rubyforge_project: dorb
|
135
|
+
rubygems_version: 1.3.5
|
136
|
+
signing_key:
|
137
|
+
specification_version: 3
|
138
|
+
summary: DataObjects Sqlite3 Driver
|
139
|
+
test_files:
|
140
|
+
- spec/command_spec.rb
|
141
|
+
- spec/connection_spec.rb
|
142
|
+
- spec/reader_spec.rb
|
143
|
+
- spec/result_spec.rb
|
144
|
+
- spec/spec_helper.rb
|
145
|
+
- spec/typecast/array_spec.rb
|
146
|
+
- spec/typecast/bigdecimal_spec.rb
|
147
|
+
- spec/typecast/boolean_spec.rb
|
148
|
+
- spec/typecast/byte_array_spec.rb
|
149
|
+
- spec/typecast/class_spec.rb
|
150
|
+
- spec/typecast/date_spec.rb
|
151
|
+
- spec/typecast/datetime_spec.rb
|
152
|
+
- spec/typecast/float_spec.rb
|
153
|
+
- spec/typecast/integer_spec.rb
|
154
|
+
- spec/typecast/nil_spec.rb
|
155
|
+
- spec/typecast/other_spec.rb
|
156
|
+
- spec/typecast/range_spec.rb
|
157
|
+
- spec/typecast/string_spec.rb
|
158
|
+
- spec/typecast/time_spec.rb
|