-
Notifications
You must be signed in to change notification settings - Fork 141
/
Rakefile
executable file
·47 lines (35 loc) · 1.09 KB
/
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
#!/usr/bin/env rake
# frozen_string_literal: true
require 'bundler/gem_tasks'
task default: :test
# ==========================================================
# Packaging
# ==========================================================
require 'rubygems/package_task'
# ==========================================================
# Testing
# ==========================================================
require 'rake/testtask'
Rake::TestTask.new 'test' do |t|
t.test_files = FileList['test/test_*.rb']
end
# ==========================================================
# Benchmarking
# ==========================================================
task :bench do
sh 'ruby bench.rb'
end
# ==========================================================
# Vendor
# ==========================================================
namespace :vendor do
file 'vendor/pygments-main' do |f|
sh "pip install --target=#{f.name} pygments"
sh "git add -- #{f.name}"
end
task :clobber do
rm_rf 'vendor/pygments-main'
end
desc 'update vendor/pygments-main'
task update: [:clobber, 'vendor/pygments-main']
end