-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRakefile
38 lines (28 loc) · 822 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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'yard'
def shell(*args)
puts "running: #{args.join(' ')}"
system(args.join(' '))
end
task :clean do
shell('rm -rf pkg/ tmp/ coverage/ doc/ ')
end
task gem: [:build] do
shell('gem install pkg/*')
end
task permissions: [:clean] do
shell('chmod -v o+r,g+r * */* */*/* */*/*/* */*/*/*/* */*/*/*/*/*')
shell('find . -type d -exec chmod o+x,g+x {} \\;')
end
task build: :permissions
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = %w[lib/**/*.rb exe/* - README.adoc CHANGELOG.md LICENSE.txt]
t.options.unshift('--title', '"Puma Daemon"')
t.after = -> { exec('open doc/index.html') }
end
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
task default: %i[spec rubocop]