-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
43 lines (35 loc) · 1.04 KB
/
Rakefile
File metadata and controls
43 lines (35 loc) · 1.04 KB
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
33
34
35
36
37
38
39
40
41
42
43
# encoding: UTF-8
desc "(Re-) generate documentation and place it in the docs/ dir."
task :docs => :"docs:yard"
namespace :doc do
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
t.options = ['-odoc/', '--no-private']
end
desc "Docs including private methods."
YARD::Rake::YardocTask.new(:all) do |t|
t.files = ['lib/**/*.rb']
t.options = ['-odocs/']
end
desc "How to use the docs."
task :usage do
puts "Open the index.html file in the docs directory to read them. Does not include methods marked private unless you ran the 'all' version (you'll only need these if you plan to hack on the library itself)."
end
end
task :default => "spec"
task :spec => :"spec:run"
task :rspec => :spec
namespace :spec do
task :environment do
ENV["RACK_ENV"] = "test"
end
desc "Run specs"
task :run, [:any_args] => :"spec:environment" do |t,args|
warn "Entering spec task."
any_args = args[:any_args] || ""
cmd = "bin/rspec #{any_args}"
warn cmd
system cmd
end
end