fizx-robots 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/robots.rb +5 -2
  2. metadata +1 -1
data/lib/robots.rb CHANGED
@@ -17,7 +17,7 @@ class Robots
17
17
  @other = {}
18
18
  @disallows = {}
19
19
  @allows = {}
20
- agent = ""
20
+ agent = /.*/
21
21
  io.each do |line|
22
22
  next if line =~ /^\s*(#.*|$)/
23
23
  key, value = line.split(":")
@@ -45,8 +45,11 @@ class Robots
45
45
  allowed = true
46
46
  path = uri.request_uri
47
47
  debug "path: #{path}"
48
-
48
+ puts "--------"
49
+ puts @disallows.inspect
50
+ puts "--------"
49
51
  @disallows.each do |key, value|
52
+ puts ">>>>>>>#{key.inspect}<<<<<<<<"
50
53
  if user_agent =~ key
51
54
  debug "matched #{key.inspect}"
52
55
  value.each do |rule|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizx-robots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Maxwell