seo_cache 1.2.1 → 1.3.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: 612bb7e5cfe82ac49b35bc86915082f054c9e4dbe91bc2b664038de965d1f07e
4
- data.tar.gz: ca1dcfcff1cfa0fb9bcf8dc4ec6d3edc0660c2965fc9c9276c01581638271a27
3
+ metadata.gz: a72e3a9ce91ed9a97bd3ab142805b3868a37dd565dabdc3b7d5fe956c7b7be6f
4
+ data.tar.gz: 7187dcb3ed4f2987a769667b19df906b30b135d2f6778255a25b1f081002033b
5
5
  SHA512:
6
- metadata.gz: 69904412e9083c552ae777c266b960e0d5295fc3536d4f85da90ad47bcb77349e2a6c53be9e4dc9eb0ee8602dc121841974205e1480a15347ed5798a8c781bd9
7
- data.tar.gz: 205c8bc45ac28e7969342b5a495530557a1020762969c7fed49cea7bc3bbdf8126fe02866d8eef4f43267753886ee51ac1080aded6e50df4ed8ae946234f2ec3
6
+ metadata.gz: '009557670cd549d512d14807e18417b5729f11a8969c8d9d4b42282ec1dd697bc0b70cd7e245204370529c4d548ab97e91e87eb7d4229408b131f8786c26ba1e'
7
+ data.tar.gz: 2690dc545eee091d27662489cacc1294ad3aef65b3ab77fe5f96666fad964595e7ae254722fe6dc618d740f82b475da64195de4981e39da13f63a0bba1c705b1
data/.travis.yml CHANGED
@@ -30,12 +30,12 @@ script: bundle exec rake $RAKE_TASK
30
30
 
31
31
  matrix:
32
32
  include:
33
- - rvm: 2.7
33
+ - rvm: 3.0
34
34
  gemfile: Gemfile
35
35
  env: RAKE_TASK=spec
36
- - rvm: 2.6
36
+ - rvm: 2.7
37
37
  gemfile: Gemfile
38
38
  env: RAKE_TASK=spec
39
- - rvm: 2.5
39
+ - rvm: 2.6
40
40
  gemfile: Gemfile
41
41
  env: RAKE_TASK=spec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.3.0
2
+
3
+ - Add new option for Redis: redis_db_index
4
+
5
+ ## 1.2.2
6
+
7
+ - Update Ruby version for Travis testing
8
+
1
9
  ## 1.2.1
2
10
 
3
11
  - Update deprecated Selenium options
data/README.md CHANGED
@@ -58,6 +58,8 @@ require 'seo_cache'
58
58
  Rails.application.config.middleware.use SeoCache::Middleware
59
59
  ```
60
60
 
61
+ Required at least Ruby 2.6.
62
+
61
63
  ## Configuration
62
64
 
63
65
  Chrome path (**required**) (`disk` or `memory`):
@@ -84,12 +86,18 @@ Redis URL (**required** if memory cache):
84
86
  SeoCache.redis_url = "redis://localhost:6379/"
85
87
  ```
86
88
 
87
- Redis prefix:
89
+ Redis prefix (if needed):
88
90
 
89
91
  ```ruby
90
92
  SeoCache.redis_namespace = '_my_project:seo_cache'
91
93
  ```
92
94
 
95
+ Redis database index (if needed):
96
+
97
+ ```ruby
98
+ SeoCache.redis_db_index = 1
99
+ ```
100
+
93
101
  Waiting time before the page is fully loaded (optional in sec, useful for async elements):
94
102
 
95
103
  ```ruby
@@ -10,7 +10,7 @@ module SeoCache
10
10
 
11
11
  def initialize_memory_cache
12
12
  uri = URI.parse(SeoCache.redis_url)
13
- @redis = Redis::Namespace.new(SeoCache.redis_namespace, redis: Redis.new(host: uri.host, port: uri.port, password: uri.password, connect_timeout: 1, timeout: 1), warnings: false)
13
+ @redis = Redis::Namespace.new(SeoCache.redis_namespace, redis: Redis.new(host: uri.host, port: uri.port, password: uri.password, db: SeoCache.redis_db_index, connect_timeout: 1, timeout: 1), warnings: false)
14
14
  end
15
15
 
16
16
  def get(path, locale_domain = nil, extension = nil)
@@ -1,3 +1,3 @@
1
1
  module SeoCache
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
data/lib/seo_cache.rb CHANGED
@@ -34,6 +34,9 @@ module SeoCache
34
34
  mattr_accessor :redis_url
35
35
  self.redis_url = 'redis://localhost:6379/'
36
36
 
37
+ mattr_accessor :redis_db_index
38
+ self.redis_db_index = 0
39
+
37
40
  mattr_accessor :redis_namespace
38
41
  self.redis_namespace = '_seo_cache:'
39
42
 
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.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FloXcoder
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2023-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -214,7 +214,7 @@ homepage: https://github.com/floXcoder/seo_cache
214
214
  licenses:
215
215
  - MIT
216
216
  metadata: {}
217
- post_install_message:
217
+ post_install_message:
218
218
  rdoc_options: []
219
219
  require_paths:
220
220
  - lib
@@ -229,8 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.3.5
233
- signing_key:
232
+ rubygems_version: 3.4.2
233
+ signing_key:
234
234
  specification_version: 4
235
235
  summary: Cache dedicated for SEO with Javascript rendering
236
236
  test_files: []