prerender_rails 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prerender_rails.rb +3 -1
- 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: ec81d9470f347151a442c94c7ed1a39102d4bdde
|
4
|
+
data.tar.gz: 37567e7f03e9a2b163eb1d0a14e163ecee8530f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49da14a9f06eb1bceeb7ff0303d567b9418c4ffaa1e2e0b04796cb0c000541766c712864981c71517b1197ba266ce56c1872b9c030d83c09c4ac19767094312
|
7
|
+
data.tar.gz: 41ac300c1f8e7e1ee0c7b801ca6cf746893aec55f1b8a49baba070d9e994277ec9e5b687d775e228bfa2316570870c852c65b1c6a2046dd35cb98ce1527da72a
|
data/lib/prerender_rails.rb
CHANGED
@@ -112,7 +112,9 @@ module Rack
|
|
112
112
|
def get_prerendered_page_response(env)
|
113
113
|
begin
|
114
114
|
url = URI.parse(build_api_url(env))
|
115
|
-
|
115
|
+
headers = { 'User-Agent' => env['HTTP_USER_AGENT'] }
|
116
|
+
headers['X-Prerender-Token'] = ENV['PRERENDER_TOKEN'] if ENV['PRERENDER_TOKEN']
|
117
|
+
req = Net::HTTP::Get.new(url.request_uri, headers)
|
116
118
|
response = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }
|
117
119
|
rescue
|
118
120
|
nil
|
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.7"
|
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.7
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|