mirror of
https://github.com/puppetlabs/vmpooler-dns-gcp.git
synced 2026-01-26 11:08:41 -05:00
Add rakefile and rubocop config from other provider gems
This commit is contained in:
parent
5787a82a0b
commit
405b52b2e1
4 changed files with 85 additions and 12 deletions
27
Rakefile
27
Rakefile
|
|
@ -1,8 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
require "bundler/gem_tasks"
|
||||
require "rubocop/rake_task"
|
||||
rubocop_available = Gem::Specification::find_all_by_name('rubocop').any?
|
||||
require 'rubocop/rake_task' if rubocop_available
|
||||
|
||||
RuboCop::RakeTask.new
|
||||
desc 'Run rspec tests with coloring.'
|
||||
RSpec::Core::RakeTask.new(:test) do |t|
|
||||
t.rspec_opts = %w[--color --format documentation]
|
||||
t.pattern = 'spec/'
|
||||
end
|
||||
|
||||
task default: :rubocop
|
||||
desc 'Run rspec tests and save JUnit output to results.xml.'
|
||||
RSpec::Core::RakeTask.new(:junit) do |t|
|
||||
t.rspec_opts = %w[-r yarjuf -f JUnit -o results.xml]
|
||||
t.pattern = 'spec/'
|
||||
end
|
||||
|
||||
if rubocop_available
|
||||
desc 'Run RuboCop'
|
||||
RuboCop::RakeTask.new(:rubocop) do |task|
|
||||
task.options << '--display-cop-names'
|
||||
end
|
||||
end
|
||||
|
||||
task :default => [:test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue