Sha256: 2c8d38dc2b1026aa6821a17576e2b34d4449ef0f831cc7bcbe2d821f01b12ebd

Contents?: true

Size: 1.17 KB

Versions: 10

Compression:

Stored size: 1.17 KB

Contents

# Global.
#
namespace :index do
  
  # Not necessary anymore.
  #
  # namespace :directories do
  #   desc 'Creates the directory structure for the indexes.'
  #   task :make => :application do
  #     Indexes.create_directory_structure
  #     puts "Directory structure generated."
  #   end
  # end
  
  desc "Takes a snapshot, indexes, and caches."
  task :generate, [:order] => :application do |_, options|
    randomly = (options.order == 'ordered') ? false : true
    Indexes.index randomly
  end
  
  desc "Generates the index snapshots."
  task :generate_snapshots => :application do
    Indexes.take_snapshot
  end
  
  # desc "E.g. Generates a specific index table. Note: intermediate indexes need to be there."
  # task :only, [:type, :field] => :application do |_, options|
  #   type, field = options.type, options.field
  #   Indexes.generate_index_only type.to_sym, field.to_sym
  # end
  
  desc "Generates a specific index from index snapshots."
  task :specific, [:type, :field] => :application do |_, options|
    type, field = options.type, options.field
    Indexes.generate_index_only type.to_sym, field.to_sym
    Indexes.generate_cache_only type.to_sym, field.to_sym
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
picky-0.10.5 lib/tasks/index.rake
picky-0.10.4 lib/tasks/index.rake
picky-0.10.2 lib/tasks/index.rake
picky-0.10.1 lib/tasks/index.rake
picky-0.10.0 lib/tasks/index.rake
picky-0.9.4 lib/tasks/index.rake
picky-0.9.3 lib/tasks/index.rake
picky-0.9.2 lib/tasks/index.rake
picky-0.9.1 lib/tasks/index.rake
picky-0.9.0 lib/tasks/index.rake