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

Version Path
picky-4.31.3 lib/tasks/statistics.rake
picky-4.31.2 lib/tasks/statistics.rake
picky-4.31.1 lib/tasks/statistics.rake
picky-4.31.0 lib/tasks/statistics.rake
picky-4.30.0 lib/tasks/statistics.rake
picky-4.29.0 lib/tasks/statistics.rake
picky-4.28.1 lib/tasks/statistics.rake
picky-4.27.1 lib/tasks/statistics.rake
picky-4.27.0 lib/tasks/statistics.rake
picky-4.26.2 lib/tasks/statistics.rake
picky-4.26.1 lib/tasks/statistics.rake
picky-4.26.0 lib/tasks/statistics.rake
picky-4.25.3 lib/tasks/statistics.rake
picky-4.25.2 lib/tasks/statistics.rake
picky-4.25.1 lib/tasks/statistics.rake
picky-4.25.0 lib/tasks/statistics.rake
picky-4.24.0 lib/tasks/statistics.rake
picky-4.23.2 lib/tasks/statistics.rake
picky-4.23.1 lib/tasks/statistics.rake
picky-4.23.0 lib/tasks/statistics.rake