prerender_rails 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/prerender_rails.rb +6 -6
- data/prerender_rails.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 925e1ebbfc55c0ca7d4192ec5ca9a06da0a139f6
|
4
|
+
data.tar.gz: 925495cbd931bcd6224788a766b86a8e1e2d6740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db41e6ae70e3350b67654b5b3ae51184bfba4995cd24f324d1ef07d906ae38aee0a062a2cd48ce615e3406cdb5fb364c45783d13b75353838b921f8a30697e2
|
7
|
+
data.tar.gz: 443608a9803cdc217181d22fa0d5d8b2f50ebb21d083d74bb3aa8dcdf14a38ad2b760b64ad5ac6b9ca5d32e6db3673f11fdd5a76445d5f0e8aa1f7d1d36de85d
|
data/README.md
CHANGED
@@ -77,7 +77,7 @@ config.middleware.use Rack::Prerender, blacklist: ['/search', '/users/.*/profile
|
|
77
77
|
|
78
78
|
### before_render
|
79
79
|
|
80
|
-
This method is intended to be used for caching, but could be used to save analytics or anything else you need to do for each crawler request. If you return a string from before_render, the middleware will
|
80
|
+
This method is intended to be used for caching, but could be used to save analytics or anything else you need to do for each crawler request. If you return a string from before_render, the middleware will serve that to the crawler instead of making a request to the prerender service.
|
81
81
|
```ruby
|
82
82
|
config.middleware.use Rack::Prerender,
|
83
83
|
before_render: (Proc.new do |env|
|
data/lib/prerender_rails.rb
CHANGED
@@ -3,13 +3,13 @@ module Rack
|
|
3
3
|
require 'net/http'
|
4
4
|
|
5
5
|
def initialize(app, options={})
|
6
|
-
# googlebot, yahoo, and bingbot are in this list
|
7
|
-
# we support _escaped_fragment_ to ensure
|
8
|
-
#
|
6
|
+
# googlebot, yahoo, and bingbot are not in this list because
|
7
|
+
# we support _escaped_fragment_ and want to ensure people aren't
|
8
|
+
# penalized for cloaking.
|
9
9
|
@crawler_user_agents = [
|
10
|
-
'googlebot',
|
11
|
-
'yahoo',
|
12
|
-
'bingbot',
|
10
|
+
# 'googlebot',
|
11
|
+
# 'yahoo',
|
12
|
+
# 'bingbot',
|
13
13
|
'baiduspider',
|
14
14
|
'facebookexternalhit',
|
15
15
|
'twitterbot'
|
data/prerender_rails.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "prerender_rails"
|
5
|
-
spec.version = "0.1.
|
5
|
+
spec.version = "0.1.12"
|
6
6
|
spec.authors = ["Todd Hooper"]
|
7
7
|
spec.email = ["todd@collectiveip.com"]
|
8
8
|
spec.description = %q{Rails middleware to prerender your javascript heavy pages on the fly by a phantomjs service}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prerender_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Hooper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|