-
Notifications
You must be signed in to change notification settings - Fork 51
/
Rakefile
41 lines (34 loc) · 860 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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rdoc/task'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
desc 'Default Task'
task default: %i[test rubocop]
namespace :ci do
task :build do
puts 'Creating tests/output directory...'
FileUtils.mkdir_p 'tests/output'
Rake::Task[:test].invoke
end
end
# Run the unit tests
desc 'Run all unit tests'
Rake::TestTask.new('test') do |t|
t.libs << 'lib'
t.pattern = 'tests/*_test.rb'
t.verbose = true
end
# Genereate the RDoc documentation
desc 'Create documentation'
Rake::RDocTask.new('doc') do |rdoc|
rdoc.title = 'Ruby GPX API'
rdoc.rdoc_dir = 'html'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc 'open an irb session preloaded with this gem'
task :console do
sh 'irb -r pp -r ./lib/gpx.rb'
end