Sha256: 0028dd0c41889d92a7f603376c41a283342aa94a88af99e32c93aec345970267

Contents?: true

Size: 1.42 KB

Versions: 7

Compression:

Stored size: 1.42 KB

Contents

require 'rake/testtask'
require 'rake/clean'
CLEAN.include 'derby*', 'test.db.*','test/reports', 'test.sqlite3','lib/**/*.jar','manifest.mf', '*.log'

require 'bundler'
Bundler::GemHelper.install_tasks
require 'bundler/setup'

require File.expand_path('../test/helper', __FILE__)

task :default => [:jar, :test]

#ugh, bundler doesn't use tasks, so gotta hook up to both tasks.
task :build => :jar
task :install => :jar

ADAPTERS = %w[derby h2 hsqldb mssql mysql postgresql sqlite3].map {|a| "activerecord-jdbc#{a}-adapter" }
DRIVERS  = %w[derby h2 hsqldb jtds mysql postgres sqlite3].map {|a| "jdbc-#{a}" }

def rake(args)
  ruby "-S", "rake", *args
end

(ADAPTERS + DRIVERS).each do |adapter|
  namespace adapter do

    task :build do
      Dir.chdir(adapter) do
        rake "build"
      end
      cp FileList["#{adapter}/pkg/#{adapter}-*.gem"], "pkg"
    end

    # bundler handles install => build itself
    task :install do
      Dir.chdir(adapter) do
        rake "install"
      end
    end

    task :release do
      Dir.chdir(adapter) do
        rake "release"
      end
    end
  end
end

desc "Release all adapters"
task "all:release" => ["release", *ADAPTERS.map { |f| "#{f}:release" }]

desc "Install all adapters"
task "all:install" => ["install", *ADAPTERS.map { |f| "#{f}:install" }]

desc "Build all adapters"
task "all:build"   => ["build", *ADAPTERS.map { |f| "#{f}:build" }]

task :filelist do
  puts FileList['pkg/**/*'].inspect
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
cmoran92-activerecord-jdbc-adapter-1.2.1.2 Rakefile
tgbyte-activerecord-jdbc-adapter-1.2.2.5 Rakefile
tgbyte-activerecord-jdbc-adapter-1.2.2.4 Rakefile
activerecord-jdbc-adapter-1.2.2.1 Rakefile
cmoran92-activerecord-jdbc-adapter-1.2.1.1 Rakefile
activerecord-jdbc-adapter-1.2.2 Rakefile
cmoran92-activerecord-jdbc-adapter-1.2.1 Rakefile