-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
executable file
·37 lines (30 loc) · 999 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
33
34
35
36
37
#!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
require 'rubygems'
require 'yard'
require 'rspec/core/rake_task'
task :default => :spec
task :specs => :spec
namespace :gem do
desc "Build the sinatra-linkeddata-#{File.read('VERSION').chomp}.gem file"
task :build do
sh "gem build sinatra-linkeddata.gemspec && mv sinatra-linkeddata-#{File.read('VERSION').chomp}.gem pkg/"
end
desc "Release the sinatra-linkeddata-#{File.read('VERSION').chomp}.gem file"
task :release do
sh "gem push pkg/sinatra-linkeddata-#{File.read('VERSION').chomp}.gem"
end
end
RSpec::Core::RakeTask.new(:spec)
desc "Run specs through RCov"
RSpec::Core::RakeTask.new("spec:rcov") do |spec|
spec.rcov = true
spec.rcov_opts = %q[--exclude "spec"]
end
namespace :doc do
YARD::Rake::YardocTask.new
desc "Generate HTML report specs"
RSpec::Core::RakeTask.new("spec") do |spec|
spec.rspec_opts = ["--format", "html", "-o", "doc/spec.html"]
end
end