Sha256: a02a235c550c4fdb71634647c23968faecc0ad6a8085a235d33ed24ff6178f31

Contents?: true

Size: 781 Bytes

Versions: 4

Compression:

Stored size: 781 Bytes

Contents

# Application template recipe for the rails3_devise_wizard. Check for a newer version here:
# https://github.com/fortuity/rails3_devise_wizard/blob/master/recipes/ban_spiders.rb

if config['ban_spiders']
  say_wizard "BanSpiders recipe running 'after bundler'"
  after_bundler do
    # ban spiders from your site by changing robots.txt
    gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
    gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
  end
else
  recipes.delete('ban_spiders')
end

__END__

name: BanSpiders
description: "Ban spiders from the site by changing robots.txt."
author: fortuity

category: other
tags: [utilities, configuration]

config:
  - ban_spiders:
      type: boolean
      prompt: Would you like to set a robots.txt file to ban spiders?

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails3_devise_wizard-0.3.2 recipes/ban_spiders.rb
rails3_devise_wizard-0.3.1 recipes/ban_spiders.rb
rails3_devise_wizard-0.2.8 recipes/ban_spiders.rb
rails3_devise_wizard-0.2.5 recipes/ban_spiders.rb