Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.4.0
/
gems
/
did_you_mean-1.1.0
/
📁
..
📄
CHANGELOG.md
(12.71 KB)
📄
Gemfile
(171 B)
📄
LICENSE.txt
(1.05 KB)
📄
README.md
(3.19 KB)
📄
Rakefile
(1.41 KB)
📁
benchmark
📁
doc
📁
evaluation
📁
lib
Editing: Rakefile
require 'bundler/gem_tasks' require 'rake/testtask' Rake::TestTask.new do |task| task.libs << "test" task.test_files = Dir['test/**/*_test.rb'].reject do |path| /(verbose_formatter|experimental)/ =~ path end task.verbose = true task.warning = true end Rake::TestTask.new("test:verbose_formatter") do |task| task.libs << "test" task.pattern = 'test/verbose_formatter_test.rb' task.verbose = true task.warning = true task.ruby_opts << "-rdid_you_mean/verbose_formatter" end Rake::TestTask.new("test:experimental") do |task| task.libs << "test" task.pattern = 'test/experimental/**/*_test.rb' task.verbose = true task.warning = true task.ruby_opts << "-rdid_you_mean/experimental" end task default: %i(test test:verbose_formatter test:experimental) namespace :test do namespace :accuracy do desc "Download Wiktionary's Simple English data and save it as a dictionary" task :prepare do sh 'ruby evaluation/dictionary_generator.rb' end end desc "Calculate accuracy of the gems' spell checker" task :accuracy do if !File.exist?("evaluation/dictionary.yml") puts 'Generating dictionary for evaluation:' Rake::Task["test:accuracy:prepare"].execute puts "\n" end sh 'ruby evaluation/calculator.rb' end end namespace :benchmark do desc "Measure memory usage by the did_you_mean gem" task :memory do sh 'ruby benchmark/memory_usage.rb' end end
Upload File
Create Folder