namespaced_redis 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +11 -0
- data/lib/namespaced_redis.rb +1 -1
- data/namespaced_redis.gemspec +1 -1
- metadata +51 -33
data/README.textile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
h1. namespaced_redis
|
2
|
+
|
3
|
+
The namespaced_redis gem is a wrapper gem for the standard redis gem that prepends a value to each key that is written and read from redis. It is used to seperate out logical sections of data while keeping your app clean.
|
4
|
+
|
5
|
+
Usage:
|
6
|
+
|
7
|
+
pre. redis_options = {:host => "localhost", :port => 6379}
|
8
|
+
@redis = NamespacedRedis.new(redis_options, "your-unique-id")
|
9
|
+
|
10
|
+
redis_options is a hash that is passed into the redis object and is unaltered as it is passed through, so please refer to the redis gem for details of this. The second parameter is a unique id set by you, I would suggest that this contains a unique id for the data (possibly the id of the object that the data relates to) and also the version of your application, as the data in redis may remain after an upgrade and may be in an invalid format.
|
11
|
+
|
data/lib/namespaced_redis.rb
CHANGED
data/namespaced_redis.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = NamespacedRedis::VERSION
|
8
8
|
s.authors = ["Stewart McKee"]
|
9
9
|
s.email = ["stewart@theizone.co.uk"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "https://github.com/stewartmckee/namespaced_redis"
|
11
11
|
s.summary = "Adds a namespace to redis"
|
12
12
|
s.description = "Returns a namespaced version of redis"
|
13
13
|
|
metadata
CHANGED
@@ -1,61 +1,79 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: namespaced_redis
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: 1.0.3
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Stewart McKee
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2012-09-04 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: redis
|
16
|
-
requirement: &70145481498560 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
25
32
|
description: Returns a namespaced version of redis
|
26
|
-
email:
|
33
|
+
email:
|
27
34
|
- stewart@theizone.co.uk
|
28
35
|
executables: []
|
36
|
+
|
29
37
|
extensions: []
|
38
|
+
|
30
39
|
extra_rdoc_files: []
|
31
|
-
|
40
|
+
|
41
|
+
files:
|
32
42
|
- .gitignore
|
33
43
|
- Gemfile
|
44
|
+
- README.textile
|
34
45
|
- Rakefile
|
35
46
|
- lib/namespaced_redis.rb
|
36
47
|
- namespaced_redis.gemspec
|
37
|
-
|
48
|
+
has_rdoc: true
|
49
|
+
homepage: https://github.com/stewartmckee/namespaced_redis
|
38
50
|
licenses: []
|
51
|
+
|
39
52
|
post_install_message:
|
40
53
|
rdoc_options: []
|
41
|
-
|
54
|
+
|
55
|
+
require_paths:
|
42
56
|
- lib
|
43
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
version: "0"
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
version: "0"
|
55
71
|
requirements: []
|
72
|
+
|
56
73
|
rubyforge_project: namespaced_redis
|
57
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.3.6
|
58
75
|
signing_key:
|
59
76
|
specification_version: 3
|
60
77
|
summary: Adds a namespace to redis
|
61
78
|
test_files: []
|
79
|
+
|