jdbc-cassandra 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 James Thompson
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # jdbc-cassandra
2
+
3
+ Based on the official JDBC driver for Cassandra.
4
+
5
+ It is a native Java driver that converts JDBC (Java Database Connectivity)
6
+ calls into the network protocol used by the MySQL database.
7
+
8
+ For more information see https://code.google.com/a/apache-extras.org/p/cassandra-jdbc/
9
+
10
+ ## Usage
11
+
12
+ To make the driver accessible to JDBC and ActiveRecord code running in JRuby :
13
+
14
+ require 'jdbc/cassandra'
15
+ Jdbc::Cassandra.load_driver
16
+
17
+ ## Copyright
18
+
19
+ Copyright (c) 2013 [James Thompson](https://github.com/plainprogrammer).
20
+
21
+ This open source software is provided under the MIT license, see *LICENSE.txt*.
@@ -0,0 +1,18 @@
1
+ require 'bundler/gem_helper'
2
+
3
+ name = Dir["*.gemspec"].first.sub('.gemspec', '')
4
+ gem_helper = Bundler::GemHelper.new(Dir.pwd, name)
5
+ def gem_helper.version_tag
6
+ "#{name}-#{version}" # override "v#{version}"
7
+ end
8
+
9
+ version = gem_helper.send(:version)
10
+ version_tag = gem_helper.version_tag
11
+ desc "Build #{name}-#{version}.gem into the pkg directory"
12
+ task('build') { gem_helper.build_gem }
13
+
14
+ desc "Build and install #{name}-#{version}.gem into system gems"
15
+ task('install') { gem_helper.install_gem }
16
+
17
+ desc "Create tag #{version_tag} build and push #{name}-#{version}.gem to Rubygems"
18
+ task('release') { gem_helper.release_gem }
Binary file
@@ -0,0 +1,37 @@
1
+ warn "Jdbc-Cassandra is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true)
2
+ require 'jdbc/cassandra/version'
3
+
4
+ module Jdbc
5
+ module Cassandra
6
+ def self.dependencies
7
+ %W{cassandra-thrift-#{DRIVER_VERSION}.jar
8
+ cassandra-clientutil-#{DRIVER_VERSION}.jar
9
+ log4j-1.2.16.jar
10
+ slf4j-api-1.7.2.jar
11
+ slf4j-log4j12-1.7.2.jar
12
+ libthrift-0.7.0.jar
13
+ guava-14.0.1.jar
14
+ }
15
+ end
16
+
17
+ def self.driver_jar
18
+ "cassandra-jdbc-#{DRIVER_VERSION}.jar"
19
+ end
20
+
21
+ def self.load_driver(method = :load)
22
+ dependencies.each {|dependency| send method, dependency}
23
+ send method, driver_jar
24
+ end
25
+
26
+ def self.driver_name
27
+ 'org.apache.cassandra.cql.jdbc.CassandraDriver'
28
+ end
29
+
30
+ if defined?(JRUBY_VERSION) && # enable backwards-compat behavior :
31
+ ( Java::JavaLang::Boolean.get_boolean("jdbc.driver.autoload") ||
32
+ Java::JavaLang::Boolean.get_boolean("jdbc.cassandra.autoload") )
33
+ warn "autoloading JDBC driver on require 'jdbc/cassandra'" if $VERBOSE
34
+ load_driver :require
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,6 @@
1
+ module Jdbc
2
+ module Cassandra
3
+ DRIVER_VERSION = '1.2.5'
4
+ VERSION = DRIVER_VERSION + ''
5
+ end
6
+ end
Binary file
Binary file
Binary file
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jdbc-cassandra
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.2.5
6
+ platform: ruby
7
+ authors:
8
+ - James Thompson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-31 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Install this gem `require 'jdbc/cassandra'` and invoke `Jdbc::Cassandra.load_driver` within JRuby to load the driver.
15
+ email:
16
+ - james@plainprograms.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - Rakefile
22
+ - README.md
23
+ - LICENSE.txt
24
+ - lib/cassandra-clientutil-1.2.5.jar
25
+ - lib/cassandra-jdbc-1.2.5.jar
26
+ - lib/cassandra-thrift-1.2.5.jar
27
+ - lib/guava-14.0.1.jar
28
+ - lib/libthrift-0.7.0.jar
29
+ - lib/log4j-1.2.16.jar
30
+ - lib/slf4j-api-1.7.2.jar
31
+ - lib/slf4j-log4j12-1.7.2.jar
32
+ - lib/jdbc/cassandra.rb
33
+ - lib/jdbc/cassandra/version.rb
34
+ homepage: https://github.com/plainprogrammer/activerecord-jdbccassandra-adapter
35
+ licenses: []
36
+ post_install_message:
37
+ rdoc_options:
38
+ - --main
39
+ - README.md
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ none: false
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ none: false
54
+ requirements: []
55
+ rubyforge_project: ''
56
+ rubygems_version: 1.8.24
57
+ signing_key:
58
+ specification_version: 3
59
+ summary: Cassandra JDBC driver for JRuby and Cassandra/ActiveRecord-JDBC (activerecord-jdbccassandra-adapter).
60
+ test_files: []