#!/usr/bin/env rake.ruby2.5
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require_relative 'config/application'

OBSApi::Application.load_tasks

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

unless Rails.env.production?
  require 'single_test/tasks'
  require 'rubocop/rake_task'
  require 'haml_lint/rake_task'

  RuboCop::RakeTask.new(:rubocop) do |task|
    task.options = ['-D', '-F', '--fail-level', 'convention']
  end

  HamlLint::RakeTask.new
end
