Sha256: 8d30fda10bf8f2ac79c590d510324753d5176e480bb2bfa060f6acab02cd9f11
Contents?: true
Size: 817 Bytes
Versions: 3
Compression:
Stored size: 817 Bytes
Contents
# frozen_string_literal: true require 'bundler/gem_tasks' require 'rake/extensiontask' require 'rspec/core/rake_task' require 'rubocop/rake_task' Rake::ExtensionTask.new('c_levenshtein') do |extension| extension.ext_dir = 'ext/c_levenshtein' extension.lib_dir = 'lib/phonetics' end PHONETIC_COST_C_EXTENSION = File.expand_path('ext/c_levenshtein/phonetic_cost.c', __dir__) namespace :compile do desc 'Write phonetic_cost.c using Phonetic values' task :phonetic_cost do require_relative './lib/phonetics' file = File.open(PHONETIC_COST_C_EXTENSION, 'w') Phonetics.generate_phonetic_cost_c_code(file) puts "Wrote #{PHONETIC_COST_C_EXTENSION}" end end task compile: 'compile:phonetic_cost' RSpec::Core::RakeTask.new(:spec) RuboCop::RakeTask.new task default: [:compile, :rubocop, :spec]
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
phonetics-1.5.4 | Rakefile |
phonetics-1.5.3 | Rakefile |
phonetics-1.5.2 | Rakefile |