Rakefile in rubocop-rspec-1.24.0 vs Rakefile in rubocop-rspec-1.25.0

- old
+ new

@@ -10,20 +10,21 @@ warn 'Run `bundle install` to install missing gems' exit e.status_code end require 'rspec/core/rake_task' + +Dir['tasks/**/*.rake'].each { |t| load t } + RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList['spec/**/*_spec.rb'] end desc 'Run RSpec with code coverage' task :coverage do ENV['COVERAGE'] = 'true' Rake::Task['spec'].execute - - sh('codeclimate-test-reporter') if ENV['CI'] end desc 'Run RuboCop over this gem' task :internal_investigation do sh('bundle exec rubocop --require rubocop-rspec') @@ -42,10 +43,24 @@ unless process.value.success? raise "default.yml is out of sync:\n\n#{stdout.read}\nRun bin/build_config" end end -task default: %i[build_config coverage internal_investigation confirm_config] +desc 'Confirm documentation is up to date' +task confirm_documentation: :generate_cops_documentation do + _, _, _, process = + Open3.popen3('git diff --exit-code manual/') + + unless process.value.success? + raise 'manual is out of sync, please add manual/ to the commit' + end +end + +task default: %i[build_config coverage + internal_investigation + confirm_config + documentation_syntax_check + confirm_documentation] desc 'Generate a new cop template' task :new_cop, [:cop] do |_task, args| require 'rubocop'