Other examples of Sinatra using Rake
If you look at the Rakefile
of Sinatra, you may see that there a lot of examples of the Rake appliance. For example, you could find a task to package the Sinatra into a gem:
file package('.gem') => %w[pkg/ sinatra.gemspec] + spec.files do |f| sh "gem build sinatra.gemspec" mv File.basename(f.name), f.name end
You will also find how the developers configure the list for the clobber
task (go back to Chapter 4, Cleaning Up a Build), installation tasks, and so on. Reviewing a real example is a good practice to consolidate knowledge, but here, we have limited the scope to be able to fully investigate Rakefile
, so this exercise is delegated to you.