debian-mirror-gitlab/lib/gitlab/robots_txt.rb
2020-11-24 15:15:51 +05:30

17 lines
337 B
Ruby

# frozen_string_literal: true
module Gitlab
module RobotsTxt
def self.disallowed?(path)
parsed_robots_txt.disallowed?(path)
end
def self.parsed_robots_txt
@parsed_robots_txt ||= Parser.new(robots_txt)
end
def self.robots_txt
File.read(Rails.root.join('public', 'robots.txt'))
end
end
end