-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathRakefile
45 lines (36 loc) · 990 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
# frozen_string_literal: true
require 'rubygems'
require 'rubygems/package_task'
require 'rake/testtask'
require 'rdoc/task'
require 'bundler/gem_tasks'
$LOAD_PATH.push File.expand_path(File.dirname(__FILE__), 'lib')
version = Webhookr::VERSION
desc 'Test Webhookr'
Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/**/*_test.rb']
t.verbose = !!ENV['VERBOSE_TESTS']
t.warning = !!ENV['WARNINGS']
end
desc 'Build docs'
Rake::RDocTask.new do |t|
t.main = 'README.md'
t.title = "Webhookr #{version}"
t.rdoc_dir = 'doc'
t.rdoc_files.include('README.md', 'MIT-LICENSE', 'lib/**/*.rb')
end
namespace :webhookr do
namespace :test do
desc 'Install gems in all Rubies'
task :install do
sh %{rbenv each -v bundle install}
end
desc 'Test with all Rubies'
task :test_versions do
sh %{rbenv each -v bundle exec rake test}
end
desc 'Install and test all'
task all: [:install, :test_versions]
end
end
task default: :test