Rakefile in memoize-1.2.3 vs Rakefile in memoize-1.3.0
- old
+ new
@@ -1,24 +1,34 @@
require 'rake'
require 'rake/testtask'
require 'rbconfig'
include Config
-desc 'Install the memoize package (non-gem)'
+desc 'Install the memoize library (non-gem)'
task :install do
- sitelibdir = CONFIG["sitelibdir"]
- file = "lib/memoize.rb"
+ sitelibdir = CONFIG['sitelibdir']
+ file = 'lib/memoize.rb'
FileUtils.cp(file, sitelibdir, :verbose => true)
end
+desc 'Install the memoize library as a gem'
task :install_gem do
ruby 'memoize.gemspec'
- file = Dir["*.gem"].first
- sh "gem install #{file}"
+ file = Dir['*.gem'].first
+ sh 'gem install #{file}'
end
+desc 'Run the fibonacci example & benchmarks'
+task :example_fib do
+ ruby '-Ilib examples/example_fibonacci.rb'
+end
+
+desc 'Run the memoize example & benchmarks'
+task :example_memoize do
+ ruby '-Ilib examples/example_memoize.rb'
+end
+
Rake::TestTask.new do |t|
t.libs << 'test'
t.verbose = true
t.warning = true
- t.test_files = FileList['test/tc_memoize.rb']
end