<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>rakelib/compile.rake</filename>
    </added>
    <added>
      <filename>rakelib/package.rake</filename>
    </added>
    <added>
      <filename>rakelib/rails.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,177 +1,10 @@
-require 'rake'
 require 'rake/testtask'
+require 'rake/clean'
+CLEAN.include 'derby*', 'test.db.*','test/reports', 'test.sqlite3','lib/**/*.jar','manifest.mf', '*.log'
 
 task :default =&gt; [: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 =&gt; e
-  end
-  unless jruby_cpath
-    jruby_cpath = ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] &amp;&amp;
-      FileList[&quot;#{ENV['JRUBY_HOME']}/lib/*.jar&quot;].join(File::PATH_SEPARATOR)
-  end
-  jruby_cpath ? &quot;-cp \&quot;#{jruby_cpath}\&quot;&quot; : &quot;&quot;
-end
-
-desc &quot;Compile the native Java code.&quot;
-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 &quot;javac -target 1.5 -source 1.5 -d pkg/classes #{java_classpath_arg} #{FileList['src/java/**/*.java'].join(' ')}&quot;
-  sh &quot;jar cf #{jar_name} -C #{pkg_classes} .&quot;
-end
-file &quot;lib/jdbc_adapter/jdbc_adapter_internal.jar&quot; =&gt; :java_compile
-
 task :filelist do
   puts FileList['pkg/**/*'].inspect
 end
 
-if defined?(JRUBY_VERSION)
-  # TODO: add more databases into the standard tests here.
-  task :test =&gt; [:test_mysql, :test_jdbc, :test_derby, :test_hsqldb, :test_h2, :test_sqlite3]
-else
-  task :test =&gt; [:test_mysql]
-end
-
-FileList['drivers/*'].each do |d|
-  next unless File.directory?(d)
-  driver = File.basename(d)
-  Rake::TestTask.new(&quot;test_#{driver}&quot;) do |t|
-    files = FileList[&quot;test/#{driver}*test.rb&quot;]
-    if driver == &quot;derby&quot;
-      files &lt;&lt; 'test/activerecord/connection_adapters/type_conversion_test.rb'
-    end
-    t.test_files = files
-    t.libs = []
-    if defined?(JRUBY_VERSION)
-      t.ruby_opts &lt;&lt; &quot;-rjdbc/#{driver}&quot;
-      t.libs &lt;&lt; &quot;lib&quot; &lt;&lt; &quot;#{d}/lib&quot;
-      t.libs.push *FileList[&quot;adapters/#{driver}*/lib&quot;]
-    end
-    t.libs &lt;&lt; &quot;test&quot;
-    t.verbose = true
-  end
-end
-
-Rake::TestTask.new(:test_jdbc) do |t|
-  t.test_files = FileList['test/generic_jdbc_connection_test.rb', 'test/jndi_callbacks_test.rb']
-  t.libs &lt;&lt; 'test' &lt;&lt; 'drivers/mysql/lib'
-end
-
-Rake::TestTask.new(:test_jndi) do |t|
-  t.test_files = FileList['test/jndi_test.rb']
-  t.libs &lt;&lt; 'test' &lt;&lt; 'drivers/derby/lib'
-end
-
-task :test_postgresql =&gt; [:test_postgres]
-task :test_pgsql =&gt; [:test_postgres]
-
-# Ensure driver for these DBs is on your classpath
-%w(oracle db2 cachedb mssql informix).each do |d|
-  Rake::TestTask.new(&quot;test_#{d}&quot;) do |t|
-    t.test_files = FileList[&quot;test/#{d}_simple_test.rb&quot;]
-    t.libs = []
-    t.libs &lt;&lt; 'lib' if defined?(JRUBY_VERSION)
-    t.libs &lt;&lt; 'test'
-  end
-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 &lt;&lt; 'test'
-end
-
-# Ensure that the jTDS driver is in your classpath before launching rake
-Rake::TestTask.new(:test_sybase_jtds) do |t|
-  t.test_files = FileList['test/sybase_jtds_simple_test.rb']
-  t.libs &lt;&lt; 'test' 
-end
-
-# Ensure that the jConnect driver is in your classpath before launching rake
-Rake::TestTask.new(:test_sybase_jconnect) do |t|
-  t.test_files = FileList['test/sybase_jconnect_simple_test.rb']
-  t.libs &lt;&lt; 'test' 
-end
-
-MANIFEST = FileList[&quot;History.txt&quot;, &quot;Manifest.txt&quot;, &quot;README.txt&quot;, 
-  &quot;Rakefile&quot;, &quot;LICENSE.txt&quot;, &quot;lib/**/*.rb&quot;, &quot;lib/jdbc_adapter/jdbc_adapter_internal.jar&quot;, &quot;test/**/*.rb&quot;,
-   &quot;lib/**/*.rake&quot;, &quot;src/**/*.java&quot;]
-
-file &quot;Manifest.txt&quot; =&gt; :manifest
-task :manifest do
-  File.open(&quot;Manifest.txt&quot;, &quot;w&quot;) {|f| MANIFEST.each {|n| f &lt;&lt; &quot;#{n}\n&quot;} }
-end
-Rake::Task['manifest'].invoke # Always regen manifest, so Hoe has up-to-date list of files
-
-require File.dirname(__FILE__) + &quot;/lib/jdbc_adapter/version&quot;
-begin
-  require 'hoe'
-  Hoe.new(&quot;activerecord-jdbc-adapter&quot;, JdbcAdapter::Version::VERSION) do |p|
-    p.rubyforge_name = &quot;jruby-extras&quot;
-    p.url = &quot;http://jruby-extras.rubyforge.org/activerecord-jdbc-adapter&quot;
-    p.author = &quot;Nick Sieger, Ola Bini and JRuby contributors&quot;
-    p.email = &quot;nick@nicksieger.com, ola.bini@gmail.com&quot;
-    p.summary = &quot;JDBC adapter for ActiveRecord, for use within JRuby on Rails.&quot;
-    p.changes = p.paragraphs_of('History.txt', 0..1).join(&quot;\n\n&quot;)
-    p.description = p.paragraphs_of('README.txt', 0...1).join(&quot;\n\n&quot;)
-  end.spec.dependencies.delete_if { |dep| dep.name == &quot;hoe&quot; }
-rescue LoadError
-  puts &quot;You really need Hoe installed to be able to package this gem&quot;
-rescue =&gt; e
-  puts &quot;ignoring error while loading hoe: #{e.to_s}&quot;
-end
-
-def rake(*args)
-  ruby &quot;-S&quot;, &quot;rake&quot;, *args
-end
-
-%w(test package install_gem release clean).each do |task|
-  desc &quot;Run rake #{task} on all available adapters and drivers&quot;
-  task &quot;all:#{task}&quot; =&gt; task
-end
-
-(Dir[&quot;drivers/*/Rakefile&quot;] + Dir[&quot;adapters/*/Rakefile&quot;]).each do |rakefile|
-  dir = File.dirname(rakefile)
-  prefix = dir.sub(%r{/}, ':')
-  tasks = %w(package install_gem debug_gem clean)
-  tasks &lt;&lt; &quot;test&quot; if File.directory?(File.join(dir, &quot;test&quot;))
-  tasks.each do |task|
-    desc &quot;Run rake #{task} on #{dir}&quot;
-    task &quot;#{prefix}:#{task}&quot; do
-      Dir.chdir(dir) do
-        rake task
-      end
-    end
-    task &quot;#{File.dirname(dir)}:#{task}&quot; =&gt; &quot;#{prefix}:#{task}&quot;
-    task &quot;all:#{task}&quot; =&gt; &quot;#{prefix}:#{task}&quot;
-  end
-  desc &quot;Run rake release on #{dir}&quot;
-  task &quot;#{prefix}:release&quot; do
-    Dir.chdir(dir) do
-      version = nil
-      if dir =~ /adapters/
-        version = ENV['VERSION']
-      else
-        Dir[&quot;lib/**/*.rb&quot;].each do |file|
-          version ||= File.open(file) {|f| f.read =~ /VERSION = &quot;([^&quot;]+)&quot;/ &amp;&amp; $1}
-        end
-      end
-      rake &quot;release&quot;, &quot;VERSION=#{version}&quot;
-    end
-  end
-  # Only release adapters synchronously with main release. Drivers are versioned
-  # according to their JDBC driver versions.
-  if dir =~ /adapters/
-    task &quot;adapters:release&quot; =&gt; &quot;#{prefix}:release&quot;
-    task &quot;all:release&quot; =&gt; &quot;#{prefix}:release&quot;
-  end
-end
-
-require 'rake/clean'
-CLEAN.include 'derby*', 'test.db.*','test/reports', 'test.sqlite3','lib/**/*.jar','manifest.mf', '*.log'</diff>
      <filename>Rakefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4f0d0aa1abbb491477e00de1d6c75d573d28a09a</id>
    </parent>
  </parents>
  <author>
    <name>Nick Sieger</name>
    <email>nick@nicksieger.com</email>
  </author>
  <url>http://github.com/nicksieger/activerecord-jdbc-adapter/commit/6a2f433ce9599d7f23e0f6ceee9835fbef912547</url>
  <id>6a2f433ce9599d7f23e0f6ceee9835fbef912547</id>
  <committed-date>2009-09-22T21:43:51-07:00</committed-date>
  <authored-date>2009-09-22T21:43:51-07:00</authored-date>
  <message>Refactor rakefile, add a rails:test target for running activerecord tests from ar-jdbc sandbox</message>
  <tree>25d55472a8d5f21ab0d3560676faae1d512cb11e</tree>
  <committer>
    <name>Nick Sieger</name>
    <email>nick@nicksieger.com</email>
  </committer>
</commit>
