netzke-redis-persistence 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18cd5ed0056e627a272378561023051558078ba4
|
4
|
+
data.tar.gz: 02e6279effacab8c8d650627ef703e960e5330fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 601f2649ac0cffcd051e05eb094c81ff8415956622e4d5b780dc5dae2dcdacc74b8e1fac9c1078fe2a727b5480093898600ce5b6264c4ea1f3d73c774593b1de
|
7
|
+
data.tar.gz: 8fbd8e0361a811bdd4535b4ef6f428ee9b0259c17ed5fcf8e4774069fbca3be80e64c3092be032ad33ec419474561316481c886456e92fac27a76b82722862eb
|
data/README.md
CHANGED
@@ -11,3 +11,12 @@ Add this to your Gemfile and run bundle install
|
|
11
11
|
gem 'netzke-redis-persistence'
|
12
12
|
|
13
13
|
Don't forget to install the redis server.
|
14
|
+
|
15
|
+
## Configuration
|
16
|
+
|
17
|
+
If you are not using redis on localhost you can override the connection with an initializer:
|
18
|
+
|
19
|
+
NetzkeRedisPersistence.configure do |config|
|
20
|
+
config.redis_connection = Redis.new
|
21
|
+
end
|
22
|
+
|
@@ -1,6 +1,22 @@
|
|
1
1
|
require "redis"
|
2
|
+
require "netzke_redis_persistence/configuration"
|
2
3
|
require "netzke_redis_persistence/netzke_core_ext/state"
|
3
4
|
|
4
5
|
module NetzkeRedisPersistence
|
6
|
+
class << self
|
7
|
+
attr_writer :configuration
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.configuration
|
11
|
+
@configuration ||= Configuration.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.reset
|
15
|
+
@configuration = Configuration.new
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.configure
|
19
|
+
yield(configuration)
|
20
|
+
end
|
5
21
|
end
|
6
22
|
require "netzke_redis_persistence/store"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-redis-persistence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- firemind
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: netzke-core
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- Rakefile
|
52
52
|
- init.rb
|
53
53
|
- lib/netzke-redis-persistence.rb
|
54
|
+
- lib/netzke_redis_persistence/configuration.rb
|
54
55
|
- lib/netzke_redis_persistence/netzke_core_ext/state.rb
|
55
56
|
- lib/netzke_redis_persistence/store.rb
|
56
57
|
- lib/netzke_redis_persistence/version.rb
|