ruby-redis 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +16 -15
- data/lib/redis.rb +6 -208
- data/lib/redis/bin.rb +85 -35
- data/lib/redis/bin.rbc +1953 -637
- data/lib/redis/client.rb +196 -0
- data/lib/redis/client.rbc +3983 -0
- data/lib/redis/config.rb +19 -16
- data/lib/redis/config.rbc +275 -178
- data/lib/redis/connection.rb +9 -48
- data/lib/redis/connection.rbc +157 -853
- data/lib/redis/database.rb +32 -8
- data/lib/redis/database.rbc +952 -381
- data/lib/redis/hashes.rb +2 -4
- data/lib/redis/hashes.rbc +104 -128
- data/lib/redis/keys.rb +3 -6
- data/lib/redis/keys.rbc +222 -240
- data/lib/redis/lists.rb +4 -6
- data/lib/redis/lists.rbc +310 -301
- data/lib/redis/logger.rb +4 -16
- data/lib/redis/logger.rbc +112 -122
- data/lib/redis/protocol.rb +48 -109
- data/lib/redis/protocol.rbc +1255 -2974
- data/lib/redis/pubsub.rb +1 -4
- data/lib/redis/pubsub.rbc +195 -179
- data/lib/redis/reader.rb +28 -17
- data/lib/redis/reader.rbc +748 -433
- data/lib/redis/sender.rb +15 -17
- data/lib/redis/sender.rbc +207 -218
- data/lib/redis/server.rb +4 -6
- data/lib/redis/server.rbc +90 -143
- data/lib/redis/sets.rb +1 -2
- data/lib/redis/sets.rbc +144 -146
- data/lib/redis/strict.rb +1 -3
- data/lib/redis/strict.rbc +79 -104
- data/lib/redis/strings.rb +4 -6
- data/lib/redis/strings.rbc +193 -215
- data/lib/redis/synchrony.rb +17 -24
- data/lib/redis/version.rb +2 -4
- data/lib/redis/version.rbc +18 -63
- data/lib/redis/zsets.rb +1 -3
- data/lib/redis/zsets.rbc +339 -296
- metadata +8 -7
- data/bin/ruby-redis.compiled.rbc +0 -243
data/lib/redis/logger.rb
CHANGED
@@ -1,20 +1,10 @@
|
|
1
|
-
require File.expand_path '../redis', File.dirname(__FILE__)
|
2
1
|
require 'logger'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
# Create log entry example:
|
7
|
-
# Redis.logger.notice "Server started, Redis version %s (Ruby)" % Redis::VERSION
|
8
|
-
# Change device example:
|
9
|
-
# Redis.logger config[:logfile] unless config[:logfile] == 'stdout'
|
10
|
-
def self.logger(logdev = nil, *opts)
|
11
|
-
@@logger = nil if logdev
|
12
|
-
@@logger ||= Logger.new(logdev||STDOUT, *opts)
|
13
|
-
end
|
14
|
-
|
15
|
-
# Redis levels are: DEBUG < INFO < NOTICE < WARNING
|
16
|
-
# This logger inserts support for NOTICE
|
3
|
+
module Redis
|
17
4
|
class Logger < ::Logger
|
5
|
+
|
6
|
+
# Redis levels are: DEBUG < INFO < NOTICE < WARNING
|
7
|
+
# This logger inserts support for NOTICE
|
18
8
|
|
19
9
|
def initialize(logdev, *args)
|
20
10
|
super
|
@@ -76,6 +66,4 @@ class Redis
|
|
76
66
|
end
|
77
67
|
|
78
68
|
end
|
79
|
-
|
80
|
-
|
81
69
|
end
|
data/lib/redis/logger.rbc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
!RBIX
|
2
|
-
|
3
|
-
|
2
|
+
8948944263761558646
|
3
|
+
18
|
4
4
|
M
|
5
5
|
1
|
6
6
|
n
|
@@ -9,66 +9,41 @@ x
|
|
9
9
|
10
|
10
10
|
__script__
|
11
11
|
i
|
12
|
-
|
12
|
+
38
|
13
13
|
5
|
14
|
-
45
|
15
|
-
0
|
16
|
-
1
|
17
14
|
7
|
18
|
-
2
|
19
|
-
64
|
20
|
-
45
|
21
15
|
0
|
22
|
-
3
|
23
|
-
65
|
24
|
-
49
|
25
|
-
4
|
26
|
-
0
|
27
|
-
49
|
28
|
-
5
|
29
|
-
1
|
30
|
-
49
|
31
|
-
6
|
32
|
-
2
|
33
|
-
47
|
34
|
-
49
|
35
|
-
7
|
36
|
-
1
|
37
|
-
15
|
38
|
-
5
|
39
|
-
7
|
40
|
-
8
|
41
16
|
64
|
42
17
|
47
|
43
18
|
49
|
44
|
-
|
19
|
+
1
|
45
20
|
1
|
46
21
|
15
|
47
22
|
99
|
48
23
|
7
|
49
|
-
|
24
|
+
2
|
50
25
|
1
|
51
26
|
65
|
52
27
|
49
|
53
|
-
|
28
|
+
3
|
54
29
|
3
|
55
30
|
13
|
56
31
|
99
|
57
32
|
12
|
58
33
|
7
|
59
|
-
|
34
|
+
4
|
60
35
|
12
|
61
36
|
7
|
62
|
-
|
37
|
+
5
|
63
38
|
12
|
64
39
|
65
|
65
40
|
12
|
66
41
|
49
|
67
|
-
|
42
|
+
6
|
68
43
|
4
|
69
44
|
15
|
70
45
|
49
|
71
|
-
|
46
|
+
4
|
72
47
|
0
|
73
48
|
15
|
74
49
|
2
|
@@ -81,33 +56,18 @@ I
|
|
81
56
|
0
|
82
57
|
I
|
83
58
|
0
|
59
|
+
I
|
60
|
+
0
|
84
61
|
n
|
85
62
|
p
|
86
|
-
14
|
87
|
-
x
|
88
|
-
4
|
89
|
-
File
|
90
|
-
n
|
91
|
-
s
|
92
|
-
8
|
93
|
-
../redis
|
94
|
-
n
|
95
|
-
x
|
96
|
-
11
|
97
|
-
active_path
|
98
|
-
x
|
99
63
|
7
|
100
|
-
dirname
|
101
|
-
x
|
102
|
-
11
|
103
|
-
expand_path
|
104
|
-
x
|
105
|
-
7
|
106
|
-
require
|
107
64
|
s
|
108
65
|
6
|
109
66
|
logger
|
110
67
|
x
|
68
|
+
7
|
69
|
+
require
|
70
|
+
x
|
111
71
|
5
|
112
72
|
Redis
|
113
73
|
x
|
@@ -175,6 +135,8 @@ I
|
|
175
135
|
0
|
176
136
|
I
|
177
137
|
0
|
138
|
+
I
|
139
|
+
0
|
178
140
|
n
|
179
141
|
p
|
180
142
|
7
|
@@ -264,6 +226,8 @@ I
|
|
264
226
|
I
|
265
227
|
0
|
266
228
|
I
|
229
|
+
0
|
230
|
+
I
|
267
231
|
1
|
268
232
|
I
|
269
233
|
1
|
@@ -297,11 +261,11 @@ p
|
|
297
261
|
I
|
298
262
|
-1
|
299
263
|
I
|
300
|
-
|
264
|
+
9
|
301
265
|
I
|
302
266
|
8
|
303
267
|
I
|
304
|
-
|
268
|
+
a
|
305
269
|
I
|
306
270
|
16
|
307
271
|
I
|
@@ -309,7 +273,7 @@ I
|
|
309
273
|
I
|
310
274
|
17
|
311
275
|
I
|
312
|
-
|
276
|
+
b
|
313
277
|
I
|
314
278
|
43
|
315
279
|
x
|
@@ -561,6 +525,8 @@ I
|
|
561
525
|
0
|
562
526
|
I
|
563
527
|
0
|
528
|
+
I
|
529
|
+
0
|
564
530
|
n
|
565
531
|
p
|
566
532
|
34
|
@@ -602,6 +568,8 @@ I
|
|
602
568
|
I
|
603
569
|
1
|
604
570
|
I
|
571
|
+
0
|
572
|
+
I
|
605
573
|
1
|
606
574
|
I
|
607
575
|
1
|
@@ -768,6 +736,8 @@ I
|
|
768
736
|
I
|
769
737
|
4
|
770
738
|
I
|
739
|
+
0
|
740
|
+
I
|
771
741
|
4
|
772
742
|
n
|
773
743
|
p
|
@@ -836,39 +806,39 @@ p
|
|
836
806
|
I
|
837
807
|
0
|
838
808
|
I
|
839
|
-
|
809
|
+
15
|
840
810
|
I
|
841
811
|
12
|
842
812
|
I
|
843
|
-
|
813
|
+
16
|
844
814
|
I
|
845
815
|
14
|
846
816
|
I
|
847
|
-
|
817
|
+
17
|
848
818
|
I
|
849
819
|
24
|
850
820
|
I
|
851
|
-
|
821
|
+
18
|
852
822
|
I
|
853
823
|
34
|
854
824
|
I
|
855
|
-
|
825
|
+
19
|
856
826
|
I
|
857
827
|
44
|
858
828
|
I
|
859
|
-
|
829
|
+
1a
|
860
830
|
I
|
861
831
|
55
|
862
832
|
I
|
863
|
-
|
833
|
+
1b
|
864
834
|
I
|
865
835
|
58
|
866
836
|
I
|
867
|
-
|
837
|
+
16
|
868
838
|
I
|
869
839
|
5b
|
870
840
|
I
|
871
|
-
|
841
|
+
1d
|
872
842
|
I
|
873
843
|
86
|
874
844
|
x
|
@@ -902,19 +872,19 @@ p
|
|
902
872
|
I
|
903
873
|
-1
|
904
874
|
I
|
905
|
-
|
875
|
+
12
|
906
876
|
I
|
907
877
|
0
|
908
878
|
I
|
909
|
-
|
879
|
+
13
|
910
880
|
I
|
911
881
|
4
|
912
882
|
I
|
913
|
-
|
883
|
+
14
|
914
884
|
I
|
915
885
|
9
|
916
886
|
I
|
917
|
-
|
887
|
+
15
|
918
888
|
I
|
919
889
|
13
|
920
890
|
x
|
@@ -972,6 +942,8 @@ I
|
|
972
942
|
0
|
973
943
|
I
|
974
944
|
0
|
945
|
+
I
|
946
|
+
0
|
975
947
|
n
|
976
948
|
p
|
977
949
|
3
|
@@ -989,11 +961,11 @@ p
|
|
989
961
|
I
|
990
962
|
-1
|
991
963
|
I
|
992
|
-
|
964
|
+
21
|
993
965
|
I
|
994
966
|
0
|
995
967
|
I
|
996
|
-
|
968
|
+
22
|
997
969
|
I
|
998
970
|
11
|
999
971
|
I
|
@@ -1123,6 +1095,8 @@ I
|
|
1123
1095
|
0
|
1124
1096
|
I
|
1125
1097
|
0
|
1098
|
+
I
|
1099
|
+
0
|
1126
1100
|
n
|
1127
1101
|
p
|
1128
1102
|
16
|
@@ -1179,35 +1153,35 @@ p
|
|
1179
1153
|
I
|
1180
1154
|
2
|
1181
1155
|
I
|
1182
|
-
|
1156
|
+
27
|
1183
1157
|
I
|
1184
1158
|
20
|
1185
1159
|
I
|
1186
|
-
|
1160
|
+
28
|
1187
1161
|
I
|
1188
1162
|
28
|
1189
1163
|
I
|
1190
|
-
|
1164
|
+
29
|
1191
1165
|
I
|
1192
1166
|
30
|
1193
1167
|
I
|
1194
|
-
|
1168
|
+
2a
|
1195
1169
|
I
|
1196
1170
|
38
|
1197
1171
|
I
|
1198
|
-
|
1172
|
+
2b
|
1199
1173
|
I
|
1200
1174
|
41
|
1201
1175
|
I
|
1202
|
-
|
1176
|
+
2c
|
1203
1177
|
I
|
1204
1178
|
4a
|
1205
1179
|
I
|
1206
|
-
|
1180
|
+
2d
|
1207
1181
|
I
|
1208
1182
|
53
|
1209
1183
|
I
|
1210
|
-
|
1184
|
+
2e
|
1211
1185
|
I
|
1212
1186
|
5c
|
1213
1187
|
x
|
@@ -1278,6 +1252,8 @@ I
|
|
1278
1252
|
I
|
1279
1253
|
0
|
1280
1254
|
I
|
1255
|
+
0
|
1256
|
+
I
|
1281
1257
|
1
|
1282
1258
|
n
|
1283
1259
|
p
|
@@ -1300,11 +1276,11 @@ p
|
|
1300
1276
|
I
|
1301
1277
|
-1
|
1302
1278
|
I
|
1303
|
-
|
1279
|
+
32
|
1304
1280
|
I
|
1305
1281
|
c
|
1306
1282
|
I
|
1307
|
-
|
1283
|
+
33
|
1308
1284
|
I
|
1309
1285
|
25
|
1310
1286
|
x
|
@@ -1374,6 +1350,8 @@ I
|
|
1374
1350
|
I
|
1375
1351
|
0
|
1376
1352
|
I
|
1353
|
+
0
|
1354
|
+
I
|
1377
1355
|
1
|
1378
1356
|
n
|
1379
1357
|
p
|
@@ -1396,11 +1374,11 @@ p
|
|
1396
1374
|
I
|
1397
1375
|
-1
|
1398
1376
|
I
|
1399
|
-
|
1377
|
+
35
|
1400
1378
|
I
|
1401
1379
|
c
|
1402
1380
|
I
|
1403
|
-
|
1381
|
+
36
|
1404
1382
|
I
|
1405
1383
|
25
|
1406
1384
|
x
|
@@ -1470,6 +1448,8 @@ I
|
|
1470
1448
|
I
|
1471
1449
|
0
|
1472
1450
|
I
|
1451
|
+
0
|
1452
|
+
I
|
1473
1453
|
1
|
1474
1454
|
n
|
1475
1455
|
p
|
@@ -1492,11 +1472,11 @@ p
|
|
1492
1472
|
I
|
1493
1473
|
-1
|
1494
1474
|
I
|
1495
|
-
|
1475
|
+
38
|
1496
1476
|
I
|
1497
1477
|
c
|
1498
1478
|
I
|
1499
|
-
|
1479
|
+
39
|
1500
1480
|
I
|
1501
1481
|
25
|
1502
1482
|
x
|
@@ -1566,6 +1546,8 @@ I
|
|
1566
1546
|
I
|
1567
1547
|
0
|
1568
1548
|
I
|
1549
|
+
0
|
1550
|
+
I
|
1569
1551
|
1
|
1570
1552
|
n
|
1571
1553
|
p
|
@@ -1588,11 +1570,11 @@ p
|
|
1588
1570
|
I
|
1589
1571
|
-1
|
1590
1572
|
I
|
1591
|
-
|
1573
|
+
3b
|
1592
1574
|
I
|
1593
1575
|
c
|
1594
1576
|
I
|
1595
|
-
|
1577
|
+
3c
|
1596
1578
|
I
|
1597
1579
|
25
|
1598
1580
|
x
|
@@ -1662,6 +1644,8 @@ I
|
|
1662
1644
|
I
|
1663
1645
|
0
|
1664
1646
|
I
|
1647
|
+
0
|
1648
|
+
I
|
1665
1649
|
1
|
1666
1650
|
n
|
1667
1651
|
p
|
@@ -1684,11 +1668,11 @@ p
|
|
1684
1668
|
I
|
1685
1669
|
-1
|
1686
1670
|
I
|
1687
|
-
|
1671
|
+
3e
|
1688
1672
|
I
|
1689
1673
|
c
|
1690
1674
|
I
|
1691
|
-
|
1675
|
+
3f
|
1692
1676
|
I
|
1693
1677
|
25
|
1694
1678
|
x
|
@@ -1731,6 +1715,8 @@ I
|
|
1731
1715
|
0
|
1732
1716
|
I
|
1733
1717
|
0
|
1718
|
+
I
|
1719
|
+
0
|
1734
1720
|
n
|
1735
1721
|
p
|
1736
1722
|
4
|
@@ -1749,7 +1735,7 @@ p
|
|
1749
1735
|
I
|
1750
1736
|
-1
|
1751
1737
|
I
|
1752
|
-
|
1738
|
+
42
|
1753
1739
|
I
|
1754
1740
|
9
|
1755
1741
|
x
|
@@ -1786,6 +1772,8 @@ I
|
|
1786
1772
|
0
|
1787
1773
|
I
|
1788
1774
|
0
|
1775
|
+
I
|
1776
|
+
0
|
1789
1777
|
n
|
1790
1778
|
p
|
1791
1779
|
4
|
@@ -1804,7 +1792,7 @@ p
|
|
1804
1792
|
I
|
1805
1793
|
-1
|
1806
1794
|
I
|
1807
|
-
|
1795
|
+
43
|
1808
1796
|
I
|
1809
1797
|
9
|
1810
1798
|
x
|
@@ -1841,6 +1829,8 @@ I
|
|
1841
1829
|
0
|
1842
1830
|
I
|
1843
1831
|
0
|
1832
|
+
I
|
1833
|
+
0
|
1844
1834
|
n
|
1845
1835
|
p
|
1846
1836
|
4
|
@@ -1859,7 +1849,7 @@ p
|
|
1859
1849
|
I
|
1860
1850
|
-1
|
1861
1851
|
I
|
1862
|
-
|
1852
|
+
44
|
1863
1853
|
I
|
1864
1854
|
9
|
1865
1855
|
x
|
@@ -1896,6 +1886,8 @@ I
|
|
1896
1886
|
0
|
1897
1887
|
I
|
1898
1888
|
0
|
1889
|
+
I
|
1890
|
+
0
|
1899
1891
|
n
|
1900
1892
|
p
|
1901
1893
|
4
|
@@ -1914,7 +1906,7 @@ p
|
|
1914
1906
|
I
|
1915
1907
|
-1
|
1916
1908
|
I
|
1917
|
-
|
1909
|
+
45
|
1918
1910
|
I
|
1919
1911
|
9
|
1920
1912
|
x
|
@@ -1960,6 +1952,8 @@ I
|
|
1960
1952
|
I
|
1961
1953
|
1
|
1962
1954
|
I
|
1955
|
+
0
|
1956
|
+
I
|
1963
1957
|
1
|
1964
1958
|
n
|
1965
1959
|
p
|
@@ -1979,11 +1973,11 @@ p
|
|
1979
1973
|
I
|
1980
1974
|
-1
|
1981
1975
|
I
|
1982
|
-
|
1976
|
+
49
|
1983
1977
|
I
|
1984
1978
|
0
|
1985
1979
|
I
|
1986
|
-
|
1980
|
+
4a
|
1987
1981
|
I
|
1988
1982
|
10
|
1989
1983
|
x
|
@@ -1999,63 +1993,63 @@ p
|
|
1999
1993
|
I
|
2000
1994
|
2
|
2001
1995
|
I
|
2002
|
-
|
1996
|
+
12
|
2003
1997
|
I
|
2004
1998
|
10
|
2005
1999
|
I
|
2006
|
-
|
2000
|
+
21
|
2007
2001
|
I
|
2008
2002
|
1e
|
2009
2003
|
I
|
2010
|
-
|
2004
|
+
25
|
2011
2005
|
I
|
2012
2006
|
38
|
2013
2007
|
I
|
2014
|
-
|
2008
|
+
30
|
2015
2009
|
I
|
2016
2010
|
41
|
2017
2011
|
I
|
2018
|
-
|
2012
|
+
32
|
2019
2013
|
I
|
2020
2014
|
4f
|
2021
2015
|
I
|
2022
|
-
|
2016
|
+
35
|
2023
2017
|
I
|
2024
2018
|
5d
|
2025
2019
|
I
|
2026
|
-
|
2020
|
+
38
|
2027
2021
|
I
|
2028
2022
|
6b
|
2029
2023
|
I
|
2030
|
-
|
2024
|
+
3b
|
2031
2025
|
I
|
2032
2026
|
79
|
2033
2027
|
I
|
2034
|
-
|
2028
|
+
3e
|
2035
2029
|
I
|
2036
2030
|
87
|
2037
2031
|
I
|
2038
|
-
|
2032
|
+
42
|
2039
2033
|
I
|
2040
2034
|
95
|
2041
2035
|
I
|
2042
|
-
|
2036
|
+
43
|
2043
2037
|
I
|
2044
2038
|
a3
|
2045
2039
|
I
|
2046
|
-
|
2040
|
+
44
|
2047
2041
|
I
|
2048
2042
|
b1
|
2049
2043
|
I
|
2050
|
-
|
2044
|
+
45
|
2051
2045
|
I
|
2052
2046
|
bf
|
2053
2047
|
I
|
2054
|
-
|
2048
|
+
47
|
2055
2049
|
I
|
2056
2050
|
c3
|
2057
2051
|
I
|
2058
|
-
|
2052
|
+
49
|
2059
2053
|
I
|
2060
2054
|
d1
|
2061
2055
|
x
|
@@ -2068,11 +2062,11 @@ p
|
|
2068
2062
|
I
|
2069
2063
|
2
|
2070
2064
|
I
|
2071
|
-
|
2065
|
+
9
|
2072
2066
|
I
|
2073
2067
|
d
|
2074
2068
|
I
|
2075
|
-
|
2069
|
+
10
|
2076
2070
|
I
|
2077
2071
|
2a
|
2078
2072
|
x
|
@@ -2084,21 +2078,17 @@ x
|
|
2084
2078
|
13
|
2085
2079
|
attach_method
|
2086
2080
|
p
|
2087
|
-
|
2081
|
+
5
|
2088
2082
|
I
|
2089
2083
|
0
|
2090
2084
|
I
|
2091
2085
|
1
|
2092
2086
|
I
|
2093
|
-
|
2094
|
-
I
|
2095
|
-
2
|
2096
|
-
I
|
2097
|
-
22
|
2087
|
+
9
|
2098
2088
|
I
|
2099
|
-
|
2089
|
+
3
|
2100
2090
|
I
|
2101
|
-
|
2091
|
+
26
|
2102
2092
|
x
|
2103
2093
|
52
|
2104
2094
|
/Users/dturnbull/ruby/ruby-redis/lib/redis/logger.rb
|