forked from composite-primary-keys/composite_primary_keys
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rakefile
55 lines (48 loc) · 1.67 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
# Set global variable so other tasks can access them
PROJECT_ROOT = File.expand_path(".")
GEM_NAME = 'composite_primary_keys'
# Read the current version
require File.join(File.dirname(__FILE__), 'lib', 'composite_primary_keys', 'version')
# Setup Gem Specs
spec = Gem::Specification.new do |s|
s.name = GEM_NAME
s.version = CompositePrimaryKeys::VERSION::STRING
s.platform = Gem::Platform::RUBY
s.authors = ["Dr Nic Williams", "Charlie Savage"]
s.email = ["[email protected]"]
s.homepage = "http://github.com/cfis/composite_primary_keys"
s.summary = "Composite key support for ActiveRecord"
s.rubyforge_project = 'compositekeys'
s.description = "Composite key support for ActiveRecord 3"
s.files = FileList['Rakefile',
'*.txt',
'*.rb',
'lib/**/*',
'local/**/*',
'scripts/**/*',
'tasks/**/*',
'test/**/*'].to_a
s.require_path = 'lib'
s.test_files = Dir.glob("test/**")
s.date = Time.new
s.has_rdoc = true
# Dependencies
s.required_ruby_version = '>= 1.8.7'
s.add_dependency('activerecord', '>= 3.0.1')
s.add_development_dependency "rspec"
end
# Rake task to build the default package
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
# Load task files
Dir.glob('tasks/**/*.rake').each do |rake_file|
load File.join(File.dirname(__FILE__), rake_file)
end