seo_cache 0.15.0 → 0.16.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
  SHA256:
3
- metadata.gz: eb604d6d47c1bca3fe043bee428fc5cb47f2fceb2dd294123633445fd17e7f97
4
- data.tar.gz: cbd23a3cb8dee565f31b29344f48c78c55cd791efd197e1d6572ff632ca7e2cd
3
+ metadata.gz: 83f6cd5dea18efdc9fa21ae62d13478b556aa7f35bcbd7789db640d8db4419ca
4
+ data.tar.gz: 06a5e2de7fc435fae27f53f74d7741db2e9a4f8ac9bd0c0112bba52c2c8876e3
5
5
  SHA512:
6
- metadata.gz: 074ee0b620c01f5e0a6214c5716105de620e92c5faacc09e79ccdad46335a4b57480c6e5ffb2d45c6494741cff1d3c3a85d93243148efd96a329339dfc8cbbd7
7
- data.tar.gz: 1df789afdffccaa5c29d276ae9f879bfdad75b885ceabc533c598ac20bd40c32d87c6565c40a951bd6d83d47bbad756c85fd4f0ad4ae22afc547a179d72448ad
6
+ metadata.gz: 4dd2858594c6acfe05385f336ab60a74fecaccd6e97bdb66c62ccf23beda09f961b67192f2d6d13e665a43dbceb59626700483cde5b739cdbbb8642811e32b3c
7
+ data.tar.gz: 0f17ee53fde5bfec13904da5533dae7743cfbe50b2a1827247d2dd314cf7d8cf2cc8cb7d284cfdf2577f585bffb96760b67c4a8de02604e8d8f815646bc2e79b
@@ -1,3 +1,7 @@
1
+ ## 0.16.0
2
+
3
+ - Add prerender params when populating cache
4
+
1
5
  ## 0.15.0
2
6
 
3
7
  - Add global option for Chrome debugging port problem
@@ -6,9 +6,9 @@ require 'seo_cache/page_render'
6
6
  module SeoCache
7
7
  class PopulateCache
8
8
  def initialize(host, paths, options = {})
9
- @host = host
10
- @paths = paths
11
- @page_render = PageRender.new
9
+ @host = host
10
+ @paths = paths
11
+ @page_render = PageRender.new
12
12
  @page_caching = PageCaching.new
13
13
 
14
14
  @force_cache = options.fetch(:force_cache, false)
@@ -18,7 +18,15 @@ module SeoCache
18
18
  @paths.each do |path|
19
19
  next if @page_caching.cache_exists?(path) && !@force_cache
20
20
 
21
- page_source = @page_render.get(@host + path, false)
21
+ url = @host + path
22
+ url += if path.url.end_with?('?')
23
+ '&'
24
+ else
25
+ '?'
26
+ end
27
+ url += "#{SeoCache.prerender_url_param}=true"
28
+
29
+ page_source = @page_render.get(url, false)
22
30
  @page_caching.cache(page_source, path)
23
31
  end
24
32
 
@@ -1,3 +1,3 @@
1
1
  module SeoCache
2
- VERSION = '0.15.0'.freeze
2
+ VERSION = '0.16.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seo_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FloXcoder
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-02 00:00:00.000000000 Z
11
+ date: 2020-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.0.4
229
+ rubygems_version: 3.1.2
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Cache dedicated for SEO with Javascript rendering