Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 45 lines (37 sloc) 1.395 kb
036ee80 @nakajima added Rakefile for running specs, slight refactorings
authored
1 require 'spec/rake/spectask'
21f9cb9 @nakajima added rake tasks for staying on the edge of Sinatra
authored
2 require 'rake/classic_namespace'
953cad6 @baldowl Added task for running features with Cucumber.
baldowl authored
3 require 'cucumber/rake/task'
036ee80 @nakajima added Rakefile for running specs, slight refactorings
authored
4
953cad6 @baldowl Added task for running features with Cucumber.
baldowl authored
5 task :default => [:spec, :features]
036ee80 @nakajima added Rakefile for running specs, slight refactorings
authored
6
7 desc "Run all specs"
8 Spec::Rake::SpecTask.new('spec') do |t|
9 t.spec_files = FileList['spec/**/*.rb']
10 t.spec_opts = ['--colour']
21f9cb9 @nakajima added rake tasks for staying on the edge of Sinatra
authored
11 end
12
953cad6 @baldowl Added task for running features with Cucumber.
baldowl authored
13 Cucumber::Rake::Task.new do |c|
14 c.cucumber_opts = '--format progress'
15 end
16
21f9cb9 @nakajima added rake tasks for staying on the edge of Sinatra
authored
17 namespace :sinatra do
18 desc "Clone edge Sinatra"
19 task :clone do
20 vendor_dir = File.join(File.dirname(__FILE__), 'vendor')
21 FileUtils.mkdir_p(vendor_dir)
22 puts "* cloning git://github.com/rtomayko/sinatra.git"
23 system("git clone git://github.com/rtomayko/sinatra.git #{File.expand_path(vendor_dir)}/sinatra")
24 puts "* done."
25 end
26
27 desc "Update edge Sinatra"
28 task :pull do
29 sinatra_dir = File.join(File.dirname(__FILE__), 'vendor', 'sinatra')
30 Task["sinatra:clone"].invoke unless File.exists?(sinatra_dir)
31
32 puts "* pulling from git://github.com/rtomayko/sinatra.git"
33 system("cd #{File.expand_path(sinatra_dir)} && git pull git://github.com/rtomayko/sinatra.git master")
34 puts "* done."
35 end
36
37 desc "Install edge Sinatra"
38 task :install => :pull do
39 sinatra_dir = File.join(File.dirname(__FILE__), 'vendor', 'sinatra')
40 Task["sinatra:clone"].invoke unless File.exists?(sinatra_dir)
41 puts "* installing edge sinatra"
42 system("cd #{File.expand_path(sinatra_dir)} && rake install")
43 end
44 end
Something went wrong with that request. Please try again.