-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathRakefile
More file actions
97 lines (81 loc) · 2.49 KB
/
Copy pathRakefile
File metadata and controls
97 lines (81 loc) · 2.49 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# frozen_string_literal: true
require "rubygems"
require "hoe"
require "rake/clean"
require "rdoc/task"
require "minitest"
require "minitest/test_task"
Hoe.plugin :halostatue
Hoe.plugin :rubygems
Hoe.plugins.delete :debug
Hoe.plugins.delete :newb
Hoe.plugins.delete :publish
Hoe.plugins.delete :signing
Hoe.plugins.delete :test
hoe = Hoe.spec "minitar" do
developer("Austin Ziegler", "halostatue@gmail.com")
self.trusted_release = ENV["rubygems_release_gem"] == "true"
require_ruby_version ">= 3.1"
self.licenses = ["Ruby", "BSD-2-Clause"]
spec_extras[:metadata] = ->(val) {
val["rubygems_mfa_required"] = "true"
}
extra_dev_deps << ["hoe", "~> 4.0"]
extra_dev_deps << ["hoe-halostatue", "~> 2.1", ">= 2.1.1"]
extra_dev_deps << ["irb", "~> 1.0"]
extra_dev_deps << ["minitest", "~> 5.16"]
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
extra_dev_deps << ["minitest-focus", "~> 1.1"]
extra_dev_deps << ["rake", ">= 10.0", "< 14"]
extra_dev_deps << ["rdoc", ">= 0.0", "< 7"]
extra_dev_deps << ["simplecov", "~> 0.22"]
extra_dev_deps << ["simplecov-lcov", "~> 0.8"]
extra_dev_deps << ["standard", "~> 1.0"]
extra_dev_deps << ["standard-minitest", "~> 1.0"]
extra_dev_deps << ["standard-thread_safety", "~> 1.0"]
end
Minitest::TestTask.create :test
Minitest::TestTask.create :coverage do |t|
formatters = <<-RUBY.split($/).join(" ")
SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
SimpleCov::Formatter::SimpleFormatter
])
RUBY
t.test_prelude = <<-RUBY.split($/).join("; ")
require "simplecov"
require "simplecov-lcov"
SimpleCov::Formatter::LcovFormatter.config do |config|
config.report_with_single_file = true
config.lcov_file_name = "lcov.info"
end
SimpleCov.start "test_frameworks" do
enable_coverage :branch
primary_coverage :branch
formatter #{formatters}
end
RUBY
end
task default: :test
task :version do
require "minitar/version"
puts Minitar::VERSION
end
RDoc::Task.new do
_1.title = "minitar"
_1.main = "README.md"
_1.rdoc_dir = "doc"
_1.rdoc_files = hoe.spec.require_paths - ["Manifest.txt"] + hoe.spec.extra_rdoc_files
_1.markup = "markdown"
end
task docs: :rerdoc
task :console do
arguments = %w[irb]
arguments.push(*hoe.spec.require_paths.map { |dir| "-I#{dir}" })
arguments.push("-r#{hoe.spec.name.gsub("-", File::SEPARATOR)}")
unless system(*arguments)
error "Command failed: #{show_command}"
abort
end
end