led 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/led.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3ce0556bf6f8aa9461bf1230790088181e068e5
|
4
|
+
data.tar.gz: 56b6fd439bbdc6f23be450121f7aa76fd9715105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09e130a6bad6aab2488a2da7341ca663347611d031333b2bac0d44664c479138b75eac808f1f81244839106e892308aa8cd24e45074e17d02f1ce984f72db1f2
|
7
|
+
data.tar.gz: d4d538d7ec020cd533cb75decb7c2c65f7bea151af3702fb1a9dc150b9391a6ff1ce0698f149a9dd02079d11768f88805bbbc4f3e838676b440ec260031307af
|
data/lib/led.rb
CHANGED
@@ -38,6 +38,15 @@ module Led
|
|
38
38
|
if e.message =~ /NOSCRIPT/
|
39
39
|
@shas[m] = conn.script('load', @scripts[m])
|
40
40
|
conn.evalsha(@shas[m], [], args)
|
41
|
+
else
|
42
|
+
handle_command_error(e)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.handle_command_error(e)
|
47
|
+
if e.message =~ /([A-Z][a-zA-Z_0-9]+)(?:\:(.+))?/
|
48
|
+
klass = (Object.const_get($1) rescue Redis::CommandError)
|
49
|
+
raise klass, ($2 || '')
|
41
50
|
else
|
42
51
|
raise e
|
43
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: led
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|