mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
Add Rubocop support to Rakefile
This commit is contained in:
parent
573f0d83a9
commit
8babbe32ce
1 changed files with 10 additions and 3 deletions
13
Rakefile
13
Rakefile
|
|
@ -1,6 +1,7 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
require 'rubocop/rake_task'
|
||||||
|
|
||||||
# Immediately sync all stdout so that tools like buildbot can
|
# Immediately sync all stdout so that tools like buildbot can
|
||||||
# immediately load in the output.
|
# immediately load in the output.
|
||||||
|
|
@ -8,7 +9,7 @@ $stdout.sync = true
|
||||||
$stderr.sync = true
|
$stderr.sync = true
|
||||||
|
|
||||||
# Change to the directory of this file.
|
# Change to the directory of this file.
|
||||||
Dir.chdir(File.expand_path("../", __FILE__))
|
Dir.chdir(File.expand_path('../', __FILE__))
|
||||||
|
|
||||||
# This installs the tasks that help with gem creation and
|
# This installs the tasks that help with gem creation and
|
||||||
# publishing.
|
# publishing.
|
||||||
|
|
@ -16,7 +17,13 @@ Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
# Install the `spec` task so that we can run tests.
|
# Install the `spec` task so that we can run tests.
|
||||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||||
t.rspec_opts = "--order defined"
|
t.rspec_opts = '--order defined'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Run RuboCop'
|
||||||
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
||||||
|
task.options << '--display-cop-names'
|
||||||
|
end
|
||||||
|
|
||||||
# Default task is to run the unit tests
|
# Default task is to run the unit tests
|
||||||
task :default => :spec
|
task default: :spec
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue