Sha256: 484c162109e1722b204c6b7a081d2efa870a6e4dee9d7ea288025a9b24081921

Contents?: true

Size: 433 Bytes

Versions: 3

Compression:

Stored size: 433 Bytes

Contents

namespace :sitemap do

  def setup
    require File.join(Rails.root, "config", "sitemap")
  end

  desc "Generates a new sitemap."
  task :generate => :environment do
    setup
    path = File.join(Rails.public_path, "sitemap.xml")
    Sitemap::Generator.instance.build!
    Sitemap::Generator.instance.save path
  end

  desc "Ping engines."
  task :ping => :environment do
    Sitemap::Ping.send_request ENV["LOCATION"]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sitemap-0.2 lib/tasks/sitemap.rake
sitemap-0.2b2 lib/tasks/sitemap.rake
sitemap-0.2b lib/tasks/sitemap.rake