-
Notifications
You must be signed in to change notification settings - Fork 1
/
tasks.rb
executable file
·51 lines (43 loc) · 1.32 KB
/
tasks.rb
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
49
50
51
#!./bin/nake
# encoding: utf-8
begin
require File.expand_path("../.bundle/environment", __FILE__)
rescue LoadError
require "bundler"
Bundler.setup
end
$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
require "nake/tasks/gem"
require "nake/tasks/spec"
require "nake/tasks/release"
begin
load "code-cleaner.nake"
Nake::Task["hooks:whitespace:install"].tap do |task|
task.config[:encoding] = "utf-8"
task.config[:whitelist] = '(bin/[^/]+|.+\.(rb|rake|nake|thor|task))$'
end
rescue LoadError
warn "If you want to contribute to nake, you have to install code-cleaner gem and then run ./tasks.rb hooks:whitespace:install to get Git pre-commit hook for removing trailing whitespace and improving code quality in general."
end
Task[:build].config[:gemspec] = "nake.gemspec"
Task[:prerelease].config[:gemspec] = "nake.pre.gemspec"
Task[:release].config[:name] = "nake"
Task[:release].config[:version] = Nake::VERSION
Task.new(:features) do |task|
task.description = "Run cucumber scenarios"
task.define do
sh "cucumber features"
end
end
Task.new(:bm) do |task|
task.description = "Run benchmarks"
task.define do
load "#{File.dirname(__FILE__)}/bm/bms.rb"
end
end
Task.new("bm:save") do |task|
task.description = "Run benchmarks"
task.define do
sh "ruby bm/bms.rb > bm/output.txt"
end
end