colinramsay-robotstxt 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/robotstxtparser.rb +6 -6
  2. metadata +1 -1
@@ -5,13 +5,13 @@ class RobotsTxtParser
5
5
  attr_reader :user_agents
6
6
 
7
7
  def initialize(path)
8
- if path.include?("://")
9
- raw_data = open(path)
10
- else
11
- begin
12
- raw_data = File.open(path)
13
- rescue
8
+ begin
9
+ if path.include?("://")
10
+ raw_data = open(path)
11
+ else
12
+ raw_data = File.open(path)
14
13
  end
14
+ rescue
15
15
  end
16
16
 
17
17
  @user_agents = Hash.new
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Ramsay