Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (33 sloc) 1.058 kB
require 'rdoc/task'
require 'sdoc'
require 'rspec/core/rake_task'
require "rubygems/package_task"
desc "Run all tests: Exhaustive."
RSpec::Core::RakeTask.new
task :default => :spec
# Generate documentation
RDoc::Task.new do |rdoc|
rdoc.title = "floor manager manages entire floors of employees!"
rdoc.options << '--line-numbers'
rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
rdoc.template = 'direct' # lighter template used on railsapi.com
rdoc.main = "README"
rdoc.rdoc_files.include("README", "lib/**/*.rb")
rdoc.rdoc_dir = "rdoc"
end
desc 'Clear out RDoc'
task :clean => [:clobber_rdoc, :clobber_package]
# This task actually builds the gem.
task :gem => :spec
spec = eval(File.read('floor_manager.gemspec'))
desc "Generate the gem package."
Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
desc "Prints LOC stats"
task :stat do
%w(lib spec example).each do |dir|
loc = %x(find #{dir} -name "*.rb" | xargs wc -l | grep 'total').split.first.to_i
printf("%20s %d\n", dir, loc)
end
end
Jump to Line
Something went wrong with that request. Please try again.