colinramsay-robotstxt 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +2 -1
  2. data/lib/robotstxtparser.rb +1 -1
  3. metadata +1 -1
data/README CHANGED
@@ -16,6 +16,7 @@ Use it like this:
16
16
  require 'robotstxtparser'
17
17
 
18
18
  # Also accepts a local file
19
- rp = RobotsTxtParser.new("http://something.com/robots.txt")
19
+ rp = RobotsTxtParser.new()
20
+ rp.read("http://something.com/robots.txt")
20
21
 
21
22
  rp.user_agents('Google') # returns ["/logs", "/admin"]
@@ -4,7 +4,7 @@ class RobotsTxtParser
4
4
 
5
5
  attr_reader :user_agents
6
6
 
7
- def initialize(path)
7
+ def read(path)
8
8
  begin
9
9
  if path.include?("://")
10
10
  raw_data = open(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colinramsay-robotstxt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Ramsay