forked from parabuzzle/humanize_boolean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
48 lines (35 loc) · 822 Bytes
/
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
require "bundler/gem_tasks"
# humanize_boolean
# - adds humanize method to boolean objects
#
# originated by Mike Heijmans
require 'rake'
# Run the tests and build a test package by default
task :default => [:build]
# map test_and_build task to proper tasks
task :test_and_build => [:test, 'gem:clean', 'gem:build']
# map install
task :install => ['gem:install']
task :clean => ['gem:clean']
task :build => [:test_and_build]
task :test do
# define the tests
ruby "test/test_helper.rb"
end
namespace :gem do
task :clean do
begin
sh "rm ./pkg/humanize_boolean-*"
rescue
end
end
task :build do
sh "gem build ./humanize_boolean.gemspec"
end
task :install do
sh "gem install ./pkg/humanize_boolean"
end
task :push do
sh "gem push pkg/`ls pkg | grep .gem`"
end
end