do_derby 0.10.3-java → 0.10.4-java
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +13 -0
- data/LICENSE +1 -1
- data/README.markdown +2 -5
- data/Rakefile +8 -39
- data/lib/do_derby.rb +8 -3
- data/lib/do_derby/do_derby.jar +0 -0
- data/lib/do_derby/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 +12 -11
- 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 Derby 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_derby'
|
23
|
-
gem.version = DataObjects::Derby::VERSION
|
24
|
-
gem.summary = 'DataObjects Derby Driver'
|
25
|
-
gem.description = 'Implements the DataObjects API for Derby'
|
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::Derby::VERSION
|
34
|
-
gem.add_dependency 'do_jdbc', DataObjects::Derby::VERSION
|
35
|
-
gem.add_dependency 'jdbc-derby', '~>10.4.2.0'
|
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_derby.rb
CHANGED
@@ -4,9 +4,14 @@ if RUBY_PLATFORM =~ /java/
|
|
4
4
|
require 'do_jdbc'
|
5
5
|
require 'java'
|
6
6
|
|
7
|
-
|
7
|
+
module DataObjects
|
8
|
+
module Derby
|
9
|
+
JDBC_DRIVER = 'org.apache.derby.jdbc.EmbeddedDriver'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
8
13
|
begin
|
9
|
-
java.lang.Thread.currentThread.getContextClassLoader().loadClass(
|
14
|
+
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Derby::JDBC_DRIVER, true)
|
10
15
|
rescue
|
11
16
|
require 'jdbc/derby' # the JDBC driver, packaged as a gem
|
12
17
|
end
|
@@ -16,7 +21,7 @@ if RUBY_PLATFORM =~ /java/
|
|
16
21
|
# Another way of loading the JDBC Class. This seems to be more reliable
|
17
22
|
# than Class.forName() within the data_objects.Connection Java class,
|
18
23
|
# which is currently not working as expected.
|
19
|
-
java_import
|
24
|
+
java_import DataObjects::Derby::JDBC_DRIVER
|
20
25
|
|
21
26
|
else
|
22
27
|
warn "do_derby is only for use with JRuby"
|
data/lib/do_derby/do_derby.jar
CHANGED
Binary file
|
data/lib/do_derby/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::Derby::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::Derby::Connection do
|
7
7
|
|
8
|
-
before do
|
9
|
-
@driver
|
10
|
-
@user
|
8
|
+
before :all do
|
9
|
+
@driver = 'derby'
|
10
|
+
@user = ''
|
11
11
|
@password = ''
|
12
|
-
@host
|
13
|
-
@port
|
12
|
+
@host = ''
|
13
|
+
@port = ''
|
14
14
|
@database = "#{File.expand_path(File.dirname(__FILE__))}/test.db;create=true"
|
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::Derby::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::Derby::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::Derby::Result do
|
11
|
-
|
11
|
+
it_should_behave_like 'a Result'
|
12
12
|
end
|
13
13
|
|
14
14
|
describe DataObjects::Derby::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,22 +19,19 @@ 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_derby'
|
23
25
|
|
24
26
|
DataObjects::Derby.logger = DataObjects::Logger.new(STDOUT, :off)
|
25
27
|
at_exit { DataObjects.logger.flush }
|
26
28
|
|
27
|
-
CONFIG = OpenStruct.new
|
28
|
-
# CONFIG.scheme = 'derby'
|
29
|
-
# CONFIG.user = ENV['DO_DERBY_USER'] || 'derby'
|
30
|
-
# CONFIG.pass = ENV['DO_DERBY_PASS'] || ''
|
31
|
-
# CONFIG.host = ENV['DO_DERBY_HOST'] || ''
|
32
|
-
# CONFIG.port = ENV['DO_DERBY_PORT'] || ''
|
33
|
-
# CONFIG.database = ENV['DO_DERBY_DATABASE'] || "#{File.expand_path(File.dirname(__FILE__))}/testdb"
|
34
29
|
|
35
|
-
CONFIG
|
36
|
-
CONFIG.
|
30
|
+
CONFIG = OpenStruct.new
|
31
|
+
CONFIG.uri = ENV["DO_DERBY_SPEC_URI"] || "jdbc:derby:testdb;create=true"
|
32
|
+
CONFIG.driver = 'derby'
|
33
|
+
CONFIG.jdbc_driver = DataObjects::Derby::JDBC_DRIVER
|
34
|
+
CONFIG.testsql = "SELECT 1 FROM SYSIBM.SYSDUMMY1"
|
37
35
|
|
38
36
|
module DataObjectsSpecHelpers
|
39
37
|
|
@@ -186,4 +184,7 @@ module DataObjectsSpecHelpers
|
|
186
184
|
end
|
187
185
|
end
|
188
186
|
|
189
|
-
|
187
|
+
RSpec.configure do |config|
|
188
|
+
config.include(DataObjectsSpecHelpers)
|
189
|
+
config.include(DataObjects::Spec::PendingHelpers)
|
190
|
+
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::Derby 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::Derby with BigDecimal' do
|
7
|
-
|
8
|
-
|
7
|
+
it_should_behave_like 'supporting BigDecimal'
|
8
|
+
it_should_behave_like 'supporting BigDecimal autocasting'
|
9
9
|
end
|
@@ -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/boolean_spec'
|
4
|
+
require 'data_objects/spec/shared/typecast/boolean_spec'
|
5
5
|
|
6
6
|
describe 'DataObjects::Derby with Boolean' do
|
7
|
-
|
7
|
+
it_should_behave_like 'supporting Boolean'
|
8
8
|
# TODO should we map smallint to boolean for derby ??
|
9
|
-
#
|
9
|
+
# it_should_behave_like 'supporting Boolean autocasting'
|
10
10
|
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::Derby with ByteArray' do
|
7
7
|
# We need to switch to using parameter binding for this to work with Derby
|
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::Derby 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::Derby 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::Derby 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::Derby 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::Derby 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::Derby 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::Derby 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::Derby 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::Derby 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_derby.gemspec', __FILE__))
|
10
7
|
end
|
11
8
|
|
12
9
|
Rake::JavaExtensionTask.new('do_derby', 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_derby
|
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-derby
|
55
|
-
prerelease: false
|
56
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
55
|
none: false
|
58
56
|
requirements:
|
@@ -66,25 +64,25 @@ dependencies:
|
|
66
64
|
- 0
|
67
65
|
version: 10.4.2.0
|
68
66
|
type: :runtime
|
67
|
+
name: jdbc-derby
|
68
|
+
prerelease: false
|
69
69
|
version_requirements: *id003
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name: bacon
|
72
|
-
prerelease: false
|
73
71
|
requirement: &id004 !ruby/object:Gem::Requirement
|
74
72
|
none: false
|
75
73
|
requirements:
|
76
74
|
- - ~>
|
77
75
|
- !ruby/object:Gem::Version
|
78
|
-
hash:
|
76
|
+
hash: 9
|
79
77
|
segments:
|
80
|
-
-
|
81
|
-
-
|
82
|
-
version: "
|
78
|
+
- 2
|
79
|
+
- 5
|
80
|
+
version: "2.5"
|
83
81
|
type: :development
|
82
|
+
name: rspec
|
83
|
+
prerelease: false
|
84
84
|
version_requirements: *id004
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
-
name: rake-compiler
|
87
|
-
prerelease: false
|
88
86
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
87
|
none: false
|
90
88
|
requirements:
|
@@ -96,6 +94,8 @@ dependencies:
|
|
96
94
|
- 7
|
97
95
|
version: "0.7"
|
98
96
|
type: :development
|
97
|
+
name: rake-compiler
|
98
|
+
prerelease: false
|
99
99
|
version_requirements: *id005
|
100
100
|
description: Implements the DataObjects API for Derby
|
101
101
|
email: alex@alexbcoles.com
|
@@ -104,12 +104,16 @@ executables: []
|
|
104
104
|
extensions: []
|
105
105
|
|
106
106
|
extra_rdoc_files:
|
107
|
-
- README.markdown
|
108
107
|
- ChangeLog.markdown
|
109
108
|
- LICENSE
|
109
|
+
- README.markdown
|
110
110
|
files:
|
111
|
-
-
|
111
|
+
- ChangeLog.markdown
|
112
|
+
- LICENSE
|
113
|
+
- README.markdown
|
114
|
+
- Rakefile
|
112
115
|
- lib/do_derby.rb
|
116
|
+
- lib/do_derby/version.rb
|
113
117
|
- spec/command_spec.rb
|
114
118
|
- spec/connection_spec.rb
|
115
119
|
- spec/encoding_spec.rb
|
@@ -133,18 +137,14 @@ files:
|
|
133
137
|
- tasks/compile.rake
|
134
138
|
- tasks/release.rake
|
135
139
|
- tasks/spec.rake
|
136
|
-
- LICENSE
|
137
|
-
- Rakefile
|
138
|
-
- ChangeLog.markdown
|
139
|
-
- README.markdown
|
140
140
|
- lib/do_derby/do_derby.jar
|
141
|
-
has_rdoc:
|
141
|
+
has_rdoc: true
|
142
142
|
homepage:
|
143
143
|
licenses: []
|
144
144
|
|
145
145
|
post_install_message:
|
146
|
-
rdoc_options:
|
147
|
-
|
146
|
+
rdoc_options: []
|
147
|
+
|
148
148
|
require_paths:
|
149
149
|
- lib
|
150
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|