Sha256: 78c0b2fdd94e25df48da042bd7fe0c2d9950a5d0bf4912c766f25386d17435c2
Contents?: true
Size: 777 Bytes
Versions: 46
Compression:
Stored size: 777 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 File.expand_path('../../picky/statistics', __FILE__) end end
Version data entries
46 entries across 46 versions & 1 rubygems