redis-aid 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ $:.unshift(File.expand_path('../lib', __FILE__))
3
3
 
4
4
  require 'rspec/core/rake_task'
5
5
  require 'rake/rdoctask'
6
- require 'redis-aid'
6
+ require 'redis/aid/version'
7
7
 
8
8
  RSpec::Core::RakeTask.new(:spec) do |t|
9
9
  t.pattern = 'spec/**/*_spec.rb'
@@ -1,50 +1 @@
1
- require "redis"
2
- require "nest"
3
-
4
- class Redis
5
- module Aid
6
-
7
- class << self
8
- def version
9
- "0.0.1"
10
- end
11
-
12
- attr_accessor :redis
13
-
14
- def redis
15
- @redis ||= Redis.new
16
- end
17
-
18
- def Namespace(ns)
19
- Redis::Aid.instance_variable_set("@ns", ns)
20
- Redis::Aid
21
- end
22
- alias :Ns :Namespace
23
- end # << self
24
-
25
- module ClassMethods
26
- attr_accessor :redis
27
-
28
- def redis
29
- @redis ||= Redis::Aid.redis
30
- end
31
-
32
- def ns=(namespace)
33
- @redis = Nest.new(namespace, redis)
34
- end
35
- end # ClassMethods
36
-
37
- module InstanceMethods
38
- def redis
39
- self.class.redis
40
- end
41
- end # InstanceMethods
42
-
43
- def self.included(base) # :nodoc:
44
- base.send :extend, ClassMethods
45
- base.send :include, InstanceMethods
46
- base.ns = @ns and @ns = nil if @ns
47
- end
48
-
49
- end # Aid
50
- end # Redis
1
+ require "redis/aid"
@@ -0,0 +1,47 @@
1
+ require "redis"
2
+ require "nest"
3
+ require "redis/aid/version"
4
+
5
+ class Redis
6
+ module Aid
7
+
8
+ class << self
9
+ attr_accessor :redis
10
+
11
+ def redis
12
+ @redis ||= Redis.new
13
+ end
14
+
15
+ def Namespace(ns)
16
+ Redis::Aid.instance_variable_set("@ns", ns)
17
+ Redis::Aid
18
+ end
19
+ alias :Ns :Namespace
20
+ end # << self
21
+
22
+ module ClassMethods
23
+ attr_accessor :redis
24
+
25
+ def redis
26
+ @redis ||= Redis::Aid.redis
27
+ end
28
+
29
+ def ns=(namespace)
30
+ @redis = Nest.new(namespace, redis)
31
+ end
32
+ end # ClassMethods
33
+
34
+ module InstanceMethods
35
+ def redis
36
+ self.class.redis
37
+ end
38
+ end # InstanceMethods
39
+
40
+ def self.included(base) # :nodoc:
41
+ base.send :extend, ClassMethods
42
+ base.send :include, InstanceMethods
43
+ base.ns = @ns and @ns = nil if @ns
44
+ end
45
+
46
+ end # Aid
47
+ end # Redis
@@ -0,0 +1,16 @@
1
+ class Redis
2
+ module Aid
3
+
4
+ module Version
5
+ MAJOR = 0
6
+ MINOR = 0
7
+ PATCH = 3
8
+ STRING = [MAJOR, MINOR, PATCH].join('.')
9
+ end # Version
10
+
11
+ def self.version
12
+ Version::STRING
13
+ end
14
+
15
+ end # Aid
16
+ end # Redis
@@ -1,6 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  $:.unshift(File.expand_path('../lib', __FILE__))
3
- require 'redis-aid'
3
+ require 'redis/aid/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'redis-aid'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-aid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Kowalik
@@ -93,6 +93,8 @@ files:
93
93
  - README.rdoc
94
94
  - Rakefile
95
95
  - lib/redis-aid.rb
96
+ - lib/redis/aid.rb
97
+ - lib/redis/aid/version.rb
96
98
  - redis-aid.gemspec
97
99
  - spec/redis_aid_spec.rb
98
100
  - spec/spec_helper.rb