# frozen_string_literal: true require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'rake/clean' require 'yard' require 'yard/doctest/rake' require 'leap_salesforce/rake' # TODO: Append this line to existing repo CLEAN.include 'tmp/*' RSpec::Core::RakeTask.new(:spec) desc 'Check Salesforce OAuth2 authentication is working' task :check_oauth do LeapSalesforce.oauth_working? end task default: %i[clean check_oauth spec] require 'leap_salesforce' desc "Create stubs for dynamic methods so they're picked up by the IDE" task :stub do require 'topoisomerase' Topoisomerase.create_stubs_based_on SoqlData end desc 'Test examples shown in documentation' YARD::Doctest::RakeTask.new do |task| task.doctest_opts = %w[-v] # task.pattern = 'lib/**/*.rb' # TODO: Get all examples working in this way task.pattern = 'lib/leap_salesforce/ext/string.rb' end