Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (29 sloc) 0.941 kb
d31f4e1 Darrin Holst new version
darrinholst authored
1 require 'rubygems'
2 require 'rake'
3 require 'rake/clean'
4 require 'rake/testtask'
44f88f3 Update to 3.2.0.beta1 and remove fix some rake deprecations.
Charlie Savage authored
5 require 'rubygems/package_task'
1043561 Simplify connection specs a bit and move under tests.
Charlie Savage authored
6
7b383f3 Update gem spec and bump to version to 3.0.0.b (for prelease beta)
Charlie Savage authored
7 # Set global variable so other tasks can access them
1629626 Make rake tasks work with rake 0.9 beta
Charlie Savage authored
8 ::PROJECT_ROOT = File.expand_path(".")
9 ::GEM_NAME = 'composite_primary_keys'
7b383f3 Update gem spec and bump to version to 3.0.0.b (for prelease beta)
Charlie Savage authored
10
7e1f83b Move gemspec out of Rake file to use more modern gem packaging technique...
Charlie Savage authored
11 # Read the spec file
12 spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
d31f4e1 Darrin Holst new version
darrinholst authored
13
7e1f83b Move gemspec out of Rake file to use more modern gem packaging technique...
Charlie Savage authored
14 # Setup Rake tasks for managing the gem
44f88f3 Update to 3.2.0.beta1 and remove fix some rake deprecations.
Charlie Savage authored
15 Gem::PackageTask.new(spec).define
1043561 Simplify connection specs a bit and move under tests.
Charlie Savage authored
16
7e1f83b Move gemspec out of Rake file to use more modern gem packaging technique...
Charlie Savage authored
17 # Now load in other task files
7b383f3 Update gem spec and bump to version to 3.0.0.b (for prelease beta)
Charlie Savage authored
18 Dir.glob('tasks/**/*.rake').each do |rake_file|
19 load File.join(File.dirname(__FILE__), rake_file)
d071864 Toby Cabot re-add rake tasks to run db-specific tests
ccabot authored
20 end
21
0b337c8 Toby Cabot changed the way unit tests are run so they can have a default adapter
ccabot authored
22 # Set up test tasks for each supported connection adapter
7350591 Jan Vlnas Rake: Rename sqlite:test task to sqlite3:test for consistency
jnv authored
23 %w(mysql sqlite3 oracle oracle_enhanced postgresql ibm_db).each do |adapter|
0b337c8 Toby Cabot changed the way unit tests are run so they can have a default adapter
ccabot authored
24 namespace adapter do
25 desc "Run tests using the #{adapter} adapter"
26 task "test" do
27 ENV["ADAPTER"] = adapter
28 Rake::TestTask.new("subtest_#{adapter}") do |t|
29 t.libs << "test"
30 end
31 Rake::Task["subtest_#{adapter}"].invoke
32 end
d071864 Toby Cabot re-add rake tasks to run db-specific tests
ccabot authored
33 end
34 end
Something went wrong with that request. Please try again.