redis_support 0.0.12 → 0.0.13

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.
@@ -64,6 +64,7 @@ module RedisSupport
64
64
  "#{strs.join(":")}"
65
65
  end
66
66
  RUBY
67
+ RedisSupport::Keys.keystructs << keystruct
67
68
  end
68
69
 
69
70
  def redefine_redis_key( name, keystruct )
data/lib/redis_support.rb CHANGED
@@ -19,7 +19,11 @@ module RedisSupport
19
19
  Keys
20
20
  end
21
21
 
22
- module Keys ; end
22
+ module Keys
23
+ def self.keystructs
24
+ @keystructs ||= []
25
+ end
26
+ end
23
27
 
24
28
  def self.included(model)
25
29
  model.extend ClassMethods
@@ -106,6 +106,12 @@ context "Redis Support" do
106
106
  TestClass.redefine_redis_key :test_redefine_notexist, "nonexistent:redis:key:VAR:ID"
107
107
  assert_equal "nonexistent:redis:key:variable:id", TestClass::Keys.test_redefine_notexist("variable", "id")
108
108
  end
109
+
110
+ test "registered keys should show up in keystruct" do
111
+ ["test:redis", "test:redis:VAR", "test:redis:VAR_ONE:VAR_TWO:append"].each do |key|
112
+ assert TestClass::Keys.keystructs.include?(key)
113
+ end
114
+ end
109
115
  end
110
116
 
111
117
  context "Including Redis Support" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian P O'Rourke
@@ -16,11 +16,12 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-14 00:00:00 -07:00
19
+ date: 2010-10-07 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  prerelease: false
24
+ type: :runtime
24
25
  name: redis
25
26
  version_requirements: &id001 !ruby/object:Gem::Requirement
26
27
  none: false
@@ -34,7 +35,6 @@ dependencies:
34
35
  - 4
35
36
  version: 1.0.4
36
37
  requirement: *id001
37
- type: :runtime
38
38
  description: "Module for adding redis functionality to classes: simple key namespacing and locking and connections"
39
39
  email: dolores@doloreslabs.com
40
40
  executables: []
@@ -48,8 +48,8 @@ files:
48
48
  - lib/redis_support/class_extensions.rb
49
49
  - lib/redis_support/locks.rb
50
50
  - README.md
51
- - test/test_redis_support.rb
52
51
  - test/helper.rb
52
+ - test/test_redis_support.rb
53
53
  has_rdoc: true
54
54
  homepage: http://github.com/dolores/redis_support
55
55
  licenses: []
@@ -85,5 +85,5 @@ signing_key:
85
85
  specification_version: 3
86
86
  summary: A Redis Support module
87
87
  test_files:
88
- - test/test_redis_support.rb
89
88
  - test/helper.rb
89
+ - test/test_redis_support.rb