-
-
Notifications
You must be signed in to change notification settings - Fork 236
Expand file tree
/
Copy pathRakefile
More file actions
31 lines (26 loc) · 873 Bytes
/
Rakefile
File metadata and controls
31 lines (26 loc) · 873 Bytes
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
require 'yaml'
begin
require 'rspec/core/rake_task'
rescue LoadError
warn "Warning: RSpec is not installed. Please run `gem install rspec` to install RSpec."
end
if defined?(RSpec::Core::RakeTask)
namespace :lint do
desc "Lint reports (excluding schema validation)"
RSpec::Core::RakeTask.new(:yaml) do |t|
t.exclude_pattern = 'spec/schema_validation_spec.rb'
end
desc "Validate report schema"
RSpec::Core::RakeTask.new(:schema) do |t|
t.pattern = 'spec/schema_validation_spec.rb'
end
end
desc "Run all linting tasks"
task :lint => [ 'lint:schema', 'lint:yaml' ]
task :default => [ :lint ]
end
desc "Sync GitHub RubyGem Advisories into this project"
task :sync_github_advisories, [:gem_name] do |_, args|
require_relative "lib/github_advisory_sync"
GitHub::GitHubAdvisorySync.sync(gem_name: args[:gem_name])
end