def add_namespace_to_routes
      puts "   kryptonite     adding namespace to routes.rb"
      file_to_update = Rails.root + 'config/routes.rb'
      line_to_add = "namespace :kryptonite do"
      insert_sentinel = 'Application.routes.draw do'
      if File.read(file_to_update).scan(/(#{Regexp.escape("#{line_to_add}")})/mi).blank?
        gsub_add_once plural_name, file_to_update, "\n\t#Kryptonite routes\n\t" + line_to_add + "\n\tend\n", insert_sentinel
      end
    end
def add_namespace_to_routes
      puts "   kryptonite     adding namespace to routes.rb"
      file_to_update = Rails.root + 'config/routes.rb'
      line_to_add = "namespace :kryptonite do"
      insert_sentinel = 'Application.routes.draw do'
      if File.read(file_to_update).scan(/(#{Regexp.escape("#{line_to_add}")})/mi).blank?
        gsub_add_once plural_name, file_to_update, "\n\t#Kryptonite routes\n\t" + line_to_add + "\n\tend\n", insert_sentinel
      end
    end
replacements for standard Rails generator route. This one only adds once