prerender_rails 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c707924d75ebdca5a657a543157dcd5ee7903953
4
- data.tar.gz: d75ccebdd7da8437945be474a6ac4d84584c4fce
3
+ metadata.gz: db685df40cb56db49ec9ec692fe48ac300fcab08
4
+ data.tar.gz: b4602eb9e00e3cbf97ea8aed467211695765b158
5
5
  SHA512:
6
- metadata.gz: 4441b1a46e6b9952e299f0cf38649fa0c7cc7fa96e282b74e8aefb8394850a392600db7a4042574f40beb693bf7493189282edf7441a1dfa29683f45b72e468b
7
- data.tar.gz: aef256afe0d88e1557f84df02f6a78a709651eddd9ee64faffa64322c56da32024381e3b6f0dd830958d7b0fd928e6c3e230caa83e2f5bbde1888c4be0435ec7
6
+ metadata.gz: 57f92a2d64f32826258d5687734568629d00b6d8e9c58a4db132278b83dcf740244d440566ff9e6f46bb3f05dabab57ef05a165e0d64666ecf109a22c86592df
7
+ data.tar.gz: aea4c87bac266fe036da034d9ab7dc051b41685f02e18c4d20b543b379c182cfd8209220627d95dad6deb279eca621a2c568a789eb5d541c90c0e900c4768c94
@@ -115,6 +115,7 @@ module Rack
115
115
  def should_show_prerendered_page(env)
116
116
  user_agent = env['HTTP_USER_AGENT']
117
117
  buffer_agent = env['X-BUFFERBOT']
118
+ prerender_agent = env['X-PRERENDER']
118
119
  is_requesting_prerendered_page = false
119
120
 
120
121
  return false if !user_agent
@@ -130,6 +131,9 @@ module Rack
130
131
  #if it is BufferBot...show prerendered page
131
132
  is_requesting_prerendered_page = true if buffer_agent
132
133
 
134
+ #if it is Prerender...don't show prerendered page
135
+ is_requesting_prerendered_page = false if prerender_agent
136
+
133
137
  #if it is a bot and is requesting a resource...dont prerender
134
138
  return false if @extensions_to_ignore.any? { |extension| request.fullpath.include? extension }
135
139
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "prerender_rails"
5
- spec.version = "1.4.1"
5
+ spec.version = "1.5.0"
6
6
  spec.authors = ["Todd Hooper"]
7
7
  spec.email = ["todd@prerender.io"]
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: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Hooper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-13 00:00:00.000000000 Z
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack