Modified: trunk/activerecord-jdbc/README.txt (1132 => 1133)
--- trunk/activerecord-jdbc/README.txt 2008-10-09 18:32:32 UTC (rev 1132)
+++ trunk/activerecord-jdbc/README.txt 2008-11-16 07:15:59 UTC (rev 1133)
@@ -1,119 +1,6 @@
-ActiveRecord-JDBC is a database adapter for Rails' ActiveRecord component that can be used with JRuby[http://www.jruby.org/]. It allows use of virtually any JDBC-compliant database with your JRuby on Rails application.
+This was formerly the location where you could obtain the latest and
+greatest activerecord-jdbc code, but no longer. The authoritative
+repository has been moved to git. Please create a new sandbox:
-ActiveRecord-JDBC is a sub-project of jruby-extras at RubyForge.
+ git clone git://github.com/nicksieger/activerecord-jdbc-adapter.git
-== Databases
-
-What's there, and what is not there:
-
-* MySQL - Complete support
-* PostgreSQL - Complete support
-* Oracle - Complete support
-* Microsoft SQL Server - Complete support except for change_column_default
-* DB2 - Complete, except for the migrations:
- * change_column
- * change_column_default
- * remove_column
- * rename_column
- * add_index
- * remove_index
- * rename_table
-* FireBird - Complete, except for change_column_default and rename_column
-* Derby - Complete, except for:
- * change_column
- * change_column_default
- * remove_column
- * rename_column
-* HSQLDB - Complete
-* H2 - Complete
-* SQLite3 - work in progress
-
-Other databases will require testing and likely a custom configuration module. Please join the jruby-extras mailing-list[http://rubyforge.org/mail/?group_id=2014] to help us discover support for more databases.
-
-== Using ActiveRecord JDBC
-
-=== Inside Rails
-
-To use ActiveRecord-JDBC with JRuby on Rails:
-
-1. Choose the adapter you wish to gem install. The following pre-packaged adapters are available:
-
- * base jdbc (<tt>activerecord-jdbc-adapter</tt>). Supports all available databases via JDBC, but requires you to download and manually install the database vendor's JDBC driver .jar file.
- * mysql (<tt>activerecord-jdbcmysql-adapter</tt>)
- * postgresql (<tt>activerecord-jdbcpostgresql-adapter</tt>)
- * derby (<tt>activerecord-jdbcderby-adapter</tt>)
- * hsqldb (<tt>activerecord-jdbchsqldb-adapter</tt>)
- * h2 (<tt>activerecord-jdbch2-adapter</tt>)
-
-2. If you're using Rails 2.0, you may skip to the next step. For Rails prior to version 2.0, you'll need to add one-time setup to your config/environment.rb file in your Rails application. Add the following lines just before the <code>Rails::Initializer</code>. (If you're using ActiveRecord-JDBC under the old gem name used in versions 0.5 and earlier, replace 'activerecord-jdbc-adapter' with 'ActiveRecord-JDBC' below.)
-
- if RUBY_PLATFORM =~ /java/
- require 'rubygems'
- gem 'activerecord-jdbc-adapter'
- require 'jdbc_adapter'
- end
-
-3. Configure your database.yml to use the <code>jdbc</code> adapter.
-For mysql, postgres, derby, oracle, hsqldb and h2 you can simply configure the database in the normal Rails style. If you use one of the convenience 'activerecord-jdbcXXX-adapter' adapters, be sure and put a 'jdbc' prefix in front of the databas adapter name as below.
-
- development:
- adapter: jdbcmysql
- username: blog
- password:
- hostname: localhost
- database: weblog_development
-
-For other databases, you'll need to know the database driver class and URL. Example:
-
- development:
- adapter: jdbc
- username: blog
- password:
- driver: com.mysql.jdbc.Driver
- url: jdbc:mysql://localhost:3306/weblog_development
-
-=== Standalone, with ActiveRecord
-
-1. Install the gem with JRuby:
-
- jruby -S gem install activerecord-jdbc-adapter
-
- If you wish to use the adapter for a specific database, you can install it directly and a driver gem will be installed as well:
-
- jruby -S gem install activerecord-jdbcderby-adapter
-
-2. If using ActiveRecord 2.0 (Rails 2.0) or greater, you can skip to the next step. Otherwise, ensure the following code gets executed in your script:
-
- require 'rubygems'
- gem 'activerecord-jdbc-adapter'
- require 'jdbc_adapter'
- require 'active_record'
-
-3. After this you can establish a JDBC connection like this:
-
- ActiveRecord::Base.establish_connection(
- :adapter => 'jdbcderby',
- :database => "db/my-database"
- )
-
- or like this (but requires that you manually put the driver jar on the classpath):
-
- ActiveRecord::Base.establish_connection(
- :adapter => 'jdbc',
- :driver => 'org.apache.derby.jdbc.EmbeddedDriver',
- :url ="" 'jdbc:derby:test_ar;create=true'
- )
-
-== Running AR-JDBC's Tests
-
-Drivers for 4 open-source databases are included. Provided you have MySQL installed, you can simply type <tt>jruby -S rake</tt> to run the tests. A database named <tt>weblog_development</tt> is needed beforehand with a connection user of "blog" and password empty.
-
-== Authors
-
-This project was written by Nick Sieger <[EMAIL PROTECTED]> and Ola Bini <[EMAIL PROTECTED]> with lots of help from the JRuby community.
-
-== License
-
-ActiveRecord-JDBC is released under a BSD license. See the LICENSE file included with the distribution for details.
-
-Open-source driver gems for ActiveRecord JDBC are licensed under the same license the database's drivers are licensed. See each driver gem's LICENSE.txt file for details.
\ No newline at end of file
Deleted: trunk/activerecord-jdbc/Rakefile (1132 => 1133)
--- trunk/activerecord-jdbc/Rakefile 2008-10-09 18:32:32 UTC (rev 1132)
+++ trunk/activerecord-jdbc/Rakefile 2008-11-16 07:15:59 UTC (rev 1133)
@@ -1,173 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-
-task :default => [:java_compile, :test]
-
-def java_classpath_arg # myriad of ways to discover JRuby classpath
- begin
- cpath = Java::java.lang.System.getProperty('java.class.path').split(File::PATH_SEPARATOR)
- cpath += Java::java.lang.System.getProperty('sun.boot.class.path').split(File::PATH_SEPARATOR)
- jruby_cpath = cpath.compact.join(File::PATH_SEPARATOR)
- rescue => e
- end
- unless jruby_cpath
- jruby_cpath = ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] &&
- FileList["#{ENV['JRUBY_HOME']}/lib/*.jar"].join(File::PATH_SEPARATOR)
- end
- jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
-end
-
-desc "Compile the native Java code."
-task :java_compile do
- pkg_classes = File.join(*%w(pkg classes))
- jar_name = File.join(*%w(lib jdbc_adapter jdbc_adapter_internal.jar))
- mkdir_p pkg_classes
- sh "javac -target 1.5 -source 1.5 -d pkg/classes #{java_classpath_arg} #{FileList['src/java/**/*.java'].join(' ')}"
- sh "jar cf #{jar_name} -C #{pkg_classes} ."
-end
-file "lib/jdbc_adapter/jdbc_adapter_internal.jar" => :java_compile
-
-task :filelist do
- puts FileList['pkg/**/*'].inspect
-end
-
-if RUBY_PLATFORM =~ /java/
- # TODO: add more databases into the standard tests here.
- task :test => [:test_mysql, :test_jdbc, :test_derby, :test_hsqldb, :test_h2, :test_sqlite3]
-else
- task :test => [:test_mysql]
-end
-
-FileList['drivers/*'].each do |d|
- next unless File.directory?(d)
- driver = File.basename(d)
- Rake::TestTask.new("test_#{driver}") do |t|
- files = FileList["test/#{driver}*test.rb"]
- if driver == "derby"
- files << 'test/activerecord/connection_adapters/type_conversion_test.rb'
- end
- t.ruby_opts << "-rjdbc/#{driver}"
- t.test_files = files
- t.libs << "test" << "#{d}/lib"
- end
-end
-
-Rake::TestTask.new(:test_jdbc) do |t|
- t.test_files = FileList['test/generic_jdbc_connection_test.rb']
- t.libs << 'test' << 'drivers/mysql/lib'
-end
-
-Rake::TestTask.new(:test_jndi) do |t|
- t.test_files = FileList['test/jndi_test.rb']
- t.libs << 'test' << 'drivers/derby/lib'
-end
-
-task :test_postgresql => [:test_postgres]
-task :test_pgsql => [:test_postgres]
-
-# Ensure oracle driver is on your classpath before launching rake
-Rake::TestTask.new(:test_oracle) do |t|
- t.test_files = FileList['test/oracle_simple_test.rb']
- t.libs << 'test'
-end
-
-# Ensure DB2 driver is on your classpath before launching rake
-Rake::TestTask.new(:test_db2) do |t|
- t.test_files = FileList['test/db2_simple_test.rb']
- t.libs << 'test'
-end
-
-# Ensure InterSystems CacheDB driver is on your classpath before launching rake
-Rake::TestTask.new(:test_cachedb) do | t |
- t.test_files = FileList[ 'test/cachedb_simple_test.rb' ]
- t.libs << 'test'
-end
-
-# Ensure that the jTDS driver in on your classpath before launching rake
-Rake::TestTask.new(:test_mssql) do | t |
- t.test_files = FileList[ 'test/mssql_simple_test.rb' ]
- t.libs << 'test'
-end
-
-# Tests for JDBC adapters that don't require a database.
-Rake::TestTask.new(:test_jdbc_adapters) do | t |
- t.test_files = FileList[ 'test/jdbc_adapter/jdbc_sybase_test.rb' ]
- t.libs << 'test'
-end
-
-MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt",
- "Rakefile", "LICENSE.txt", "lib/**/*.rb", "lib/jdbc_adapter/jdbc_adapter_internal.jar", "test/**/*.rb",
- "lib/**/*.rake", "src/**/*.java"]
-
-file "Manifest.txt" => :manifest
-task :manifest do
- File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
-end
-Rake::Task['manifest'].invoke # Always regen manifest, so Hoe has up-to-date list of files
-
-require File.dirname(__FILE__) + "/lib/jdbc_adapter/version"
-begin
- require 'hoe'
- Hoe.new("activerecord-jdbc-adapter", JdbcAdapter::Version::VERSION) do |p|
- p.rubyforge_name = "jruby-extras"
- p.url = ""
- p.author = "Nick Sieger, Ola Bini and JRuby contributors"
- p.email = "[EMAIL PROTECTED], [EMAIL PROTECTED]"
- p.summary = "JDBC adapter for ActiveRecord, for use within JRuby on Rails."
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
- p.description = p.paragraphs_of('README.txt', 0...1).join("\n\n")
- end.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
-rescue LoadError
- puts "You really need Hoe installed to be able to package this gem"
-rescue => e
- puts "ignoring error while loading hoe: #{e.to_s}"
-end
-
-def rake(*args)
- ruby "-S", "rake", *args
-end
-
-%w(test package install_gem release clean).each do |task|
- desc "Run rake #{task} on all available adapters and drivers"
- task "all:#{task}" => task
-end
-
-(Dir["drivers/*/Rakefile"] + Dir["adapters/*/Rakefile"]).each do |rakefile|
- dir = File.dirname(rakefile)
- prefix = dir.sub(%r{/}, ':')
- tasks = %w(package install_gem debug_gem clean)
- tasks << "test" if File.directory?(File.join(dir, "test"))
- tasks.each do |task|
- desc "Run rake #{task} on #{dir}"
- task "#{prefix}:#{task}" do
- Dir.chdir(dir) do
- rake task
- end
- end
- task "#{File.dirname(dir)}:#{task}" => "#{prefix}:#{task}"
- task "all:#{task}" => "#{prefix}:#{task}"
- end
- desc "Run rake release on #{dir}"
- task "#{prefix}:release" do
- Dir.chdir(dir) do
- version = nil
- if dir =~ /adapters/
- version = ENV['VERSION']
- else
- Dir["lib/**/*.rb"].each do |file|
- version ||= File.open(file) {|f| f.read =~ /VERSION = "([^"]+)"/ && $1}
- end
- end
- rake "release", "VERSION=#{version}"
- end
- end
- # Only release adapters synchronously with main release. Drivers are versioned
- # according to their JDBC driver versions.
- if dir =~ /adapters/
- task "adapters:release" => "#{prefix}:release"
- task "all:release" => "#{prefix}:release"
- end
-end
-
-require 'rake/clean'
-CLEAN.include 'derby*', 'test.db.*','test/reports', 'test.sqlite3','lib/**/*.jar','manifest.mf'