-
Notifications
You must be signed in to change notification settings - Fork 454
/
Rakefile
32 lines (27 loc) · 620 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
def windows?
Rake::Win32.windows?
end
begin
require 'rspec/core/rake_task'
task :default => :spec
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = "spec/**/*_spec.rb"
t.rspec_opts =
"--format d"
t.rspec_opts += " --color" unless windows?
# t.ruby_opts="-w"
end
rescue LoadError # swallow Heroku deploy error
end
def rerun cmd, rerun_opts = nil
if windows?
exec cmd
else
exec "rerun #{rerun_opts} -- #{cmd}"
end
end
desc "run the site locally (visit http://localhost:9292)"
task :run do
rerun "rackup -s thin -p #{ENV['PORT'] || 9292}"
end