We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0983902 commit f221f74Copy full SHA for f221f74
Rakefile
@@ -40,7 +40,11 @@ end
40
41
task :default => :test
42
43
-require 'rake/rdoctask'
+begin
44
+ require 'rake/rdoctask'
45
+rescue LoadError
46
+ require 'rdoc/task'
47
+end
48
Rake::RDocTask.new do |rdoc|
49
if File.exist?('VERSION')
50
version = File.read('VERSION')
lib/robots.rb
@@ -14,7 +14,7 @@ def initialize(uri, user_agent)
14
15
io = Robots.get_robots_txt(uri, user_agent)
16
17
- if !io || io.content_type != "text/plain" || io.status != ["200", "OK"]
+ if !io || io.content_type != "text/plain" || io.status.first.to_i != 200
18
io = StringIO.new("User-agent: *\nAllow: /\n")
19
end
20
0 commit comments