# frozen_string_literal: true

require "bundler"
Bundler::GemHelper.install_tasks name: "kreuzberg"
require "rake/extensiontask"
require "rspec/core/rake_task"

GEM_ROOT = __dir__
GEMSPEC = Gem::Specification.load(File.expand_path("kreuzberg.gemspec", GEM_ROOT))

Rake::ExtensionTask.new("kreuzberg-rb", GEMSPEC) do |ext|
  ext.lib_dir = "lib"
  ext.ext_dir = "ext/kreuzberg_rb/native"
  ext.source_pattern = "*.{}"
  ext.platform = "ruby"
end

RSpec::Core::RakeTask.new(:spec)

task spec: :compile
task default: :spec
