-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
73 lines (62 loc) · 2.17 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
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rake/version_task'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard'
require 'yard/rake/yardoc_task'
require 'rubocop/rake_task'
require 'quadtree'
RSpec::Core::RakeTask.new(:spec)
spec = Gem::Specification.new do |s|
s.name = 'quadtree'
s.version = Quadtree::VERSION
s.authors = ['Jan Lindblom']
s.email = ['[email protected]']
s.summary = 'Quadtrees in Ruby.'
s.homepage = 'https://github.com/janlindblom/ruby-quadtree'
s.metadata['homepage_uri'] = s.homepage
s.metadata['source_code_uri'] = 'https://github.com/janlindblom/ruby-quadtree'
s.license = 'MIT'
s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(bin|test|spec|features|.github)/}) ||
f == '.gitignore' ||
f == '.editorconfig' ||
f == '.rspec' ||
f == '.gitlab-ci.yml' ||
f == '.rubocop.yml' ||
f == '.rubocop_todo.yml' ||
f == 'Jenkinsfile' ||
f == 'tea.yaml'
end
s.bindir = 'exe'
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
s.require_paths = ['lib']
s.required_ruby_version = '>= 2.6.0'
s.add_development_dependency 'bundler', '~> 2'
s.add_development_dependency 'rake', '~> 13.1'
s.add_development_dependency 'rspec', '~> 3.13'
s.add_development_dependency 'pry', '~> 0.14'
s.add_development_dependency 'yard', '~> 0.9'
s.add_development_dependency 'simplecov', '~> 0.22'
s.add_development_dependency 'simplecov-cobertura', '~> 2.1'
s.add_development_dependency 'rspec_junit_formatter', '~> 0.6'
s.add_development_dependency 'rubocop', '~> 1.62'
s.add_runtime_dependency 'version', '~> 1'
end
Rake::VersionTask.new do |task|
task.with_gemspec = spec
task.with_git = false
end
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
t.stats_options = ['--list-undoc']
end
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = ['lib/**/*.rb']
# only show the files with failures
task.formatters = ['worst']
# don't abort rake on failure
task.fail_on_error = false
end
task default: :spec