Sha256: 0073977a6c33dccfd6585cac9820955ff44f6af815eab63891fea2a582c87adf
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
require 'rake' require 'rake/testtask' require 'rake/rdoctask' def can_require( file ) begin require file return true rescue LoadError return false end end desc "Default task" task :default => [ :demo ] desc "Demonstration of the application" task :demo do puts "=================================================================" puts "This is a demonstration of Jamis Buck's solution to Ruby Quiz #1," puts "\"The Solitaire Cipher\". To run it yourself, invoke the script" puts "\"bin/main.rb\", and pass the message(s) you want to encrypt or" puts "decrypt as parameters." puts "=================================================================" puts sh 'ruby bin/main.rb "The rain in Spain stays mainly in the plain" ' + '"CLEPK HHNIY CFPWH FDFEH"' end desc "Build documentation" task :doc => [ :rdoc, :packrat ] task :rdoc => Dir["lib/*.rb"] desc "Clean generated files" task :clean do rm_rf "doc/api" rm_rf "doc/packages" end desc "Generate the package reference documentation" task :packrat => [ "doc/packages/index.html" ] file "doc/packages/index.html" do sh "packrat -o doc/packages -v -T 'Ruby Quiz #1: The Solitaire Cipher' lib" end Rake::TestTask.new do |t| t.test_files = [ "test/tests.rb" ] t.verbose = true end Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'doc/api' rdoc.title = "Ruby Quiz #1: The Solitaire Cipher" rdoc.rdoc_files.include('lib/*.rb') end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
copland-0.8.0 | examples/solitaire-cipher/Rakefile |
copland-1.0.0 | examples/solitaire-cipher/Rakefile |