seo_cache 0.14.0 → 0.15.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: e4489f101114c4ab4c88d1328f3caa18a2b32d025e28a6d3dd0e635ab0732f2f
4
- data.tar.gz: d24a3daad5ba14c90d7be285204e753ec3f25c8574f04a26a6e3d77298f83f78
3
+ metadata.gz: eb604d6d47c1bca3fe043bee428fc5cb47f2fceb2dd294123633445fd17e7f97
4
+ data.tar.gz: cbd23a3cb8dee565f31b29344f48c78c55cd791efd197e1d6572ff632ca7e2cd
5
5
  SHA512:
6
- metadata.gz: 9d9affe855d206a22002ad0ef1ef8257e0635fdd74fce95c92b3dd7b54e55a63e71bc09413f71cb79f1ee471386ee529a15bee9a7ec36f9a2ee9e7180aea3c95
7
- data.tar.gz: 55e82b4cdf9cdc037acd8dbfe69a274508b8317b1b6d111d723a039d68011d5ad114abc3444b6a19ad391e376ccff5c25908f050cbfd3fbb4a10ae2ce6691496
6
+ metadata.gz: 074ee0b620c01f5e0a6214c5716105de620e92c5faacc09e79ccdad46335a4b57480c6e5ffb2d45c6494741cff1d3c3a85d93243148efd96a329339dfc8cbbd7
7
+ data.tar.gz: 1df789afdffccaa5c29d276ae9f879bfdad75b885ceabc533c598ac20bd40c32d87c6565c40a951bd6d83d47bbad756c85fd4f0ad4ae22afc547a179d72448ad
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.15.0
2
+
3
+ - Add global option for Chrome debugging port problem
4
+
1
5
  ## 0.14.0
2
6
 
3
7
  - Change options from Chrome
data/README.md CHANGED
@@ -142,7 +142,13 @@ Parameter added to URL when generating the page, avoid infinite rendering (overr
142
142
  SeoCache.prerender_url_param = '_prerender_'
143
143
  ```
144
144
 
145
- Be aware, JS will be render twice: once by server rendering and once by client. For React, this not a problem but with jQuery plugins, it can duplicate elements in the page (you have to check the redundancy).
145
+ If you encounter the following error `DevToolsActivePort file doesn't exist`, you can add the following option:
146
+
147
+ ```ruby
148
+ SeoCache.chrome_debugging_port = '9222'
149
+ ```
150
+
151
+ Be aware, JS will be rendered twice: once by server rendering and once by client. For React, this not a problem but with jQuery plugins, it can duplicate elements in the page (you have to check the redundancy).
146
152
 
147
153
  Disk cache is recommended by default. Nginx will directly fetch file on disk. The TTFB (time to first byte) will be under 200ms :). You can use memory cache if you have lot of RAM.
148
154
 
@@ -44,7 +44,7 @@ module SeoCache
44
44
  browser_options.args << '--disable-notifications'
45
45
  browser_options.args << '--disable-sync'
46
46
  browser_options.args << '--window-size=1920x1080'
47
- #browser_options.args << '--remote-debugging-port=9222'
47
+ browser_options.args << "--remote-debugging-port=#{SeoCache.chrome_debugging_port}" if SeoCache.chrome_debugging_port
48
48
  @driver = ::Selenium::WebDriver.for(:chrome, options: browser_options)
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module SeoCache
2
- VERSION = '0.14.0'.freeze
2
+ VERSION = '0.15.0'.freeze
3
3
  end
data/lib/seo_cache.rb CHANGED
@@ -66,6 +66,10 @@ module SeoCache
66
66
  mattr_accessor :cache_only_status
67
67
  self.cache_only_status = [200]
68
68
 
69
+ # Default port used by Chrome: 9222
70
+ mattr_accessor :chrome_debugging_port
71
+ self.chrome_debugging_port = false
72
+
69
73
  mattr_accessor :extensions_to_ignore
70
74
  self.extensions_to_ignore = %w[.js .css .xml .less .png .jpg .jpeg .gif .pdf .doc .txt .ico .rss .zip .mp3 .rar .exe .wmv .doc .avi .ppt .mpg .mpeg .tif .wav .mov .psd .ai .xls .mp4 .m4a .swf .dat .dmg .iso .flv .m4v .torrent .woff2 .woff .gz .ttf .svg]
71
75
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seo_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FloXcoder