-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile
More file actions
36 lines (29 loc) · 685 Bytes
/
Copy pathrakefile
File metadata and controls
36 lines (29 loc) · 685 Bytes
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
require 'rubygems'
require 'rake'
task :default => :console
def name
@name ||= Dir['*.gemspec'].first.split('.').first
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -r ./lib/#{name}.rb"
end
desc "Cleans up any .gem locally"
task :clean do
if Dir['*.gem'].any? then
sh "rm *.gem"
end
end
desc "Builds the clemente-X.X.X.gem"
task :gem => [:clean] do |t|
sh "gem build #{name}.gemspec"
end
desc "Install clemente-X.X.X.gem locally"
multitask :install => [:gem, :uninstall] do |t|
gem = Dir['*.gem'].first
sh "gem install ./#{gem}"
end
desc "Uninstalls clemente-X.X.X.gem"
task :uninstall do
sh "gem uninstall #{name}"
end