-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
76 lines (65 loc) · 2.18 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
76
# frozen_string_literal: true
# -*- ruby -*-
require 'rake/testtask'
require 'rubocop/rake_task'
require_relative 'lib/pmdtester'
gem 'hoe'
require 'hoe'
Hoe.plugin :bundler
Hoe.plugin :git
hoe = Hoe.spec 'pmdtester' do
self.version = PmdTester::VERSION
developer 'Andreas Dangel', '[email protected]'
developer 'Binguo Bao', '[email protected]'
developer 'Clément Fournier', '[email protected]'
self.clean_globs = %w[target/reports/**/* target/test/**/* target/dynamic-config.xml]
self.extra_deps += [
['nokogiri', '~> 1.13'],
['slop', '~> 4.9'],
['differ', '~> 0.1'],
['rufus-scheduler', '~> 3.8'],
['logger-colors', '~> 1.0'],
['liquid', '~> 5.4'],
['base64', '~> 0.2'],
['bigdecimal', '~> 3.1'],
]
self.extra_dev_deps += [
['hoe-bundler', '~> 1.5'],
['hoe-git', '~> 1.6'],
['minitest', '~> 5.16'],
['mocha', '~> 1.16'],
['rubocop', '~> 1.60'],
['test-unit', '~> 3.5'],
['rdoc', '~> 6.4'],
# Pin rake to 13.1.0, which is still compatible with hoe. See https://github.com/seattlerb/hoe/pull/118
['rake', '13.1.0']
]
spec_extras[:required_ruby_version] = '>= 2.7'
license 'BSD-2-Clause'
end
# Refers to
# https://docs.rubocop.org/rubocop/1.60/integration_with_other_tools.html#rake-integration
RuboCop::RakeTask.new(:rubocop)
# Run integration test cases
Rake::TestTask.new('integration-test') do |task|
task.description = 'Run integration test cases'
task.libs = ['test']
task.pattern = 'test/**/integration_test_*.rb'
task.verbose = true
end
desc 'generate the pmdtester.gemspec file'
task 'hoe:spec' do
attention_message = '# DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake hoe:spec`.'
File.open("#{hoe.name}.gemspec", 'w') do |f|
f.puts attention_message
f.puts
f.write hoe.spec.to_ruby
f.puts
f.puts attention_message
end
end
desc 'verify code quality before committing changes'
task 'verify' => ['clean', 'test', 'rubocop', 'git:manifest', 'hoe:spec', 'check_manifest'] do
Rake.application.invoke_task('bundler:gemfile[,true]')
end
# vim: syntax=ruby