-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
48 lines (39 loc) · 955 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
38
39
40
41
42
43
44
45
46
47
48
# frozen_string_literal: true
require 'rake'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'jekyll'
require 'html-proofer'
# Extend string to allow for bold text.
class String
def bold
"\033[1m#{self}\033[0m"
end
end
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir.glob('spec/*_spec.rb')
t.rspec_opts = '--format documentation'
end
desc 'Runs RuboCop'
desc task :rubocop do
RuboCop::RakeTask.new
end
namespace :codecov do
desc 'Uploads the latest SimpleCov result set to codecov.io'
task :upload do
require 'simplecov'
require 'codecov'
formatter = SimpleCov::Formatter::Codecov.new
formatter.format(SimpleCov::ResultMerger.merged_result)
end
end
# Rake Jekyll tasks
task :build do
puts 'Building site...'.bold
Jekyll::Commands::Build.process(profile: true)
end
task :clean do
puts 'Cleaning up _site...'.bold
Jekyll::Commands::Clean.process({})
end
task default: ['spec']