rredis 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +23 -0
- data/.gemtest +0 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +68 -0
- data/History.txt +6 -0
- data/Manifest.txt +40 -0
- data/README.md +143 -0
- data/Rakefile +34 -0
- data/benchmark/default.rb +62 -0
- data/benchmark/pipeline.rb +57 -0
- data/bin/rredis_server +7 -0
- data/config.ru +5 -0
- data/lib/lua/get.lua +74 -0
- data/lib/lua/store.lua +170 -0
- data/lib/rredis.rb +61 -0
- data/lib/rredis/server.rb +63 -0
- data/lib/rredis/web/assets/javascripts/application.js +3 -0
- data/lib/rredis/web/assets/javascripts/main.js +97 -0
- data/lib/rredis/web/assets/javascripts/vendor/bootstrap.js +1726 -0
- data/lib/rredis/web/assets/javascripts/vendor/bootstrap.min.js +6 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/highcharts.js +202 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/modules/canvas-tools.js +133 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/modules/exporting.js +23 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/themes/dark-blue.js +263 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/themes/dark-green.js +263 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/themes/gray.js +262 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/themes/grid.js +95 -0
- data/lib/rredis/web/assets/javascripts/vendor/highcharts/themes/skies.js +89 -0
- data/lib/rredis/web/assets/javascripts/vendor/jquery.js +4 -0
- data/lib/rredis/web/assets/stylesheets/application.css +10 -0
- data/lib/rredis/web/assets/stylesheets/vendor/bootstrap-responsive.css +686 -0
- data/lib/rredis/web/assets/stylesheets/vendor/bootstrap.css +3990 -0
- data/lib/rredis/web/images/glyphicons-halflings-white.png +0 -0
- data/lib/rredis/web/images/glyphicons-halflings.png +0 -0
- data/lib/rredis/web/views/index.slim +7 -0
- data/lib/rredis/web/views/layout.slim +26 -0
- data/spec/rredis/get_spec.rb +47 -0
- data/spec/rredis/store_spec.rb +159 -0
- data/spec/spec_helper.rb +21 -0
- metadata +124 -0
@@ -0,0 +1,263 @@
|
|
1
|
+
/**
|
2
|
+
* Dark blue theme for Highcharts JS
|
3
|
+
* @author Torstein Hønsi
|
4
|
+
*/
|
5
|
+
|
6
|
+
Highcharts.theme = {
|
7
|
+
colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
|
8
|
+
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
9
|
+
chart: {
|
10
|
+
backgroundColor: {
|
11
|
+
linearGradient: [0, 0, 250, 500],
|
12
|
+
stops: [
|
13
|
+
[0, 'rgb(48, 96, 48)'],
|
14
|
+
[1, 'rgb(0, 0, 0)']
|
15
|
+
]
|
16
|
+
},
|
17
|
+
borderColor: '#000000',
|
18
|
+
borderWidth: 2,
|
19
|
+
className: 'dark-container',
|
20
|
+
plotBackgroundColor: 'rgba(255, 255, 255, .1)',
|
21
|
+
plotBorderColor: '#CCCCCC',
|
22
|
+
plotBorderWidth: 1
|
23
|
+
},
|
24
|
+
title: {
|
25
|
+
style: {
|
26
|
+
color: '#C0C0C0',
|
27
|
+
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
|
28
|
+
}
|
29
|
+
},
|
30
|
+
subtitle: {
|
31
|
+
style: {
|
32
|
+
color: '#666666',
|
33
|
+
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
|
34
|
+
}
|
35
|
+
},
|
36
|
+
xAxis: {
|
37
|
+
gridLineColor: '#333333',
|
38
|
+
gridLineWidth: 1,
|
39
|
+
labels: {
|
40
|
+
style: {
|
41
|
+
color: '#A0A0A0'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
lineColor: '#A0A0A0',
|
45
|
+
tickColor: '#A0A0A0',
|
46
|
+
title: {
|
47
|
+
style: {
|
48
|
+
color: '#CCC',
|
49
|
+
fontWeight: 'bold',
|
50
|
+
fontSize: '12px',
|
51
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
52
|
+
|
53
|
+
}
|
54
|
+
}
|
55
|
+
},
|
56
|
+
yAxis: {
|
57
|
+
gridLineColor: '#333333',
|
58
|
+
labels: {
|
59
|
+
style: {
|
60
|
+
color: '#A0A0A0'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
lineColor: '#A0A0A0',
|
64
|
+
minorTickInterval: null,
|
65
|
+
tickColor: '#A0A0A0',
|
66
|
+
tickWidth: 1,
|
67
|
+
title: {
|
68
|
+
style: {
|
69
|
+
color: '#CCC',
|
70
|
+
fontWeight: 'bold',
|
71
|
+
fontSize: '12px',
|
72
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
tooltip: {
|
77
|
+
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
78
|
+
style: {
|
79
|
+
color: '#F0F0F0'
|
80
|
+
}
|
81
|
+
},
|
82
|
+
toolbar: {
|
83
|
+
itemStyle: {
|
84
|
+
color: 'silver'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
plotOptions: {
|
88
|
+
line: {
|
89
|
+
dataLabels: {
|
90
|
+
color: '#CCC'
|
91
|
+
},
|
92
|
+
marker: {
|
93
|
+
lineColor: '#333'
|
94
|
+
}
|
95
|
+
},
|
96
|
+
spline: {
|
97
|
+
marker: {
|
98
|
+
lineColor: '#333'
|
99
|
+
}
|
100
|
+
},
|
101
|
+
scatter: {
|
102
|
+
marker: {
|
103
|
+
lineColor: '#333'
|
104
|
+
}
|
105
|
+
},
|
106
|
+
candlestick: {
|
107
|
+
lineColor: 'white'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
legend: {
|
111
|
+
itemStyle: {
|
112
|
+
font: '9pt Trebuchet MS, Verdana, sans-serif',
|
113
|
+
color: '#A0A0A0'
|
114
|
+
},
|
115
|
+
itemHoverStyle: {
|
116
|
+
color: '#FFF'
|
117
|
+
},
|
118
|
+
itemHiddenStyle: {
|
119
|
+
color: '#444'
|
120
|
+
}
|
121
|
+
},
|
122
|
+
credits: {
|
123
|
+
style: {
|
124
|
+
color: '#666'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
labels: {
|
128
|
+
style: {
|
129
|
+
color: '#CCC'
|
130
|
+
}
|
131
|
+
},
|
132
|
+
|
133
|
+
navigation: {
|
134
|
+
buttonOptions: {
|
135
|
+
backgroundColor: {
|
136
|
+
linearGradient: [0, 0, 0, 20],
|
137
|
+
stops: [
|
138
|
+
[0.4, '#606060'],
|
139
|
+
[0.6, '#333333']
|
140
|
+
]
|
141
|
+
},
|
142
|
+
borderColor: '#000000',
|
143
|
+
symbolStroke: '#C0C0C0',
|
144
|
+
hoverSymbolStroke: '#FFFFFF'
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
exporting: {
|
149
|
+
buttons: {
|
150
|
+
exportButton: {
|
151
|
+
symbolFill: '#55BE3B'
|
152
|
+
},
|
153
|
+
printButton: {
|
154
|
+
symbolFill: '#7797BE'
|
155
|
+
}
|
156
|
+
}
|
157
|
+
},
|
158
|
+
|
159
|
+
// scroll charts
|
160
|
+
rangeSelector: {
|
161
|
+
buttonTheme: {
|
162
|
+
fill: {
|
163
|
+
linearGradient: [0, 0, 0, 20],
|
164
|
+
stops: [
|
165
|
+
[0.4, '#888'],
|
166
|
+
[0.6, '#555']
|
167
|
+
]
|
168
|
+
},
|
169
|
+
stroke: '#000000',
|
170
|
+
style: {
|
171
|
+
color: '#CCC',
|
172
|
+
fontWeight: 'bold'
|
173
|
+
},
|
174
|
+
states: {
|
175
|
+
hover: {
|
176
|
+
fill: {
|
177
|
+
linearGradient: [0, 0, 0, 20],
|
178
|
+
stops: [
|
179
|
+
[0.4, '#BBB'],
|
180
|
+
[0.6, '#888']
|
181
|
+
]
|
182
|
+
},
|
183
|
+
stroke: '#000000',
|
184
|
+
style: {
|
185
|
+
color: 'white'
|
186
|
+
}
|
187
|
+
},
|
188
|
+
select: {
|
189
|
+
fill: {
|
190
|
+
linearGradient: [0, 0, 0, 20],
|
191
|
+
stops: [
|
192
|
+
[0.1, '#000'],
|
193
|
+
[0.3, '#333']
|
194
|
+
]
|
195
|
+
},
|
196
|
+
stroke: '#000000',
|
197
|
+
style: {
|
198
|
+
color: 'yellow'
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
},
|
203
|
+
inputStyle: {
|
204
|
+
backgroundColor: '#333',
|
205
|
+
color: 'silver'
|
206
|
+
},
|
207
|
+
labelStyle: {
|
208
|
+
color: 'silver'
|
209
|
+
}
|
210
|
+
},
|
211
|
+
|
212
|
+
navigator: {
|
213
|
+
handles: {
|
214
|
+
backgroundColor: '#666',
|
215
|
+
borderColor: '#AAA'
|
216
|
+
},
|
217
|
+
outlineColor: '#CCC',
|
218
|
+
maskFill: 'rgba(16, 16, 16, 0.5)',
|
219
|
+
series: {
|
220
|
+
color: '#7798BF',
|
221
|
+
lineColor: '#A6C7ED'
|
222
|
+
}
|
223
|
+
},
|
224
|
+
|
225
|
+
scrollbar: {
|
226
|
+
barBackgroundColor: {
|
227
|
+
linearGradient: [0, 0, 0, 20],
|
228
|
+
stops: [
|
229
|
+
[0.4, '#888'],
|
230
|
+
[0.6, '#555']
|
231
|
+
]
|
232
|
+
},
|
233
|
+
barBorderColor: '#CCC',
|
234
|
+
buttonArrowColor: '#CCC',
|
235
|
+
buttonBackgroundColor: {
|
236
|
+
linearGradient: [0, 0, 0, 20],
|
237
|
+
stops: [
|
238
|
+
[0.4, '#888'],
|
239
|
+
[0.6, '#555']
|
240
|
+
]
|
241
|
+
},
|
242
|
+
buttonBorderColor: '#CCC',
|
243
|
+
rifleColor: '#FFF',
|
244
|
+
trackBackgroundColor: {
|
245
|
+
linearGradient: [0, 0, 0, 10],
|
246
|
+
stops: [
|
247
|
+
[0, '#000'],
|
248
|
+
[1, '#333']
|
249
|
+
]
|
250
|
+
},
|
251
|
+
trackBorderColor: '#666'
|
252
|
+
},
|
253
|
+
|
254
|
+
// special colors for some of the
|
255
|
+
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
|
256
|
+
legendBackgroundColorSolid: 'rgb(35, 35, 70)',
|
257
|
+
dataLabelsColor: '#444',
|
258
|
+
textColor: '#C0C0C0',
|
259
|
+
maskColor: 'rgba(255,255,255,0.3)'
|
260
|
+
};
|
261
|
+
|
262
|
+
// Apply the theme
|
263
|
+
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|
@@ -0,0 +1,262 @@
|
|
1
|
+
/**
|
2
|
+
* Gray theme for Highcharts JS
|
3
|
+
* @author Torstein Hønsi
|
4
|
+
*/
|
5
|
+
|
6
|
+
Highcharts.theme = {
|
7
|
+
colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
|
8
|
+
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
9
|
+
chart: {
|
10
|
+
backgroundColor: {
|
11
|
+
linearGradient: [0, 0, 0, 400],
|
12
|
+
stops: [
|
13
|
+
[0, 'rgb(96, 96, 96)'],
|
14
|
+
[1, 'rgb(16, 16, 16)']
|
15
|
+
]
|
16
|
+
},
|
17
|
+
borderWidth: 0,
|
18
|
+
borderRadius: 15,
|
19
|
+
plotBackgroundColor: null,
|
20
|
+
plotShadow: false,
|
21
|
+
plotBorderWidth: 0
|
22
|
+
},
|
23
|
+
title: {
|
24
|
+
style: {
|
25
|
+
color: '#FFF',
|
26
|
+
font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
27
|
+
}
|
28
|
+
},
|
29
|
+
subtitle: {
|
30
|
+
style: {
|
31
|
+
color: '#DDD',
|
32
|
+
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
33
|
+
}
|
34
|
+
},
|
35
|
+
xAxis: {
|
36
|
+
gridLineWidth: 0,
|
37
|
+
lineColor: '#999',
|
38
|
+
tickColor: '#999',
|
39
|
+
labels: {
|
40
|
+
style: {
|
41
|
+
color: '#999',
|
42
|
+
fontWeight: 'bold'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
title: {
|
46
|
+
style: {
|
47
|
+
color: '#AAA',
|
48
|
+
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
yAxis: {
|
53
|
+
alternateGridColor: null,
|
54
|
+
minorTickInterval: null,
|
55
|
+
gridLineColor: 'rgba(255, 255, 255, .1)',
|
56
|
+
lineWidth: 0,
|
57
|
+
tickWidth: 0,
|
58
|
+
labels: {
|
59
|
+
style: {
|
60
|
+
color: '#999',
|
61
|
+
fontWeight: 'bold'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
title: {
|
65
|
+
style: {
|
66
|
+
color: '#AAA',
|
67
|
+
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
68
|
+
}
|
69
|
+
}
|
70
|
+
},
|
71
|
+
legend: {
|
72
|
+
itemStyle: {
|
73
|
+
color: '#CCC'
|
74
|
+
},
|
75
|
+
itemHoverStyle: {
|
76
|
+
color: '#FFF'
|
77
|
+
},
|
78
|
+
itemHiddenStyle: {
|
79
|
+
color: '#333'
|
80
|
+
}
|
81
|
+
},
|
82
|
+
labels: {
|
83
|
+
style: {
|
84
|
+
color: '#CCC'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
tooltip: {
|
88
|
+
backgroundColor: {
|
89
|
+
linearGradient: [0, 0, 0, 50],
|
90
|
+
stops: [
|
91
|
+
[0, 'rgba(96, 96, 96, .8)'],
|
92
|
+
[1, 'rgba(16, 16, 16, .8)']
|
93
|
+
]
|
94
|
+
},
|
95
|
+
borderWidth: 0,
|
96
|
+
style: {
|
97
|
+
color: '#FFF'
|
98
|
+
}
|
99
|
+
},
|
100
|
+
|
101
|
+
|
102
|
+
plotOptions: {
|
103
|
+
line: {
|
104
|
+
dataLabels: {
|
105
|
+
color: '#CCC'
|
106
|
+
},
|
107
|
+
marker: {
|
108
|
+
lineColor: '#333'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
spline: {
|
112
|
+
marker: {
|
113
|
+
lineColor: '#333'
|
114
|
+
}
|
115
|
+
},
|
116
|
+
scatter: {
|
117
|
+
marker: {
|
118
|
+
lineColor: '#333'
|
119
|
+
}
|
120
|
+
},
|
121
|
+
candlestick: {
|
122
|
+
lineColor: 'white'
|
123
|
+
}
|
124
|
+
},
|
125
|
+
|
126
|
+
toolbar: {
|
127
|
+
itemStyle: {
|
128
|
+
color: '#CCC'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
|
132
|
+
navigation: {
|
133
|
+
buttonOptions: {
|
134
|
+
backgroundColor: {
|
135
|
+
linearGradient: [0, 0, 0, 20],
|
136
|
+
stops: [
|
137
|
+
[0.4, '#606060'],
|
138
|
+
[0.6, '#333333']
|
139
|
+
]
|
140
|
+
},
|
141
|
+
borderColor: '#000000',
|
142
|
+
symbolStroke: '#C0C0C0',
|
143
|
+
hoverSymbolStroke: '#FFFFFF'
|
144
|
+
}
|
145
|
+
},
|
146
|
+
|
147
|
+
exporting: {
|
148
|
+
buttons: {
|
149
|
+
exportButton: {
|
150
|
+
symbolFill: '#55BE3B'
|
151
|
+
},
|
152
|
+
printButton: {
|
153
|
+
symbolFill: '#7797BE'
|
154
|
+
}
|
155
|
+
}
|
156
|
+
},
|
157
|
+
|
158
|
+
// scroll charts
|
159
|
+
rangeSelector: {
|
160
|
+
buttonTheme: {
|
161
|
+
fill: {
|
162
|
+
linearGradient: [0, 0, 0, 20],
|
163
|
+
stops: [
|
164
|
+
[0.4, '#888'],
|
165
|
+
[0.6, '#555']
|
166
|
+
]
|
167
|
+
},
|
168
|
+
stroke: '#000000',
|
169
|
+
style: {
|
170
|
+
color: '#CCC',
|
171
|
+
fontWeight: 'bold'
|
172
|
+
},
|
173
|
+
states: {
|
174
|
+
hover: {
|
175
|
+
fill: {
|
176
|
+
linearGradient: [0, 0, 0, 20],
|
177
|
+
stops: [
|
178
|
+
[0.4, '#BBB'],
|
179
|
+
[0.6, '#888']
|
180
|
+
]
|
181
|
+
},
|
182
|
+
stroke: '#000000',
|
183
|
+
style: {
|
184
|
+
color: 'white'
|
185
|
+
}
|
186
|
+
},
|
187
|
+
select: {
|
188
|
+
fill: {
|
189
|
+
linearGradient: [0, 0, 0, 20],
|
190
|
+
stops: [
|
191
|
+
[0.1, '#000'],
|
192
|
+
[0.3, '#333']
|
193
|
+
]
|
194
|
+
},
|
195
|
+
stroke: '#000000',
|
196
|
+
style: {
|
197
|
+
color: 'yellow'
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
},
|
202
|
+
inputStyle: {
|
203
|
+
backgroundColor: '#333',
|
204
|
+
color: 'silver'
|
205
|
+
},
|
206
|
+
labelStyle: {
|
207
|
+
color: 'silver'
|
208
|
+
}
|
209
|
+
},
|
210
|
+
|
211
|
+
navigator: {
|
212
|
+
handles: {
|
213
|
+
backgroundColor: '#666',
|
214
|
+
borderColor: '#AAA'
|
215
|
+
},
|
216
|
+
outlineColor: '#CCC',
|
217
|
+
maskFill: 'rgba(16, 16, 16, 0.5)',
|
218
|
+
series: {
|
219
|
+
color: '#7798BF',
|
220
|
+
lineColor: '#A6C7ED'
|
221
|
+
}
|
222
|
+
},
|
223
|
+
|
224
|
+
scrollbar: {
|
225
|
+
barBackgroundColor: {
|
226
|
+
linearGradient: [0, 0, 0, 20],
|
227
|
+
stops: [
|
228
|
+
[0.4, '#888'],
|
229
|
+
[0.6, '#555']
|
230
|
+
]
|
231
|
+
},
|
232
|
+
barBorderColor: '#CCC',
|
233
|
+
buttonArrowColor: '#CCC',
|
234
|
+
buttonBackgroundColor: {
|
235
|
+
linearGradient: [0, 0, 0, 20],
|
236
|
+
stops: [
|
237
|
+
[0.4, '#888'],
|
238
|
+
[0.6, '#555']
|
239
|
+
]
|
240
|
+
},
|
241
|
+
buttonBorderColor: '#CCC',
|
242
|
+
rifleColor: '#FFF',
|
243
|
+
trackBackgroundColor: {
|
244
|
+
linearGradient: [0, 0, 0, 10],
|
245
|
+
stops: [
|
246
|
+
[0, '#000'],
|
247
|
+
[1, '#333']
|
248
|
+
]
|
249
|
+
},
|
250
|
+
trackBorderColor: '#666'
|
251
|
+
},
|
252
|
+
|
253
|
+
// special colors for some of the demo examples
|
254
|
+
legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
|
255
|
+
legendBackgroundColorSolid: 'rgb(70, 70, 70)',
|
256
|
+
dataLabelsColor: '#444',
|
257
|
+
textColor: '#E0E0E0',
|
258
|
+
maskColor: 'rgba(255,255,255,0.3)'
|
259
|
+
};
|
260
|
+
|
261
|
+
// Apply the theme
|
262
|
+
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|