Sha256: 53ac62524cf29c43ebd3d3dfe41dbf0a938d095697c961c57239ed10d1a74e7c
Contents?: true
Size: 755 Bytes
Versions: 111
Compression:
Stored size: 755 Bytes
Contents
# Statistics tasks. # desc "Analyzes indexes (index, category optional)." task :analyze, [:index, :category] => :'stats:prepare' do |_, options| index, category = options.index, options.category specific = Picky::Indexes specific = specific[index] if index specific = specific[category] if category statistics = Picky::Statistics.new begin statistics.analyze specific rescue StandardError puts "\n\033[31mNote: rake analyze needs prepared indexes. Run rake index first.\033[m\n\n" raise end puts statistics end task :stats => :'stats:prepare' do stats = Picky::Statistics.new puts stats.application end namespace :stats do task :prepare => :application do require_relative '../picky/statistics' end end
Version data entries
111 entries across 111 versions & 1 rubygems