jdbc-nuodb 1.0.1 → 1.2
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/.travis.yml +11 -3
- data/{README.rdoc → README.md} +32 -26
- data/Rakefile +1 -1
- data/jdbc-nuodb.gemspec +0 -1
- data/lib/jdbc/nuodb.rb +1 -1
- data/lib/nuodb-jdbc-1.2.jar +0 -0
- data/spec/functional/connection_spec.rb +11 -4
- data/spec/spec_helper.rb +2 -0
- data/spec/support/config.yml +2 -2
- metadata +5 -7
- data/lib/nuodb-jdbc-1.0.1.jar +0 -0
data/.travis.yml
CHANGED
@@ -11,12 +11,20 @@ notifications:
|
|
11
11
|
- buck.robert.j@gmail.com
|
12
12
|
- rbuck@nuodb.com
|
13
13
|
|
14
|
-
|
15
|
-
- wget http://www.nuodb.com/latest/nuodb-1.
|
14
|
+
before_install:
|
15
|
+
- wget -q http://www.nuodb.com/latest/nuodb-1.2.linux.x64.deb --output-document=/var/tmp/nuodb.deb
|
16
16
|
- sudo dpkg -i /var/tmp/nuodb.deb
|
17
|
+
- sleep 2
|
18
|
+
|
19
|
+
before_script:
|
20
|
+
- ${NUODB_ROOT}/bin/nuodb --chorus test --password bar --dba-user dba --dba-password baz --verbose debug --archive /var/tmp/nuodb --initialize --force &
|
21
|
+
- sleep 2
|
22
|
+
- ${NUODB_ROOT}/bin/nuodb --chorus test --password bar --dba-user dba --dba-password baz &
|
23
|
+
- sleep 2
|
24
|
+
- echo "create user cloud password 'user';" | ${NUODB_ROOT}/bin/nuosql test@localhost --user dba --password baz
|
17
25
|
|
18
26
|
script:
|
19
|
-
- NUODB_ROOT=/opt/nuodb bundle exec rake
|
27
|
+
- NUODB_ROOT=/opt/nuodb bundle exec rake spec install
|
20
28
|
|
21
29
|
after_script:
|
22
30
|
- sudo dpkg -r nuodb
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,26 +1,29 @@
|
|
1
|
-
|
1
|
+
# NuoDB/JRuby Interface
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
[<img src="https://api.travis-ci.org/nuodb/jruby-jdbc-nuodb.png?branch=master"
|
4
|
+
alt="Build Status" />](http://travis-ci.org/nuodb/jruby-jdbc-nuodb) [<img
|
5
|
+
src="https://gemnasium.com/nuodb/jruby-jdbc-nuodb.png?travis" alt="Dependency
|
6
|
+
Status" />](https://gemnasium.com/nuodb/jruby-jdbc-nuodb) [<img
|
7
|
+
src="https://codeclimate.com/github/nuodb/jruby-jdbc-nuodb.png"
|
8
|
+
/>](https://codeclimate.com/github/nuodb/jruby-jdbc-nuodb)
|
6
9
|
|
7
|
-
|
10
|
+
## DESCRIPTION
|
8
11
|
|
9
12
|
This is the official JRuby Gem for NuoDB. It is implemented as a JDBC driver.
|
10
13
|
|
11
14
|
It is a native Java driver that converts JDBC (Java Database Connectivity)
|
12
15
|
calls into the network protocol used by the NuoDB database.
|
13
16
|
|
14
|
-
|
17
|
+
## Usage
|
15
18
|
|
16
19
|
To make the driver accessible to JDBC and ActiveRecord code running in JRuby :
|
17
20
|
|
18
21
|
require 'jdbc/nuodb'
|
19
22
|
Jdbc::NuoDB.load_driver
|
20
23
|
|
21
|
-
|
24
|
+
## ENVIRONMENT SETUP
|
22
25
|
|
23
|
-
|
26
|
+
### MAC
|
24
27
|
|
25
28
|
To set up JRuby on Mac, you may optimally install RVM and use that to install
|
26
29
|
JRuby, or you may also install it from the package installer available online
|
@@ -39,21 +42,21 @@ If you fail to do this you will see the following error:
|
|
39
42
|
|
40
43
|
cannot load such file -- java
|
41
44
|
|
42
|
-
|
45
|
+
## BUILDING THE GEM
|
43
46
|
|
44
47
|
To compile and test run this command:
|
45
48
|
|
46
49
|
jruby -S rake clean build spec
|
47
50
|
|
48
|
-
|
51
|
+
## INSTALLING THE GEM
|
49
52
|
|
50
|
-
jruby -S gem install jdbc-nuodb-1.
|
53
|
+
jruby -S gem install jdbc-nuodb-1.2.gem
|
51
54
|
|
52
55
|
Or from the source tree:
|
53
56
|
|
54
|
-
jruby -S gem install pkg/jdbc-nuodb-1.
|
57
|
+
jruby -S gem install pkg/jdbc-nuodb-1.2.gem
|
55
58
|
|
56
|
-
|
59
|
+
## TESTING THE GEM
|
57
60
|
|
58
61
|
Start up a minimal chorus as follows:
|
59
62
|
|
@@ -72,31 +75,34 @@ Run the tests:
|
|
72
75
|
|
73
76
|
jruby -S rake spec
|
74
77
|
|
75
|
-
|
78
|
+
## PUBLISHING THE GEM
|
76
79
|
|
77
|
-
|
80
|
+
### TAGGING
|
78
81
|
|
79
|
-
Tag the product using tags per the SemVer specification; our tags have a
|
82
|
+
Tag the product using tags per the SemVer specification; our tags have a
|
83
|
+
v-prefix:
|
80
84
|
|
81
|
-
git tag -a v1.
|
85
|
+
git tag -a v1.2 -m "SemVer Version: v1.2"
|
82
86
|
|
83
87
|
If you make a mistake, take it back quickly:
|
84
88
|
|
85
|
-
git tag -d v1.
|
86
|
-
git push origin :refs/tags/v1.
|
89
|
+
git tag -d v1.2
|
90
|
+
git push origin :refs/tags/v1.2
|
87
91
|
|
88
|
-
|
92
|
+
### PUBLISHING
|
89
93
|
|
90
94
|
Here are the commands used to publish:
|
91
95
|
|
92
|
-
gem push pkg/jdbc-nuodb-1.
|
96
|
+
gem push pkg/jdbc-nuodb-1.2.gem
|
93
97
|
|
94
|
-
|
98
|
+
## INSPECTING THE GEM
|
95
99
|
|
96
|
-
It is often useful to inspect the contents of a Gem before distribution.
|
97
|
-
|
100
|
+
It is often useful to inspect the contents of a Gem before distribution. To do
|
101
|
+
this you dump the contents of a gem thus:
|
98
102
|
|
99
|
-
gem unpack pkg/jdbc-nuodb-1.
|
103
|
+
gem unpack pkg/jdbc-nuodb-1.2.gem
|
100
104
|
|
101
|
-
|
105
|
+
## REFERENCES
|
106
|
+
|
107
|
+
[](http://githalytics.com/nuodb/jruby-jdbc-nuodb)
|
102
108
|
|
data/Rakefile
CHANGED
data/jdbc-nuodb.gemspec
CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'BSD'
|
15
15
|
|
16
16
|
spec.rdoc_options = %w(--charset=UTF-8)
|
17
|
-
spec.extra_rdoc_files = %w[README.rdoc LICENSE]
|
18
17
|
|
19
18
|
spec.files = `git ls-files`.split($\)
|
20
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
data/lib/jdbc/nuodb.rb
CHANGED
Binary file
|
@@ -1,7 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
+
java_import 'com.nuodb.jdbc.Driver'
|
4
|
+
java_import 'java.sql.DriverManager'
|
5
|
+
|
3
6
|
describe Jdbc::NuoDB do
|
4
7
|
before do
|
8
|
+
driver = Driver.new
|
9
|
+
DriverManager.registerDriver driver
|
5
10
|
end
|
6
11
|
|
7
12
|
after do
|
@@ -10,6 +15,7 @@ describe Jdbc::NuoDB do
|
|
10
15
|
context 'creating a connection' do
|
11
16
|
|
12
17
|
before(:each) do
|
18
|
+
|
13
19
|
end
|
14
20
|
|
15
21
|
after(:each) do
|
@@ -19,17 +25,18 @@ describe Jdbc::NuoDB do
|
|
19
25
|
lambda {
|
20
26
|
url = 'jdbc:com.nuodb://noexist:48004/test?schema=test'
|
21
27
|
java.sql.DriverManager.getConnection(url)
|
22
|
-
}.should raise_error(
|
28
|
+
}.should raise_error(Java::JavaSql::SQLException)
|
23
29
|
end
|
24
30
|
|
25
31
|
it 'should not raise an SQLException when provided a database that can be connected to' do
|
26
32
|
lambda {
|
27
33
|
con_props = java.util.Properties.new
|
28
|
-
con_props.setProperty('
|
29
|
-
con_props.setProperty('password', '
|
34
|
+
con_props.setProperty('username', 'dba')
|
35
|
+
con_props.setProperty('password', 'baz')
|
36
|
+
con_props.setProperty('schema', 'test')
|
30
37
|
url = 'jdbc:com.nuodb://localhost:48004/test?schema=test'
|
31
38
|
java.sql.DriverManager.getConnection(url, con_props)
|
32
|
-
}.should_not raise_error(
|
39
|
+
}.should_not raise_error(Java::JavaSql::SQLException)
|
33
40
|
end
|
34
41
|
end
|
35
42
|
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/config.yml
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jdbc-nuodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.2'
|
4
5
|
prerelease:
|
5
|
-
version: 1.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Robert Buck
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -115,19 +115,17 @@ email:
|
|
115
115
|
- support@nuodb.com
|
116
116
|
executables: []
|
117
117
|
extensions: []
|
118
|
-
extra_rdoc_files:
|
119
|
-
- README.rdoc
|
120
|
-
- LICENSE
|
118
|
+
extra_rdoc_files: []
|
121
119
|
files:
|
122
120
|
- ".gitignore"
|
123
121
|
- ".travis.yml"
|
124
122
|
- Gemfile
|
125
123
|
- LICENSE
|
126
|
-
- README.
|
124
|
+
- README.md
|
127
125
|
- Rakefile
|
128
126
|
- jdbc-nuodb.gemspec
|
129
127
|
- lib/jdbc/nuodb.rb
|
130
|
-
- lib/nuodb-jdbc-1.
|
128
|
+
- lib/nuodb-jdbc-1.2.jar
|
131
129
|
- spec/data/.gitignore
|
132
130
|
- spec/functional/connection_spec.rb
|
133
131
|
- spec/rcov.opts
|
data/lib/nuodb-jdbc-1.0.1.jar
DELETED
Binary file
|