-
Notifications
You must be signed in to change notification settings - Fork 382
/
Rakefile
44 lines (37 loc) · 1.05 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
require 'rubygems'
require 'bundler/setup'
require 'rake'
require 'rake/testtask'
require File.expand_path('../lib/mongo_mapper/version', __FILE__)
namespace :test do
Rake::TestTask.new(:all) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/{functional,unit}/**/test_*.rb'
test.verbose = true
end
desc "Run active model lint test"
task :am_lint do
sh 'ruby -Itest -rubygems test/test_active_model_lint.rb'
end
end
desc 'Runs all tests and ActiveModel lint'
task :test do
Rake::Task['test:all'].invoke
Rake::Task['test:am_lint'].invoke
end
task :default => :test
desc 'Builds the gem'
task :build do
sh "gem build mongo_mapper.gemspec"
end
desc 'Builds and installs the gem'
task :install => :build do
sh "gem install mongo_mapper-#{MongoMapper::Version}"
end
desc 'Tags version, pushes to remote, and pushes gem'
task :release => :build do
sh "git tag v#{MongoMapper::Version}"
sh "git push origin master"
sh "git push origin v#{MongoMapper::Version}"
sh "gem push mongo_mapper-#{MongoMapper::Version}.gem"
end