jdbc-jtds 1.3.0 → 1.3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +5 -1
- data/README.md +29 -0
- data/lib/jdbc/jtds.rb +19 -7
- metadata +9 -9
- data/README.txt +0 -14
data/LICENSE.txt
CHANGED
@@ -1 +1,5 @@
|
|
1
|
-
|
1
|
+
jTDS is Free Software. jTDS is made available under the terms of the GNU Lesser General Public License. The LGPL is sufficiently flexible to allow the use of jTDS in both open source and commercial projects. Using jTDS is considered to be dynamic linking; hence our interpretation of the LGPL is that the use of the unmodified jTDS source or binary does not affect the license of your application code.
|
2
|
+
|
3
|
+
If you modify jTDS and redistribute your modifications, the LGPL applies, basically meaning that you'll have to make the modified version publicly available under the LGPL license too. This ensures that all users of the software have access to all future improvements.
|
4
|
+
|
5
|
+
jTDS was initially based on software released under a BSD license by CDS Networks, Inc. and/or Craig Spannring, the author of the original FreeTDS JDBC driver from which jTDS is derived. Between releases 0.8.1 and 0.9 jTDS was completely rewritten so the original BSD license no longer applies.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# jdbc-jtds
|
2
|
+
|
3
|
+
jTDS - SQL Server and Sybase JDBC driver gem for JRuby
|
4
|
+
|
5
|
+
Open source JDBC 3.0 type 4 driver for Microsoft SQL Server (6.5 up to 2012) and Sybase ASE.
|
6
|
+
jTDS is a complete implementation of the JDBC 3.0 spec and the fastest JDBC driver for MS SQL Server.
|
7
|
+
|
8
|
+
For more information see http://jtds.sourceforge.net/
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
To make the driver (Java class) accessible to JDBC and ActiveRecord code running in JRuby :
|
13
|
+
|
14
|
+
require 'jdbc/jtds'
|
15
|
+
Jdbc::JDTS.load_driver
|
16
|
+
|
17
|
+
For backwards compatibility with older (**1.2.5**) versions of the gem use :
|
18
|
+
|
19
|
+
require 'jdbc/jtds'
|
20
|
+
Jdbc::JDTS.load_driver(:require) if Jdbc::JDTS.respond_to?(:load_driver)
|
21
|
+
|
22
|
+
NOTE: jTDS **1.3.0** requires Java 7 or newer, if you're on older Java please use **1.2.x**.
|
23
|
+
|
24
|
+
## Copyright
|
25
|
+
|
26
|
+
Copyright (c) 2012 [The JRuby Team](https://github.com/jruby).
|
27
|
+
|
28
|
+
jTDS is made available under the terms of the GNU Lesser General Public License,
|
29
|
+
see *LICENSE.txt* and http://jtds.sourceforge.net/license.html for more details.
|
data/lib/jdbc/jtds.rb
CHANGED
@@ -1,21 +1,33 @@
|
|
1
|
+
warn "Jdbc-JTDS is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true)
|
2
|
+
|
1
3
|
module Jdbc
|
2
4
|
module JTDS
|
3
|
-
|
5
|
+
DRIVER_VERSION = '1.3.0'
|
6
|
+
VERSION = DRIVER_VERSION + '.1'
|
4
7
|
|
5
8
|
def self.driver_jar
|
6
|
-
"jtds-#{
|
9
|
+
"jtds-#{DRIVER_VERSION}.jar"
|
7
10
|
end
|
8
11
|
|
9
12
|
def self.load_driver(method = :load)
|
10
|
-
|
13
|
+
vers = Java::java.lang.System::get_property( "java.specification.version" )
|
14
|
+
if ( ( vers.split( '.' ).map(&:to_i) <=> [ 1, 7 ] ) >= 0 )
|
15
|
+
send method, driver_jar
|
16
|
+
else
|
17
|
+
raise LoadError, "Version #{VERSION} of Jdbc-JTDS requires Java 1.7 " +
|
18
|
+
"or later (try using gem 'jdbc-jtds', '~> 1.2.7'). "
|
19
|
+
end
|
11
20
|
end
|
12
21
|
|
13
22
|
def self.driver_name
|
14
23
|
'net.sourceforge.jtds.jdbc.Driver'
|
15
24
|
end
|
16
|
-
end
|
17
|
-
end
|
18
25
|
|
19
|
-
if
|
20
|
-
|
26
|
+
if defined?(JRUBY_VERSION) && # enable backwards-compat behavior :
|
27
|
+
( Java::JavaLang::Boolean.get_boolean("jdbc.driver.autoload") ||
|
28
|
+
Java::JavaLang::Boolean.get_boolean("jdbc.jtds.autoload") )
|
29
|
+
warn "autoloading JDBC driver on require 'jdbc/jtds'" if $VERBOSE
|
30
|
+
load_driver :require
|
31
|
+
end
|
32
|
+
end
|
21
33
|
end
|
metadata
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
name: jdbc-jtds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.3.0
|
5
|
+
version: 1.3.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nick Sieger, Ola Bini and JRuby contributors
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: Install this gem
|
14
|
+
description: Install this gem `require 'jdbc/jtds'` and invoke `Jdbc::JDTS.load_driver` within JRuby to load the driver.
|
15
15
|
email: nick@nicksieger.com, ola.bini@gmail.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- Rakefile
|
21
|
-
- README.
|
21
|
+
- README.md
|
22
22
|
- LICENSE.txt
|
23
23
|
- lib/jtds-1.3.0.jar
|
24
24
|
- lib/jdbc/jtds.rb
|
@@ -26,13 +26,13 @@ homepage: https://github.com/jruby/activerecord-jdbc-adapter
|
|
26
26
|
licenses: []
|
27
27
|
post_install_message:
|
28
28
|
rdoc_options:
|
29
|
-
- --main
|
30
|
-
- README.
|
29
|
+
- "--main"
|
30
|
+
- README.md
|
31
31
|
require_paths:
|
32
32
|
- lib
|
33
33
|
required_ruby_version: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
segments:
|
38
38
|
- 0
|
@@ -42,7 +42,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
42
|
none: false
|
43
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: !binary |-
|
48
48
|
MA==
|
@@ -52,5 +52,5 @@ rubyforge_project: jruby-extras
|
|
52
52
|
rubygems_version: 1.8.24
|
53
53
|
signing_key:
|
54
54
|
specification_version: 3
|
55
|
-
summary:
|
55
|
+
summary: jTDS JDBC driver for JRuby and JTDS/ActiveRecord-JDBC (activerecord-jdbcmssql-adapter).
|
56
56
|
test_files: []
|
data/README.txt
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
= jdbc-jtds
|
2
|
-
|
3
|
-
* https://github.com/jruby/activerecord-jdbc-adapter/
|
4
|
-
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
This is a jTDS JDBC driver gem for JRuby.
|
8
|
-
|
9
|
-
Use
|
10
|
-
|
11
|
-
require 'jdbc/jtds'
|
12
|
-
|
13
|
-
to make the driver accessible to JDBC and ActiveRecord code running in JRuby.
|
14
|
-
|