Skip to content

Commit f221f74

Browse files
author
julien desrosiers
committed
Fix rakefile and address fizx#9
1 parent 0983902 commit f221f74

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Rakefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ end
4040

4141
task :default => :test
4242

43-
require 'rake/rdoctask'
43+
begin
44+
require 'rake/rdoctask'
45+
rescue LoadError
46+
require 'rdoc/task'
47+
end
4448
Rake::RDocTask.new do |rdoc|
4549
if File.exist?('VERSION')
4650
version = File.read('VERSION')

lib/robots.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def initialize(uri, user_agent)
1414

1515
io = Robots.get_robots_txt(uri, user_agent)
1616

17-
if !io || io.content_type != "text/plain" || io.status != ["200", "OK"]
17+
if !io || io.content_type != "text/plain" || io.status.first.to_i != 200
1818
io = StringIO.new("User-agent: *\nAllow: /\n")
1919
end
2020

0 commit comments

Comments
 (0)