spiderable 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,9 +30,13 @@ module Spiderable
30
30
 
31
31
  if is_bot
32
32
  url = Crawler.urlFromRack(environment)
33
- html = Connect.get_url_contents(url)
33
+ html = Connect.get_url_contents(url) rescue "FAIL\n"
34
34
 
35
- [200, {"Content-Type" => "text/html; charset=utf-8"}, [html]]
35
+ if html == "FAIL\n"
36
+ @application.call(environment)
37
+ else
38
+ [200, {"Content-Type" => "text/html; charset=utf-8"}, [html]]
39
+ end
36
40
  else
37
41
  @application.call(environment)
38
42
  end
@@ -1,3 +1,3 @@
1
1
  module Spiderable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spiderable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: