uri-redis 0.2.0 → 0.3.0
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.
- data/CHANGES.txt +6 -0
- data/lib/uri/redis.rb +11 -4
- data/uri-redis.gemspec +1 -1
- metadata +2 -2
data/CHANGES.txt
CHANGED
data/lib/uri/redis.rb
CHANGED
@@ -47,13 +47,20 @@ module URI
|
|
47
47
|
@@schemes['REDIS'] = Redis
|
48
48
|
end
|
49
49
|
|
50
|
+
|
50
51
|
class Redis
|
51
|
-
|
52
|
+
def self.uri(conf={})
|
53
|
+
URI.parse 'redis://%s:%s/%s' % [conf[:host], conf[:port], conf[:db]]
|
54
|
+
end
|
55
|
+
if defined?(Redis::VERSION) && Redis::VERSION >= "2.0.0"
|
52
56
|
def uri
|
53
|
-
URI.parse 'redis://%s:%s/%s' % [@host, @port, @db]
|
57
|
+
URI.parse 'redis://%s:%s/%s' % [@client.host, @client.port, @client.db]
|
54
58
|
end
|
55
|
-
|
56
|
-
|
59
|
+
else
|
60
|
+
class Client
|
61
|
+
def uri
|
62
|
+
URI.parse 'redis://%s:%s/%s' % [@host, @port, @db]
|
63
|
+
end
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
data/uri-redis.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "uri-redis"
|
3
3
|
s.rubyforge_project = 'uri-redis'
|
4
|
-
s.version = "0.
|
4
|
+
s.version = "0.3.0"
|
5
5
|
s.summary = "URI-Redis: support for parsing redis://host:port/dbindex"
|
6
6
|
s.description = s.summary
|
7
7
|
s.author = "Delano Mandelbaum"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-06-03 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|