-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRakefile
29 lines (24 loc) · 802 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
$:.unshift 'lib'
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'spec/rake/spectask'
HANOI_VERSION = "0.0.3"
task :default => :spec
desc 'Build and install the gem (useful for development purposes).'
task :install do
system "gem build hanoi.gemspec"
system "sudo gem uninstall hanoi"
system "sudo gem install --local --no-rdoc --no-ri hanoi-#{HANOI_VERSION}.gem"
system "rm hanoi-*.gem"
end
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = %w(-fs --color)
end
desc 'Show the file list for the gemspec file'
task :files do
puts "Files:\n #{Dir['**/*'].reject {|f| File.directory?(f)}.sort.inspect}"
puts "Test files:\n #{Dir['spec/**/*_spec.rb'].reject {|f| File.directory?(f)}.sort.inspect}"
end