seo_cache 1.3.0 → 2.0.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: a72e3a9ce91ed9a97bd3ab142805b3868a37dd565dabdc3b7d5fe956c7b7be6f
4
- data.tar.gz: 7187dcb3ed4f2987a769667b19df906b30b135d2f6778255a25b1f081002033b
3
+ metadata.gz: ef69c512e2fb562a1682fa078b2504258f7842838984ec840963bf941abdde3d
4
+ data.tar.gz: 3da3bb9c771cf78dc542282290cea148aa2242cc33144ffd6d8e206c4216193f
5
5
  SHA512:
6
- metadata.gz: '009557670cd549d512d14807e18417b5729f11a8969c8d9d4b42282ec1dd697bc0b70cd7e245204370529c4d548ab97e91e87eb7d4229408b131f8786c26ba1e'
7
- data.tar.gz: 2690dc545eee091d27662489cacc1294ad3aef65b3ab77fe5f96666fad964595e7ae254722fe6dc618d740f82b475da64195de4981e39da13f63a0bba1c705b1
6
+ metadata.gz: ee5eea8037a7e14884658ca75ace91fb3eeb62f57e1f20c370b30e0082f72b8a5148d9d2579023746c0bccdfbce4ff0be24112e072985ee78cad4318b4915c69
7
+ data.tar.gz: 37b1b6e8b6a9d30aab5bff348a7ac7c605c9954557b87063d37cedf693d82ab6cfea8e94b5d862ade23f174a226a715d85173323f20f115e6346412fedc21e28
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2.0.0
2
+
3
+ - Remove webdrivers dependency and use only selenium to fetch Chrome driver
4
+
5
+ ## 1.4.0
6
+
7
+ - Correct Selenium warnings and add path for logging
8
+
1
9
  ## 1.3.0
2
10
 
3
11
  - Add new option for Redis: redis_db_index
@@ -27,19 +27,23 @@ module SeoCache
27
27
  private
28
28
 
29
29
  def init_driver
30
- # Selenium::WebDriver.logger.level = :info
30
+ if SeoCache.logger_path
31
+ Selenium::WebDriver.logger.output = SeoCache.logger_path
32
+ Selenium::WebDriver.logger.level = SeoCache.logger_level
33
+ end
31
34
 
32
- Webdrivers.cache_time = 86_400 * 10 # Chromedriver will be cached for 10 days (except if it detects a new version of Chrome)
35
+ # Webdrivers.cache_time = 86_400 * 10 # Chromedriver will be cached for 10 days (except if it detects a new version of Chrome)
33
36
 
34
37
  Selenium::WebDriver::Chrome.path = SeoCache.chrome_path if SeoCache.chrome_path
35
38
 
36
- browser_options = %w[headless incognito disable-gpu disable-infobars disable-dev-shm-usage disable-gpu disable-web-security disable-extensions no-sandbox disable-logging disable-notifications disable-sync window-size=1920x1080]
39
+ browser_options = %w[headless incognito no-sandbox disable-gpu disable-infobars disable-dev-shm-usage disable-web-security disable-extensions disable-logging disable-notifications disable-sync window-size=1920x1080]
37
40
  browser_options << "remote-debugging-port=#{SeoCache.chrome_debugging_port}" if SeoCache.chrome_debugging_port
41
+
38
42
  @driver = ::Selenium::WebDriver.for(
39
43
  :chrome,
40
- capabilities: [Selenium::WebDriver::Chrome::Options.new(
44
+ options: Selenium::WebDriver::Chrome::Options.new(
41
45
  args: browser_options
42
- )]
46
+ )
43
47
  )
44
48
  end
45
49
  end
@@ -1,3 +1,3 @@
1
1
  module SeoCache
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '2.0.0'.freeze
3
3
  end
data/lib/seo_cache.rb CHANGED
@@ -5,7 +5,6 @@ require 'net/http'
5
5
  require 'redis'
6
6
  require 'redis-namespace'
7
7
  require 'selenium/webdriver'
8
- require 'webdrivers/chromedriver'
9
8
 
10
9
  require 'seo_cache/logger'
11
10
  require 'seo_cache/version'
@@ -123,7 +122,7 @@ module SeoCache
123
122
  self.logger_path = nil
124
123
 
125
124
  mattr_accessor :logger_level
126
- self.logger_level = :INFO
125
+ self.logger_level = :warn
127
126
 
128
127
  mattr_accessor :logger
129
128
  # self.logger = SeoCache::Logger.new(SeoCache.logger_path)
data/seo_cache.gemspec CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'redis', '~> 4'
27
27
  spec.add_dependency 'redis-namespace', '~> 1'
28
28
  spec.add_dependency 'selenium-webdriver', '>= 3'
29
- spec.add_dependency 'webdrivers', '>= 3'
30
29
 
31
30
  spec.add_development_dependency 'bundler', '~> 2'
32
31
  spec.add_development_dependency 'rake', '~> 13'
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: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FloXcoder
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-08 00:00:00.000000000 Z
11
+ date: 2023-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3'
97
- - !ruby/object:Gem::Dependency
98
- name: webdrivers
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '3'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '3'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: bundler
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -229,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
215
  - !ruby/object:Gem::Version
230
216
  version: '0'
231
217
  requirements: []
232
- rubygems_version: 3.4.2
218
+ rubygems_version: 3.4.19
233
219
  signing_key:
234
220
  specification_version: 4
235
221
  summary: Cache dedicated for SEO with Javascript rendering