Rakefile in vk-0.6.5.53 vs Rakefile in vk-0.99.5.53.alpha

- old
+ new

@@ -1,30 +1,26 @@ +# frozen_string_literal: true require 'bundler/setup' Bundler::GemHelper.install_tasks +require 'pry' -begin - require 'rspec/core/rake_task' - - desc 'Run specs' - RSpec::Core::RakeTask.new do |t| - t.rspec_opts = %w(--color) - t.verbose = false - end -rescue LoadError - task :spec do - abort 'install rspec to run specs ($ bundle install)' - end +desc 'Regenerate API from JSON Schema' +task :generate do + require 'vk/schema/generator' + generator = Vk::Schema::Generator.new + generator.call end +task default: :generate -begin - require 'yard' - require 'yard/rake/yardoc_task' +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new +task default: :spec - desc 'Generate documentation' - YARD::Rake::YardocTask.new(:doc) -rescue LoadError - task :doc do - abort 'install yard to generate documentation ($ bundle install)' - end -end +require 'yard' +require 'yard/rake/yardoc_task' +YARD::Rake::YardocTask.new(:doc) +task default: :doc -task default: :spec +require 'rubocop' +require 'rubocop/rake_task' +RuboCop::RakeTask.new(:cop) +task default: :cop