Rakefile 792 B

1234567891011121314151617181920212223242526272829
  1. # frozen_string_literal: true
  2. lib_dir = File.join(File.dirname(File.expand_path(__FILE__)), 'lib')
  3. $LOAD_PATH.unshift(lib_dir) unless
  4. $LOAD_PATH.include?(lib_dir) || $LOAD_PATH.include?(lib_dir)
  5. models_dir = File.join(File.dirname(File.expand_path(__FILE__)), 'models')
  6. $LOAD_PATH.unshift(models_dir) unless
  7. $LOAD_PATH.include?(models_dir) || $LOAD_PATH.include?(models_dir)
  8. task default: :full_test
  9. require 'rubocop/rake_task'
  10. require 'rake'
  11. require 'pp'
  12. require 'rspec/core/rake_task'
  13. require 'neoinfra'
  14. Dir.glob('tasks/*.rake').each { |r| import r }
  15. RuboCop::RakeTask.new(:rubocop) do |t|
  16. t.options = ['--display-cop-names']
  17. t.warning = false
  18. end
  19. RSpec::Core::RakeTask.new(:spec) do |t|
  20. t.pattern = Dir.glob('spec/*_spec.rb')
  21. t.rspec_opts = '--format documentation'
  22. end