cache_store_redis 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92f703da03a8da304163a24e31b71fe1379736af
4
- data.tar.gz: d683eefcaec661c61fbf96b8f39a3c523b8ebf91
3
+ metadata.gz: c7f103ea149842e7d49115c14cdcddf84961ab35
4
+ data.tar.gz: 30a2e3bb70f8a13f013d36bb975a82c16719ee9d
5
5
  SHA512:
6
- metadata.gz: 7a5d9f6ad0c5be2f20be8f1f7570a609aad4dd466d39b8199111e962c5cfb77df79d0fb69d964cabadd3083d2cf9c11cfd6b2b3aab8b04cce435c0d057b9caf1
7
- data.tar.gz: 0ce6f8ba58c4bf58d7b25b68d2e7c863eb93916a98d7477f58a029e924ee9314f950d481885486dec2ec780ca6ec002d9837935e73d1f3a7b4905dd6994ae6a6
6
+ metadata.gz: e7abfd13f8013f9a79a62e91e4df084b70bfbd72596e25bce358af0048fa5213cb2cae02f49966a28563152e8c6afda7ba920f53618cb51af36c4e8f2de2506f
7
+ data.tar.gz: f79d9d754f2bed4e790e63f02fca988e8c88df15f7920ec05ce3b28d107564df139b8783b8e4172fdf69aadab12bc767521c93e380c41c72887d9b52c88b86f3
@@ -1,3 +1,3 @@
1
1
  module CacheStoreRedis
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -6,17 +6,30 @@ require 'oj'
6
6
  #This class is used for interacting with a redis based cache store.
7
7
  class RedisCacheStore
8
8
 
9
- def initialize(namespace = nil)
9
+ def initialize(namespace = nil, config = nil)
10
10
  @namespace = namespace
11
- @client = Redis.new
11
+ if config == nil
12
+ @client = Redis.new
13
+ else
14
+ @client = Redis.new(config)
15
+ end
12
16
  end
13
17
 
14
18
  #This method is called to configure the connection to the cache store.
15
- def configure(host = 'localhost', port = 6379, db = 'default', password = nil)
16
- config = { :host => host, :port => port, :db => db }
19
+ def configure(host = 'localhost', port = 6379, db = 'default', password = nil, driver: nil, url: nil)
20
+ if url != nil
21
+ config[:url] = url
22
+ config[:db] = db
23
+ else
24
+ config = { :host => host, :port => port, :db => db }
25
+ end
17
26
  if password != nil
18
27
  config[:password] = password
19
28
  end
29
+ if driver != nil
30
+ config[:driver] = driver
31
+ end
32
+
20
33
  @client = Redis.new(config)
21
34
  end
22
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_store_redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-06 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,4 +130,3 @@ signing_key:
130
130
  specification_version: 4
131
131
  summary: This is the redis cache_store implementation.
132
132
  test_files: []
133
- has_rdoc: