-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Rakefile
75 lines (63 loc) · 2.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- ruby -*-
require "rubygems"
require "hoe"
require "rake/clean"
Hoe.plugin :doofus
Hoe.plugin :gemspec2
Hoe.plugin :git
Hoe.plugin :minitest
Hoe.plugin :travis
Hoe.plugin :email unless ENV["CI"] || ENV["TRAVIS"]
spec = Hoe.spec "color" do
developer("Austin Ziegler", "[email protected]")
developer("Matt Lyon", "[email protected]")
license "MIT"
self.history_file = "History.rdoc"
self.readme_file = "README.rdoc"
extra_dev_deps << ["hoe-doofus", "~> 1.0"]
extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
extra_dev_deps << ["hoe-git", "~> 1.6"]
extra_dev_deps << ["hoe-travis", "~> 1.2"]
extra_dev_deps << ["minitest", "~> 5.8"]
extra_dev_deps << ["minitest-around", "~> 0.3"]
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
extra_dev_deps << ["minitest-bisect", "~> 1.2"]
extra_dev_deps << ["minitest-focus", "~> 1.1"]
extra_dev_deps << ["minitest-moar", "~> 0.0"]
extra_dev_deps << ["minitest-pretty_diff", "~> 0.1"]
extra_dev_deps << ["rake", "<14"]
if RUBY_VERSION >= "1.9"
extra_dev_deps << ["simplecov", "~> 0.7"]
extra_dev_deps << ["coveralls", "~> 0.7"] if ENV["CI"] || ENV["TRAVIS"]
end
end
if RUBY_VERSION >= "1.9"
namespace :test do
if ENV["CI"] || ENV["TRAVIS"]
desc "Submit test coverage to Coveralls"
task :coveralls do
spec.test_prelude = [
'require "psych"',
'require "simplecov"',
'require "coveralls"',
"SimpleCov.formatter = Coveralls::SimpleCov::Formatter",
'SimpleCov.start("test_frameworks") { command_name "Minitest" }',
'gem "minitest"'
].join("; ")
Rake::Task["test"].execute
end
Rake::Task["travis"].prerequisites.replace(%w[test:coveralls])
end
desc "Runs test coverage. Only works Ruby 1.9+ and assumes 'simplecov' is installed."
task :coverage do
spec.test_prelude = [
'require "simplecov"',
'SimpleCov.start("test_frameworks") { command_name "Minitest" }',
'gem "minitest"'
].join("; ")
Rake::Task["test"].execute
end
CLOBBER << "coverage"
end
end
# vim: syntax=ruby