do_h2 0.10.3-java → 0.10.4-java
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.
- data/ChangeLog.markdown +13 -0
- data/LICENSE +1 -1
- data/README.markdown +2 -5
- data/Rakefile +8 -39
- data/lib/do_h2.rb +9 -5
- data/lib/do_h2/do_h2.jar +0 -0
- data/lib/do_h2/version.rb +1 -1
- data/spec/command_spec.rb +3 -3
- data/spec/connection_spec.rb +10 -10
- data/spec/encoding_spec.rb +2 -2
- data/spec/reader_spec.rb +2 -2
- data/spec/result_spec.rb +4 -4
- data/spec/spec_helper.rb +11 -10
- data/spec/typecast/array_spec.rb +2 -2
- data/spec/typecast/bigdecimal_spec.rb +3 -3
- data/spec/typecast/boolean_spec.rb +3 -3
- data/spec/typecast/byte_array_spec.rb +2 -2
- data/spec/typecast/class_spec.rb +2 -2
- data/spec/typecast/date_spec.rb +3 -3
- data/spec/typecast/datetime_spec.rb +3 -3
- data/spec/typecast/float_spec.rb +3 -3
- data/spec/typecast/integer_spec.rb +2 -2
- data/spec/typecast/nil_spec.rb +4 -4
- data/spec/typecast/other_spec.rb +2 -2
- data/spec/typecast/range_spec.rb +2 -2
- data/spec/typecast/string_spec.rb +2 -2
- data/spec/typecast/time_spec.rb +2 -2
- data/tasks/compile.rake +1 -4
- data/tasks/spec.rake +8 -19
- metadata +33 -33
data/ChangeLog.markdown
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 0.10.4 2011-04-28
|
|
2
|
+
|
|
3
|
+
New features
|
|
4
|
+
* Add save point to transactions (all)
|
|
5
|
+
* JRuby 1.9 mode support (encodings etc.)
|
|
6
|
+
|
|
7
|
+
Bugfixes
|
|
8
|
+
* Fix bug when using nested transactions in concurrent scenarios (all)
|
|
9
|
+
* Use column aliases instead of names (jruby)
|
|
10
|
+
|
|
11
|
+
Other
|
|
12
|
+
* Switch back to RSpec
|
|
13
|
+
|
|
1
14
|
## 0.10.3 2011-01-30
|
|
2
15
|
* No changes
|
|
3
16
|
|
data/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c) 2008 -
|
|
1
|
+
Copyright (c) 2008 - 2011 Alex Coles, Ikonoklastik Productions
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.markdown
CHANGED
|
@@ -53,7 +53,7 @@ For more information, see the H2 driver wiki page:
|
|
|
53
53
|
## Developers
|
|
54
54
|
|
|
55
55
|
Follow the above installation instructions. Additionally, you'll need:
|
|
56
|
-
* `
|
|
56
|
+
* `rspec` gem for running specs.
|
|
57
57
|
* `YARD` gem for generating documentation.
|
|
58
58
|
|
|
59
59
|
See the DataObjects wiki for more comprehensive information:
|
|
@@ -69,10 +69,7 @@ To run specs without compiling extensions first:
|
|
|
69
69
|
|
|
70
70
|
To run individual specs:
|
|
71
71
|
|
|
72
|
-
jruby -S rake spec
|
|
73
|
-
|
|
74
|
-
(Note that the `rake` task uses a `TEST` parameter, not `SPEC`. This is because
|
|
75
|
-
the `Rake::TestTask` is used for executing the Bacon specs).
|
|
72
|
+
jruby -S rake spec SPEC=spec/connection_spec.rb
|
|
76
73
|
|
|
77
74
|
## License
|
|
78
75
|
|
data/Rakefile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require 'pathname'
|
|
2
|
-
require '
|
|
2
|
+
require 'bundler'
|
|
3
|
+
Bundler::GemHelper.install_tasks
|
|
4
|
+
|
|
3
5
|
require 'rake'
|
|
4
6
|
require 'rake/clean'
|
|
5
7
|
|
|
@@ -14,41 +16,8 @@ SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
|
|
|
14
16
|
|
|
15
17
|
CLEAN.include(%w[ {tmp,pkg}/ **/*.{o,so,bundle,jar,log,a,gem,dSYM,obj,pdb,exp,DS_Store,rbc,db} ext-java/target ])
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
gem.name = 'do_h2'
|
|
23
|
-
gem.version = DataObjects::H2::VERSION
|
|
24
|
-
gem.summary = 'DataObjects H2 Driver'
|
|
25
|
-
gem.description = 'Implements the DataObjects API for H2'
|
|
26
|
-
gem.platform = 'java'
|
|
27
|
-
gem.files = FileList['lib/**/*.rb', 'spec/**/*.rb', 'tasks/**/*.rake',
|
|
28
|
-
'LICENSE', 'Rakefile', '*.{markdown,rdoc,txt,yml}',
|
|
29
|
-
'lib/*.jar']
|
|
30
|
-
gem.extra_rdoc_files = FileList['README*', 'ChangeLog*', 'LICENSE']
|
|
31
|
-
gem.test_files = FileList['spec/**/*.rb']
|
|
32
|
-
|
|
33
|
-
gem.add_dependency 'data_objects', DataObjects::H2::VERSION
|
|
34
|
-
gem.add_dependency 'do_jdbc', DataObjects::H2::VERSION
|
|
35
|
-
gem.add_dependency 'jdbc-h2', '~>1.1.107'
|
|
36
|
-
|
|
37
|
-
gem.add_development_dependency 'bacon', '~>1.1'
|
|
38
|
-
gem.add_development_dependency 'rake-compiler', '~>0.7'
|
|
39
|
-
|
|
40
|
-
gem.has_rdoc = false
|
|
41
|
-
gem.rubyforge_project = 'dorb'
|
|
42
|
-
gem.authors = [ 'Alex Coles' ]
|
|
43
|
-
gem.email = 'alex@alexbcoles.com'
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
Rake::Task['build'].clear_actions if Rake::Task.task_defined?('build')
|
|
47
|
-
task :build => [ :java, :gem ]
|
|
48
|
-
|
|
49
|
-
Jeweler::GemcutterTasks.new
|
|
50
|
-
|
|
51
|
-
FileList['tasks/**/*.rake'].each { |task| import task }
|
|
52
|
-
rescue LoadError
|
|
53
|
-
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
|
54
|
-
end
|
|
19
|
+
|
|
20
|
+
Rake::Task['build'].clear_actions if Rake::Task.task_defined?('build')
|
|
21
|
+
task :build => [ :java, :gem ]
|
|
22
|
+
|
|
23
|
+
FileList['tasks/**/*.rake'].each { |task| import task }
|
data/lib/do_h2.rb
CHANGED
|
@@ -4,20 +4,24 @@ if RUBY_PLATFORM =~ /java/
|
|
|
4
4
|
require 'do_jdbc'
|
|
5
5
|
require 'java'
|
|
6
6
|
|
|
7
|
+
module DataObjects
|
|
8
|
+
module H2
|
|
9
|
+
JDBC_DRIVER = 'org.h2.Driver'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
java.lang.Thread.currentThread.getContextClassLoader().loadClass(driver, true)
|
|
13
|
+
begin
|
|
14
|
+
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::H2::JDBC_DRIVER, true)
|
|
11
15
|
rescue
|
|
12
16
|
require 'jdbc/h2' # the JDBC driver, packaged as a gem
|
|
13
|
-
|
|
17
|
+
end
|
|
14
18
|
|
|
15
19
|
require 'do_h2/do_h2' # the Java extension for this DO driver
|
|
16
20
|
|
|
17
21
|
# Another way of loading the JDBC Class. This seems to be more reliable
|
|
18
22
|
# than Class.forName() within the data_objects.Connection Java class,
|
|
19
23
|
# which is currently not working as expected.
|
|
20
|
-
java_import
|
|
24
|
+
java_import DataObjects::H2::JDBC_DRIVER
|
|
21
25
|
|
|
22
26
|
else
|
|
23
27
|
warn "do_h2 is only for use with JRuby"
|
data/lib/do_h2/do_h2.jar
CHANGED
|
Binary file
|
data/lib/do_h2/version.rb
CHANGED
data/spec/command_spec.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/command_spec'
|
|
4
|
+
require 'data_objects/spec/shared/command_spec'
|
|
5
5
|
|
|
6
6
|
describe DataObjects::H2::Command do
|
|
7
|
-
|
|
8
|
-
#
|
|
7
|
+
it_should_behave_like 'a Command'
|
|
8
|
+
# it_should_behave_like 'a Command with async'
|
|
9
9
|
end
|
data/spec/connection_spec.rb
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/connection_spec'
|
|
4
|
+
require 'data_objects/spec/shared/connection_spec'
|
|
5
5
|
|
|
6
6
|
describe DataObjects::H2::Connection do
|
|
7
7
|
|
|
8
|
-
before do
|
|
9
|
-
@driver
|
|
10
|
-
@user
|
|
8
|
+
before :all do
|
|
9
|
+
@driver = 'h2'
|
|
10
|
+
@user = ''
|
|
11
11
|
@password = ''
|
|
12
|
-
@host
|
|
13
|
-
@port
|
|
12
|
+
@host = ''
|
|
13
|
+
@port = ''
|
|
14
14
|
@database = "#{File.expand_path(File.dirname(__FILE__))}/test.db"
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
it_should_behave_like 'a Connection'
|
|
18
|
+
#it_should_behave_like 'a Connection with authentication support'
|
|
19
|
+
it_should_behave_like 'a Connection with JDBC URL support'
|
|
20
|
+
it_should_behave_like 'a Connection via JDNI'
|
|
21
21
|
end
|
data/spec/encoding_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/encoding_spec'
|
|
4
|
+
require 'data_objects/spec/shared/encoding_spec'
|
|
5
5
|
|
|
6
6
|
describe DataObjects::H2::Connection do
|
|
7
|
-
#
|
|
7
|
+
#it_should_behave_like 'a driver supporting different encodings'
|
|
8
8
|
end
|
data/spec/reader_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/reader_spec'
|
|
4
|
+
require 'data_objects/spec/shared/reader_spec'
|
|
5
5
|
|
|
6
6
|
describe DataObjects::H2::Reader do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'a Reader'
|
|
8
8
|
end
|
data/spec/result_spec.rb
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/result_spec'
|
|
4
|
+
require 'data_objects/spec/shared/result_spec'
|
|
5
5
|
|
|
6
6
|
# splitting the descibe into two separate declaration avoids
|
|
7
|
-
# concurrent execution of the "
|
|
7
|
+
# concurrent execution of the "it_should_behave_like ....."
|
|
8
8
|
# needed by some databases (sqlite3)
|
|
9
9
|
|
|
10
10
|
describe DataObjects::H2::Result do
|
|
11
|
-
|
|
11
|
+
it_should_behave_like 'a Result'
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
describe DataObjects::H2::Result do
|
|
15
|
-
|
|
15
|
+
it_should_behave_like 'a Result which returns inserted key with sequences'
|
|
16
16
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -2,6 +2,7 @@ $TESTING=true
|
|
|
2
2
|
JRUBY = true
|
|
3
3
|
|
|
4
4
|
require 'rubygems'
|
|
5
|
+
require 'rspec'
|
|
5
6
|
require 'date'
|
|
6
7
|
require 'ostruct'
|
|
7
8
|
require 'fileutils'
|
|
@@ -18,21 +19,18 @@ repo_root = File.expand_path('../../..', __FILE__)
|
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
require 'data_objects'
|
|
21
|
-
require 'data_objects/spec/
|
|
22
|
+
require 'data_objects/spec/setup'
|
|
23
|
+
require 'data_objects/spec/lib/pending_helpers'
|
|
22
24
|
require 'do_h2'
|
|
23
25
|
|
|
24
26
|
DataObjects::H2.logger = DataObjects::Logger.new(STDOUT, :off)
|
|
25
27
|
at_exit { DataObjects.logger.flush }
|
|
26
28
|
|
|
27
|
-
CONFIG = OpenStruct.new
|
|
28
|
-
# CONFIG.scheme = 'h2'
|
|
29
|
-
# CONFIG.user = ENV['DO_H2_USER'] || 'h2'
|
|
30
|
-
# CONFIG.pass = ENV['DO_H2_PASS'] || ''
|
|
31
|
-
# CONFIG.host = ENV['DO_H2_HOST'] || ''
|
|
32
|
-
# CONFIG.port = ENV['DO_H2_PORT'] || ''
|
|
33
|
-
# CONFIG.database = ENV['DO_H2_DATABASE'] || "#{File.expand_path(File.dirname(__FILE__))}/testdb"
|
|
34
29
|
|
|
35
|
-
CONFIG
|
|
30
|
+
CONFIG = OpenStruct.new
|
|
31
|
+
CONFIG.uri = ENV["DO_H2_SPEC_URI"] || "jdbc:h2:mem"
|
|
32
|
+
CONFIG.driver = 'h2'
|
|
33
|
+
CONFIG.jdbc_driver = DataObjects::H2::JDBC_DRIVER
|
|
36
34
|
|
|
37
35
|
module DataObjectsSpecHelpers
|
|
38
36
|
|
|
@@ -165,4 +163,7 @@ module DataObjectsSpecHelpers
|
|
|
165
163
|
end
|
|
166
164
|
end
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
RSpec.configure do |config|
|
|
167
|
+
config.include(DataObjectsSpecHelpers)
|
|
168
|
+
config.include(DataObjects::Spec::PendingHelpers)
|
|
169
|
+
end
|
data/spec/typecast/array_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/array_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/array_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Array' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Array'
|
|
8
8
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/bigdecimal_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/bigdecimal_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with BigDecimal' do
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
it_should_behave_like 'supporting BigDecimal'
|
|
8
|
+
it_should_behave_like 'supporting BigDecimal autocasting'
|
|
9
9
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/boolean_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/boolean_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Boolean' do
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
it_should_behave_like 'supporting Boolean'
|
|
8
|
+
it_should_behave_like 'supporting Boolean autocasting'
|
|
9
9
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/byte_array_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/byte_array_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with ByteArray' do
|
|
7
7
|
# We need to switch to using parameter binding for this to work with H2
|
|
8
|
-
#
|
|
8
|
+
# it_should_behave_like 'supporting ByteArray'
|
|
9
9
|
end
|
data/spec/typecast/class_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/class_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/class_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Class' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Class'
|
|
8
8
|
end
|
data/spec/typecast/date_spec.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/date_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/date_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Date' do
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
it_should_behave_like 'supporting Date'
|
|
8
|
+
it_should_behave_like 'supporting Date autocasting'
|
|
9
9
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/datetime_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/datetime_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with DateTime' do
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
it_should_behave_like 'supporting DateTime'
|
|
8
|
+
it_should_behave_like 'supporting DateTime autocasting'
|
|
9
9
|
end
|
data/spec/typecast/float_spec.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/float_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/float_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Float' do
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
it_should_behave_like 'supporting Float'
|
|
8
|
+
it_should_behave_like 'supporting Float autocasting'
|
|
9
9
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/integer_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/integer_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Integer' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Integer'
|
|
8
8
|
end
|
data/spec/typecast/nil_spec.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/nil_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/nil_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Nil' do
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
it_should_behave_like 'supporting Nil'
|
|
8
|
+
it_should_behave_like 'supporting writing an Nil'
|
|
9
|
+
it_should_behave_like 'supporting Nil autocasting'
|
|
10
10
|
end
|
data/spec/typecast/other_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/other_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/other_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with other (unknown) type' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting other (unknown) type'
|
|
8
8
|
end
|
data/spec/typecast/range_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/range_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/range_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Range' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Range'
|
|
8
8
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/string_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/string_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with String' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting String'
|
|
8
8
|
end
|
data/spec/typecast/time_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
4
|
-
require 'data_objects/spec/typecast/time_spec'
|
|
4
|
+
require 'data_objects/spec/shared/typecast/time_spec'
|
|
5
5
|
|
|
6
6
|
describe 'DataObjects::H2 with Time' do
|
|
7
|
-
|
|
7
|
+
it_should_behave_like 'supporting Time'
|
|
8
8
|
end
|
data/tasks/compile.rake
CHANGED
|
@@ -2,11 +2,8 @@ begin
|
|
|
2
2
|
gem 'rake-compiler', '~>0.7'
|
|
3
3
|
require 'rake/javaextensiontask'
|
|
4
4
|
|
|
5
|
-
# Hack to avoid "allocator undefined for Proc" issue when unpacking Gems:
|
|
6
|
-
# gemspec provided by Jeweler uses Rake::FileList for files, test_files and
|
|
7
|
-
# extra_rdoc_files, and procs cannot be marshalled.
|
|
8
5
|
def gemspec
|
|
9
|
-
@clean_gemspec ||=
|
|
6
|
+
@clean_gemspec ||= Gem::Specification::load(File.expand_path('../../do_h2.gemspec', __FILE__))
|
|
10
7
|
end
|
|
11
8
|
|
|
12
9
|
Rake::JavaExtensionTask.new('do_h2', gemspec) do |ext|
|
data/tasks/spec.rake
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'rspec/core/rake_task'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
spec.
|
|
5
|
-
spec.
|
|
6
|
-
spec.verbose = true
|
|
3
|
+
RSpec::Core::RakeTask.new(:spec => [:clean, :compile]) do |spec|
|
|
4
|
+
spec.pattern = './spec/**/*_spec.rb'
|
|
5
|
+
spec.skip_bundler = true
|
|
7
6
|
end
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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'
|
|
22
|
-
end
|
|
8
|
+
RSpec::Core::RakeTask.new(:rcov => [:clean, :compile]) do |rcov|
|
|
9
|
+
rcov.pattern = "./spec/**/*_spec.rb"
|
|
10
|
+
rcov.rcov = true
|
|
11
|
+
rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
|
23
12
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: do_h2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 63
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 10
|
|
9
|
-
-
|
|
10
|
-
version: 0.10.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.10.4
|
|
11
11
|
platform: java
|
|
12
12
|
authors:
|
|
13
13
|
- Alex Coles
|
|
@@ -15,44 +15,42 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-03-29 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
|
-
name: data_objects
|
|
23
|
-
prerelease: false
|
|
24
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
25
23
|
none: false
|
|
26
24
|
requirements:
|
|
27
25
|
- - "="
|
|
28
26
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash:
|
|
27
|
+
hash: 63
|
|
30
28
|
segments:
|
|
31
29
|
- 0
|
|
32
30
|
- 10
|
|
33
|
-
-
|
|
34
|
-
version: 0.10.
|
|
31
|
+
- 4
|
|
32
|
+
version: 0.10.4
|
|
35
33
|
type: :runtime
|
|
34
|
+
name: data_objects
|
|
35
|
+
prerelease: false
|
|
36
36
|
version_requirements: *id001
|
|
37
37
|
- !ruby/object:Gem::Dependency
|
|
38
|
-
name: do_jdbc
|
|
39
|
-
prerelease: false
|
|
40
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
|
41
39
|
none: false
|
|
42
40
|
requirements:
|
|
43
41
|
- - "="
|
|
44
42
|
- !ruby/object:Gem::Version
|
|
45
|
-
hash:
|
|
43
|
+
hash: 63
|
|
46
44
|
segments:
|
|
47
45
|
- 0
|
|
48
46
|
- 10
|
|
49
|
-
-
|
|
50
|
-
version: 0.10.
|
|
47
|
+
- 4
|
|
48
|
+
version: 0.10.4
|
|
51
49
|
type: :runtime
|
|
50
|
+
name: do_jdbc
|
|
51
|
+
prerelease: false
|
|
52
52
|
version_requirements: *id002
|
|
53
53
|
- !ruby/object:Gem::Dependency
|
|
54
|
-
name: jdbc-h2
|
|
55
|
-
prerelease: false
|
|
56
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
|
57
55
|
none: false
|
|
58
56
|
requirements:
|
|
@@ -65,25 +63,25 @@ dependencies:
|
|
|
65
63
|
- 107
|
|
66
64
|
version: 1.1.107
|
|
67
65
|
type: :runtime
|
|
66
|
+
name: jdbc-h2
|
|
67
|
+
prerelease: false
|
|
68
68
|
version_requirements: *id003
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: bacon
|
|
71
|
-
prerelease: false
|
|
72
70
|
requirement: &id004 !ruby/object:Gem::Requirement
|
|
73
71
|
none: false
|
|
74
72
|
requirements:
|
|
75
73
|
- - ~>
|
|
76
74
|
- !ruby/object:Gem::Version
|
|
77
|
-
hash:
|
|
75
|
+
hash: 9
|
|
78
76
|
segments:
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
version: "
|
|
77
|
+
- 2
|
|
78
|
+
- 5
|
|
79
|
+
version: "2.5"
|
|
82
80
|
type: :development
|
|
81
|
+
name: rspec
|
|
82
|
+
prerelease: false
|
|
83
83
|
version_requirements: *id004
|
|
84
84
|
- !ruby/object:Gem::Dependency
|
|
85
|
-
name: rake-compiler
|
|
86
|
-
prerelease: false
|
|
87
85
|
requirement: &id005 !ruby/object:Gem::Requirement
|
|
88
86
|
none: false
|
|
89
87
|
requirements:
|
|
@@ -95,6 +93,8 @@ dependencies:
|
|
|
95
93
|
- 7
|
|
96
94
|
version: "0.7"
|
|
97
95
|
type: :development
|
|
96
|
+
name: rake-compiler
|
|
97
|
+
prerelease: false
|
|
98
98
|
version_requirements: *id005
|
|
99
99
|
description: Implements the DataObjects API for H2
|
|
100
100
|
email: alex@alexbcoles.com
|
|
@@ -103,12 +103,16 @@ executables: []
|
|
|
103
103
|
extensions: []
|
|
104
104
|
|
|
105
105
|
extra_rdoc_files:
|
|
106
|
-
- README.markdown
|
|
107
106
|
- ChangeLog.markdown
|
|
108
107
|
- LICENSE
|
|
108
|
+
- README.markdown
|
|
109
109
|
files:
|
|
110
|
-
-
|
|
110
|
+
- ChangeLog.markdown
|
|
111
|
+
- LICENSE
|
|
112
|
+
- README.markdown
|
|
113
|
+
- Rakefile
|
|
111
114
|
- lib/do_h2.rb
|
|
115
|
+
- lib/do_h2/version.rb
|
|
112
116
|
- spec/command_spec.rb
|
|
113
117
|
- spec/connection_spec.rb
|
|
114
118
|
- spec/encoding_spec.rb
|
|
@@ -132,18 +136,14 @@ files:
|
|
|
132
136
|
- tasks/compile.rake
|
|
133
137
|
- tasks/release.rake
|
|
134
138
|
- tasks/spec.rake
|
|
135
|
-
- LICENSE
|
|
136
|
-
- Rakefile
|
|
137
|
-
- ChangeLog.markdown
|
|
138
|
-
- README.markdown
|
|
139
139
|
- lib/do_h2/do_h2.jar
|
|
140
|
-
has_rdoc:
|
|
140
|
+
has_rdoc: true
|
|
141
141
|
homepage:
|
|
142
142
|
licenses: []
|
|
143
143
|
|
|
144
144
|
post_install_message:
|
|
145
|
-
rdoc_options:
|
|
146
|
-
|
|
145
|
+
rdoc_options: []
|
|
146
|
+
|
|
147
147
|
require_paths:
|
|
148
148
|
- lib
|
|
149
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|