memcached-manager 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/.travis.yml +19 -0
- data/Gemfile +24 -0
- data/Gemfile.lock +133 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +72 -0
- data/Rakefile +57 -0
- data/VERSION +1 -0
- data/config.ru +8 -0
- data/features/api/create_memcached_key.feature +6 -0
- data/features/api/delete_memcached_key.feature +6 -0
- data/features/api/list_memcached_keys.feature +6 -0
- data/features/api/set_memcached_info.feature +5 -0
- data/features/api/show_memcached_key.feature +10 -0
- data/features/api/show_memcached_stats.feature +5 -0
- data/features/api/update_memcached_key.feature +7 -0
- data/features/step_definitions/api/create_memcached_key.rb +21 -0
- data/features/step_definitions/api/delete_memcached_key.rb +7 -0
- data/features/step_definitions/api/list_memcached_keys.rb +16 -0
- data/features/step_definitions/api/show_memcached_key.rb +18 -0
- data/features/step_definitions/api/show_memcached_stats.rb +3 -0
- data/features/step_definitions/api/update_memcached_key.rb +18 -0
- data/features/step_definitions/set_memcached_info.rb +25 -0
- data/features/step_definitions/webapp/create_memcached_key.rb +10 -0
- data/features/step_definitions/webapp/delete_memcached_key.rb +16 -0
- data/features/step_definitions/webapp/edit_memcached_key.rb +3 -0
- data/features/step_definitions/webapp/list_memcached_keys.rb +4 -0
- data/features/step_definitions/webapp/show_memcached_key.rb +4 -0
- data/features/step_definitions/webapp/show_memcached_stats.rb +5 -0
- data/features/support/env.rb +27 -0
- data/features/support/hooks.rb +3 -0
- data/features/webapp/create_memcached_key.feature +9 -0
- data/features/webapp/delete_memcached_key.feature +8 -0
- data/features/webapp/edit_memcached_key.feature +9 -0
- data/features/webapp/list_memcached_keys.feature +8 -0
- data/features/webapp/show_memcached_key.feature +7 -0
- data/features/webapp/show_memcached_stats.feature +6 -0
- data/lib/api.rb +85 -0
- data/lib/extensions/api_response.rb +15 -0
- data/lib/extensions/errors.rb +19 -0
- data/lib/extensions/memcached_connection.rb +15 -0
- data/lib/extensions/memcached_inspector.rb +49 -0
- data/lib/extensions/memcached_settings.rb +18 -0
- data/lib/extensions.rb +14 -0
- data/lib/public/images/glyphicons-halflings-white.png +0 -0
- data/lib/public/images/glyphicons-halflings.png +0 -0
- data/lib/public/javascripts/angular/controllers.js +86 -0
- data/lib/public/javascripts/angular/routes.js +66 -0
- data/lib/public/javascripts/angular/services/notification.js +16 -0
- data/lib/public/javascripts/angular/services/resources.js +20 -0
- data/lib/public/javascripts/angular/services/response.js +10 -0
- data/lib/public/javascripts/angular-resource.min.js +10 -0
- data/lib/public/javascripts/angular-ui-states.min.js +7 -0
- data/lib/public/javascripts/angular.min.js +161 -0
- data/lib/public/javascripts/application.js +18 -0
- data/lib/public/javascripts/jquery-1.9.1.min.js +5 -0
- data/lib/public/javascripts/noty/jquery.noty.js +547 -0
- data/lib/public/javascripts/noty/layouts/top.js +34 -0
- data/lib/public/javascripts/noty/themes/default.js +156 -0
- data/lib/public/javascripts/noty_config.js +25 -0
- data/lib/public/stylesheets/app.css +50 -0
- data/lib/public/stylesheets/base.css +269 -0
- data/lib/public/stylesheets/icons.css +492 -0
- data/lib/public/stylesheets/layout.css +58 -0
- data/lib/public/stylesheets/skeleton.css +242 -0
- data/lib/public/templates/edit.html.erb +6 -0
- data/lib/public/templates/keys.html.erb +36 -0
- data/lib/public/templates/new.html.erb +6 -0
- data/lib/public/templates/show.html.erb +2 -0
- data/lib/public/templates/stats.html.erb +8 -0
- data/lib/views/index.erb +13 -0
- data/lib/views/layout.erb +52 -0
- data/lib/webapp.rb +14 -0
- data/memcached-manager.gemspec +145 -0
- data/spec/javascripts/angular/controllers/list_keys_controller_spec.js +26 -0
- data/spec/javascripts/angular/services/notification_spec.js +45 -0
- data/spec/javascripts/angular/services/resource_spec.js +41 -0
- data/spec/javascripts/angular/services/response_spec.js +26 -0
- data/spec/javascripts/helpers/SpecHelper.js +2 -0
- data/spec/javascripts/helpers/angular-mocks.js +1962 -0
- data/spec/javascripts/support/jasmine.yml +96 -0
- data/spec/javascripts/support/jasmine_helper.rb +11 -0
- data/spec/lib/extensions/api_response_spec.rb +28 -0
- data/spec/lib/extensions/error_spec.rb +23 -0
- data/spec/lib/extensions/memcached_connection_spec.rb +25 -0
- data/spec/lib/extensions/memcached_inspector_spec.rb +41 -0
- data/spec/lib/extensions/memcached_settings_spec.rb +53 -0
- data/spec/spec_helper.rb +41 -0
- metadata +252 -0
@@ -0,0 +1,242 @@
|
|
1
|
+
/*
|
2
|
+
* Skeleton V1.2
|
3
|
+
* Copyright 2011, Dave Gamache
|
4
|
+
* www.getskeleton.com
|
5
|
+
* Free to use under the MIT license.
|
6
|
+
* http://www.opensource.org/licenses/mit-license.php
|
7
|
+
* 6/20/2012
|
8
|
+
*/
|
9
|
+
|
10
|
+
|
11
|
+
/* Table of Contents
|
12
|
+
==================================================
|
13
|
+
#Base 960 Grid
|
14
|
+
#Tablet (Portrait)
|
15
|
+
#Mobile (Portrait)
|
16
|
+
#Mobile (Landscape)
|
17
|
+
#Clearing */
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
/* #Base 960 Grid
|
22
|
+
================================================== */
|
23
|
+
|
24
|
+
.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
|
25
|
+
.container .column,
|
26
|
+
.container .columns { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
|
27
|
+
.row { margin-bottom: 20px; }
|
28
|
+
|
29
|
+
/* Nested Column Classes */
|
30
|
+
.column.alpha, .columns.alpha { margin-left: 0; }
|
31
|
+
.column.omega, .columns.omega { margin-right: 0; }
|
32
|
+
|
33
|
+
/* Base Grid */
|
34
|
+
.container .one.column,
|
35
|
+
.container .one.columns { width: 40px; }
|
36
|
+
.container .two.columns { width: 100px; }
|
37
|
+
.container .three.columns { width: 160px; }
|
38
|
+
.container .four.columns { width: 220px; }
|
39
|
+
.container .five.columns { width: 280px; }
|
40
|
+
.container .six.columns { width: 340px; }
|
41
|
+
.container .seven.columns { width: 400px; }
|
42
|
+
.container .eight.columns { width: 460px; }
|
43
|
+
.container .nine.columns { width: 520px; }
|
44
|
+
.container .ten.columns { width: 580px; }
|
45
|
+
.container .eleven.columns { width: 640px; }
|
46
|
+
.container .twelve.columns { width: 700px; }
|
47
|
+
.container .thirteen.columns { width: 760px; }
|
48
|
+
.container .fourteen.columns { width: 820px; }
|
49
|
+
.container .fifteen.columns { width: 880px; }
|
50
|
+
.container .sixteen.columns { width: 940px; }
|
51
|
+
|
52
|
+
.container .one-third.column { width: 300px; }
|
53
|
+
.container .two-thirds.column { width: 620px; }
|
54
|
+
|
55
|
+
/* Offsets */
|
56
|
+
.container .offset-by-one { padding-left: 60px; }
|
57
|
+
.container .offset-by-two { padding-left: 120px; }
|
58
|
+
.container .offset-by-three { padding-left: 180px; }
|
59
|
+
.container .offset-by-four { padding-left: 240px; }
|
60
|
+
.container .offset-by-five { padding-left: 300px; }
|
61
|
+
.container .offset-by-six { padding-left: 360px; }
|
62
|
+
.container .offset-by-seven { padding-left: 420px; }
|
63
|
+
.container .offset-by-eight { padding-left: 480px; }
|
64
|
+
.container .offset-by-nine { padding-left: 540px; }
|
65
|
+
.container .offset-by-ten { padding-left: 600px; }
|
66
|
+
.container .offset-by-eleven { padding-left: 660px; }
|
67
|
+
.container .offset-by-twelve { padding-left: 720px; }
|
68
|
+
.container .offset-by-thirteen { padding-left: 780px; }
|
69
|
+
.container .offset-by-fourteen { padding-left: 840px; }
|
70
|
+
.container .offset-by-fifteen { padding-left: 900px; }
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
/* #Tablet (Portrait)
|
75
|
+
================================================== */
|
76
|
+
|
77
|
+
/* Note: Design for a width of 768px */
|
78
|
+
|
79
|
+
@media only screen and (min-width: 768px) and (max-width: 959px) {
|
80
|
+
.container { width: 768px; }
|
81
|
+
.container .column,
|
82
|
+
.container .columns { margin-left: 10px; margin-right: 10px; }
|
83
|
+
.column.alpha, .columns.alpha { margin-left: 0; margin-right: 10px; }
|
84
|
+
.column.omega, .columns.omega { margin-right: 0; margin-left: 10px; }
|
85
|
+
.alpha.omega { margin-left: 0; margin-right: 0; }
|
86
|
+
|
87
|
+
.container .one.column,
|
88
|
+
.container .one.columns { width: 28px; }
|
89
|
+
.container .two.columns { width: 76px; }
|
90
|
+
.container .three.columns { width: 124px; }
|
91
|
+
.container .four.columns { width: 172px; }
|
92
|
+
.container .five.columns { width: 220px; }
|
93
|
+
.container .six.columns { width: 268px; }
|
94
|
+
.container .seven.columns { width: 316px; }
|
95
|
+
.container .eight.columns { width: 364px; }
|
96
|
+
.container .nine.columns { width: 412px; }
|
97
|
+
.container .ten.columns { width: 460px; }
|
98
|
+
.container .eleven.columns { width: 508px; }
|
99
|
+
.container .twelve.columns { width: 556px; }
|
100
|
+
.container .thirteen.columns { width: 604px; }
|
101
|
+
.container .fourteen.columns { width: 652px; }
|
102
|
+
.container .fifteen.columns { width: 700px; }
|
103
|
+
.container .sixteen.columns { width: 748px; }
|
104
|
+
|
105
|
+
.container .one-third.column { width: 236px; }
|
106
|
+
.container .two-thirds.column { width: 492px; }
|
107
|
+
|
108
|
+
/* Offsets */
|
109
|
+
.container .offset-by-one { padding-left: 48px; }
|
110
|
+
.container .offset-by-two { padding-left: 96px; }
|
111
|
+
.container .offset-by-three { padding-left: 144px; }
|
112
|
+
.container .offset-by-four { padding-left: 192px; }
|
113
|
+
.container .offset-by-five { padding-left: 240px; }
|
114
|
+
.container .offset-by-six { padding-left: 288px; }
|
115
|
+
.container .offset-by-seven { padding-left: 336px; }
|
116
|
+
.container .offset-by-eight { padding-left: 384px; }
|
117
|
+
.container .offset-by-nine { padding-left: 432px; }
|
118
|
+
.container .offset-by-ten { padding-left: 480px; }
|
119
|
+
.container .offset-by-eleven { padding-left: 528px; }
|
120
|
+
.container .offset-by-twelve { padding-left: 576px; }
|
121
|
+
.container .offset-by-thirteen { padding-left: 624px; }
|
122
|
+
.container .offset-by-fourteen { padding-left: 672px; }
|
123
|
+
.container .offset-by-fifteen { padding-left: 720px; }
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
/* #Mobile (Portrait)
|
128
|
+
================================================== */
|
129
|
+
|
130
|
+
/* Note: Design for a width of 320px */
|
131
|
+
|
132
|
+
@media only screen and (max-width: 767px) {
|
133
|
+
.container { width: 300px; }
|
134
|
+
.container .columns,
|
135
|
+
.container .column { margin: 0; }
|
136
|
+
|
137
|
+
.container .one.column,
|
138
|
+
.container .one.columns,
|
139
|
+
.container .two.columns,
|
140
|
+
.container .three.columns,
|
141
|
+
.container .four.columns,
|
142
|
+
.container .five.columns,
|
143
|
+
.container .six.columns,
|
144
|
+
.container .seven.columns,
|
145
|
+
.container .eight.columns,
|
146
|
+
.container .nine.columns,
|
147
|
+
.container .ten.columns,
|
148
|
+
.container .eleven.columns,
|
149
|
+
.container .twelve.columns,
|
150
|
+
.container .thirteen.columns,
|
151
|
+
.container .fourteen.columns,
|
152
|
+
.container .fifteen.columns,
|
153
|
+
.container .sixteen.columns,
|
154
|
+
.container .one-third.column,
|
155
|
+
.container .two-thirds.column { width: 300px; }
|
156
|
+
|
157
|
+
/* Offsets */
|
158
|
+
.container .offset-by-one,
|
159
|
+
.container .offset-by-two,
|
160
|
+
.container .offset-by-three,
|
161
|
+
.container .offset-by-four,
|
162
|
+
.container .offset-by-five,
|
163
|
+
.container .offset-by-six,
|
164
|
+
.container .offset-by-seven,
|
165
|
+
.container .offset-by-eight,
|
166
|
+
.container .offset-by-nine,
|
167
|
+
.container .offset-by-ten,
|
168
|
+
.container .offset-by-eleven,
|
169
|
+
.container .offset-by-twelve,
|
170
|
+
.container .offset-by-thirteen,
|
171
|
+
.container .offset-by-fourteen,
|
172
|
+
.container .offset-by-fifteen { padding-left: 0; }
|
173
|
+
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
/* #Mobile (Landscape)
|
178
|
+
================================================== */
|
179
|
+
|
180
|
+
/* Note: Design for a width of 480px */
|
181
|
+
|
182
|
+
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
183
|
+
.container { width: 420px; }
|
184
|
+
.container .columns,
|
185
|
+
.container .column { margin: 0; }
|
186
|
+
|
187
|
+
.container .one.column,
|
188
|
+
.container .one.columns,
|
189
|
+
.container .two.columns,
|
190
|
+
.container .three.columns,
|
191
|
+
.container .four.columns,
|
192
|
+
.container .five.columns,
|
193
|
+
.container .six.columns,
|
194
|
+
.container .seven.columns,
|
195
|
+
.container .eight.columns,
|
196
|
+
.container .nine.columns,
|
197
|
+
.container .ten.columns,
|
198
|
+
.container .eleven.columns,
|
199
|
+
.container .twelve.columns,
|
200
|
+
.container .thirteen.columns,
|
201
|
+
.container .fourteen.columns,
|
202
|
+
.container .fifteen.columns,
|
203
|
+
.container .sixteen.columns,
|
204
|
+
.container .one-third.column,
|
205
|
+
.container .two-thirds.column { width: 420px; }
|
206
|
+
}
|
207
|
+
|
208
|
+
|
209
|
+
/* #Clearing
|
210
|
+
================================================== */
|
211
|
+
|
212
|
+
/* Self Clearing Goodness */
|
213
|
+
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
|
214
|
+
|
215
|
+
/* Use clearfix class on parent to clear nested columns,
|
216
|
+
or wrap each row of columns in a <div class="row"> */
|
217
|
+
.clearfix:before,
|
218
|
+
.clearfix:after,
|
219
|
+
.row:before,
|
220
|
+
.row:after {
|
221
|
+
content: '\0020';
|
222
|
+
display: block;
|
223
|
+
overflow: hidden;
|
224
|
+
visibility: hidden;
|
225
|
+
width: 0;
|
226
|
+
height: 0; }
|
227
|
+
.row:after,
|
228
|
+
.clearfix:after {
|
229
|
+
clear: both; }
|
230
|
+
.row,
|
231
|
+
.clearfix {
|
232
|
+
zoom: 1; }
|
233
|
+
|
234
|
+
/* You can also use a <br class="clear" /> to clear columns */
|
235
|
+
.clear {
|
236
|
+
clear: both;
|
237
|
+
display: block;
|
238
|
+
overflow: hidden;
|
239
|
+
visibility: hidden;
|
240
|
+
width: 0;
|
241
|
+
height: 0;
|
242
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<section>
|
2
|
+
<h3>memcached manager</h3>
|
3
|
+
<hr>
|
4
|
+
<section id="key-menu">
|
5
|
+
<div id="key-text">
|
6
|
+
<h3>keys</h3>
|
7
|
+
</div><!-- key-text -->
|
8
|
+
|
9
|
+
<div id="key-new">
|
10
|
+
<a href="#/new" class="button">New key</a><!-- button -->
|
11
|
+
</div>
|
12
|
+
</section>
|
13
|
+
|
14
|
+
<div class="clear"></div>
|
15
|
+
|
16
|
+
<section id="key-keys">
|
17
|
+
<ul>
|
18
|
+
<li ng-repeat='key in keys' class="key">
|
19
|
+
<div class="key-info">
|
20
|
+
<div class="key-header">
|
21
|
+
<a class="key-title" href="#/key/{{ key.key }}">{{ key.key }}</a><!-- key-title -->
|
22
|
+
</div><!-- key-header -->
|
23
|
+
<div id="key-data">
|
24
|
+
Size: {{ key.bytes }}B
|
25
|
+
</div><!-- key-data -->
|
26
|
+
</div><!-- key-info -->
|
27
|
+
|
28
|
+
<div class="key-actions">
|
29
|
+
<a ng-click="removeKey(key)" class="icon-remove pointer" ng-controller="DeleteKeyController"></a>
|
30
|
+
<a href="#/edit/{{ key.key }}" class="icon-pencil"></a>
|
31
|
+
</div><!-- key-actions -->
|
32
|
+
</li><!-- key -->
|
33
|
+
</ul>
|
34
|
+
</section><!-- key-menu -->
|
35
|
+
<div class="clear"></div>
|
36
|
+
</section>
|
data/lib/views/index.erb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="container">
|
2
|
+
<div class="sixteen columns" style="margin-top: 40px;">
|
3
|
+
</div><!-- sixteen column -->
|
4
|
+
<div class="one-third column">
|
5
|
+
<div ui-view="keys"></div>
|
6
|
+
</div><!-- two-third column -->
|
7
|
+
<div class="two-third column">
|
8
|
+
<div ui-view="key"></div>
|
9
|
+
</div><!-- two-third column -->
|
10
|
+
</div><!-- container -->
|
11
|
+
|
12
|
+
<!-- This controller is used to bootstrap the application -->
|
13
|
+
<section ng-controller='BootstrapController'></section>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
|
3
|
+
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
|
4
|
+
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
|
5
|
+
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en" ng-app="memcached-keys"> <!--<![endif]-->
|
6
|
+
<head>
|
7
|
+
|
8
|
+
<!-- Basic Page Needs
|
9
|
+
================================================== -->
|
10
|
+
<meta charset="utf-8">
|
11
|
+
<title>Memcached Manager</title>
|
12
|
+
<meta name="description" content="The ultimate memcached manager.">
|
13
|
+
|
14
|
+
<!-- Mobile Specific Metas
|
15
|
+
================================================== -->
|
16
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
17
|
+
|
18
|
+
<!-- CSS
|
19
|
+
================================================== -->
|
20
|
+
<link rel="stylesheet" href="stylesheets/base.css">
|
21
|
+
<link rel="stylesheet" href="stylesheets/skeleton.css">
|
22
|
+
<link rel="stylesheet" href="stylesheets/layout.css">
|
23
|
+
<link rel="stylesheet" href="stylesheets/layout.css">
|
24
|
+
<link rel="stylesheet" href="stylesheets/icons.css">
|
25
|
+
<link rel="stylesheet" href="stylesheets/app.css">
|
26
|
+
|
27
|
+
<!--[if lt IE 9]>
|
28
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
29
|
+
<![endif]-->
|
30
|
+
|
31
|
+
<!-- Favicons
|
32
|
+
================================================== -->
|
33
|
+
<link rel="shortcut icon" href="images/favicon.ico">
|
34
|
+
</head>
|
35
|
+
<body>
|
36
|
+
<%= yield %>
|
37
|
+
<script type='text/javascript' src='/javascripts/jquery-1.9.1.min.js'></script>
|
38
|
+
<script type='text/javascript' src='/javascripts/angular.min.js'></script>
|
39
|
+
<script type='text/javascript' src='/javascripts/angular-resource.min.js'></script>
|
40
|
+
<script type='text/javascript' src='/javascripts/angular-ui-states.min.js'></script>
|
41
|
+
<script type='text/javascript' src='/javascripts/application.js'></script>
|
42
|
+
<script type='text/javascript' src='/javascripts/angular/routes.js'></script>
|
43
|
+
<script type='text/javascript' src='/javascripts/angular/controllers.js'></script>
|
44
|
+
<script type='text/javascript' src='/javascripts/angular/services/notification.js'></script>
|
45
|
+
<script type='text/javascript' src='/javascripts/angular/services/response.js'></script>
|
46
|
+
<script type='text/javascript' src='/javascripts/angular/services/resources.js'></script>
|
47
|
+
<script type='text/javascript' src='/javascripts/noty/jquery.noty.js'></script>
|
48
|
+
<script type='text/javascript' src='/javascripts/noty/layouts/top.js'></script>
|
49
|
+
<script type='text/javascript' src='/javascripts/noty/themes/default.js'></script>
|
50
|
+
<script type='text/javascript' src='/javascripts/noty_config.js'></script>
|
51
|
+
</body>
|
52
|
+
</html>
|
data/lib/webapp.rb
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "memcached-manager"
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Thiago Fernandes Massa"]
|
12
|
+
s.date = "2013-10-15"
|
13
|
+
s.description = "A sinatra memcached-manager that allows you to view status, flush/view keys and so on. Also easily pluggable to a Rails app."
|
14
|
+
s.email = "thiagown@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".rspec",
|
21
|
+
".travis.yml",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"config.ru",
|
29
|
+
"features/api/create_memcached_key.feature",
|
30
|
+
"features/api/delete_memcached_key.feature",
|
31
|
+
"features/api/list_memcached_keys.feature",
|
32
|
+
"features/api/set_memcached_info.feature",
|
33
|
+
"features/api/show_memcached_key.feature",
|
34
|
+
"features/api/show_memcached_stats.feature",
|
35
|
+
"features/api/update_memcached_key.feature",
|
36
|
+
"features/step_definitions/api/create_memcached_key.rb",
|
37
|
+
"features/step_definitions/api/delete_memcached_key.rb",
|
38
|
+
"features/step_definitions/api/list_memcached_keys.rb",
|
39
|
+
"features/step_definitions/api/show_memcached_key.rb",
|
40
|
+
"features/step_definitions/api/show_memcached_stats.rb",
|
41
|
+
"features/step_definitions/api/update_memcached_key.rb",
|
42
|
+
"features/step_definitions/set_memcached_info.rb",
|
43
|
+
"features/step_definitions/webapp/create_memcached_key.rb",
|
44
|
+
"features/step_definitions/webapp/delete_memcached_key.rb",
|
45
|
+
"features/step_definitions/webapp/edit_memcached_key.rb",
|
46
|
+
"features/step_definitions/webapp/list_memcached_keys.rb",
|
47
|
+
"features/step_definitions/webapp/show_memcached_key.rb",
|
48
|
+
"features/step_definitions/webapp/show_memcached_stats.rb",
|
49
|
+
"features/support/env.rb",
|
50
|
+
"features/support/hooks.rb",
|
51
|
+
"features/webapp/create_memcached_key.feature",
|
52
|
+
"features/webapp/delete_memcached_key.feature",
|
53
|
+
"features/webapp/edit_memcached_key.feature",
|
54
|
+
"features/webapp/list_memcached_keys.feature",
|
55
|
+
"features/webapp/show_memcached_key.feature",
|
56
|
+
"features/webapp/show_memcached_stats.feature",
|
57
|
+
"lib/api.rb",
|
58
|
+
"lib/extensions.rb",
|
59
|
+
"lib/extensions/api_response.rb",
|
60
|
+
"lib/extensions/errors.rb",
|
61
|
+
"lib/extensions/memcached_connection.rb",
|
62
|
+
"lib/extensions/memcached_inspector.rb",
|
63
|
+
"lib/extensions/memcached_settings.rb",
|
64
|
+
"lib/public/images/glyphicons-halflings-white.png",
|
65
|
+
"lib/public/images/glyphicons-halflings.png",
|
66
|
+
"lib/public/javascripts/angular-resource.min.js",
|
67
|
+
"lib/public/javascripts/angular-ui-states.min.js",
|
68
|
+
"lib/public/javascripts/angular.min.js",
|
69
|
+
"lib/public/javascripts/angular/controllers.js",
|
70
|
+
"lib/public/javascripts/angular/routes.js",
|
71
|
+
"lib/public/javascripts/angular/services/notification.js",
|
72
|
+
"lib/public/javascripts/angular/services/resources.js",
|
73
|
+
"lib/public/javascripts/angular/services/response.js",
|
74
|
+
"lib/public/javascripts/application.js",
|
75
|
+
"lib/public/javascripts/jquery-1.9.1.min.js",
|
76
|
+
"lib/public/javascripts/noty/jquery.noty.js",
|
77
|
+
"lib/public/javascripts/noty/layouts/top.js",
|
78
|
+
"lib/public/javascripts/noty/themes/default.js",
|
79
|
+
"lib/public/javascripts/noty_config.js",
|
80
|
+
"lib/public/stylesheets/app.css",
|
81
|
+
"lib/public/stylesheets/base.css",
|
82
|
+
"lib/public/stylesheets/icons.css",
|
83
|
+
"lib/public/stylesheets/layout.css",
|
84
|
+
"lib/public/stylesheets/skeleton.css",
|
85
|
+
"lib/public/templates/edit.html.erb",
|
86
|
+
"lib/public/templates/keys.html.erb",
|
87
|
+
"lib/public/templates/new.html.erb",
|
88
|
+
"lib/public/templates/show.html.erb",
|
89
|
+
"lib/public/templates/stats.html.erb",
|
90
|
+
"lib/views/index.erb",
|
91
|
+
"lib/views/layout.erb",
|
92
|
+
"lib/webapp.rb",
|
93
|
+
"memcached-manager.gemspec",
|
94
|
+
"spec/javascripts/angular/controllers/list_keys_controller_spec.js",
|
95
|
+
"spec/javascripts/angular/services/notification_spec.js",
|
96
|
+
"spec/javascripts/angular/services/resource_spec.js",
|
97
|
+
"spec/javascripts/angular/services/response_spec.js",
|
98
|
+
"spec/javascripts/helpers/SpecHelper.js",
|
99
|
+
"spec/javascripts/helpers/angular-mocks.js",
|
100
|
+
"spec/javascripts/support/jasmine.yml",
|
101
|
+
"spec/javascripts/support/jasmine_helper.rb",
|
102
|
+
"spec/lib/extensions/api_response_spec.rb",
|
103
|
+
"spec/lib/extensions/error_spec.rb",
|
104
|
+
"spec/lib/extensions/memcached_connection_spec.rb",
|
105
|
+
"spec/lib/extensions/memcached_inspector_spec.rb",
|
106
|
+
"spec/lib/extensions/memcached_settings_spec.rb",
|
107
|
+
"spec/spec_helper.rb"
|
108
|
+
]
|
109
|
+
s.homepage = "http://github.com/thiagofm/memcached-manager"
|
110
|
+
s.licenses = ["MIT"]
|
111
|
+
s.require_paths = ["lib"]
|
112
|
+
s.rubygems_version = "1.8.23"
|
113
|
+
s.summary = "A sinatra memcached-manager that allows you to view status, flush/view keys and so on. Also easily pluggable to a Rails app."
|
114
|
+
|
115
|
+
if s.respond_to? :specification_version then
|
116
|
+
s.specification_version = 3
|
117
|
+
|
118
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
119
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0"])
|
120
|
+
s.add_runtime_dependency(%q<sinatra-contrib>, [">= 0"])
|
121
|
+
s.add_runtime_dependency(%q<dalli>, [">= 0"])
|
122
|
+
s.add_runtime_dependency(%q<poltergeist>, [">= 0"])
|
123
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.8"])
|
124
|
+
s.add_development_dependency(%q<jasmine>, ["= 1.3.2"])
|
125
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
126
|
+
else
|
127
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
128
|
+
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
129
|
+
s.add_dependency(%q<dalli>, [">= 0"])
|
130
|
+
s.add_dependency(%q<poltergeist>, [">= 0"])
|
131
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.8"])
|
132
|
+
s.add_dependency(%q<jasmine>, ["= 1.3.2"])
|
133
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
134
|
+
end
|
135
|
+
else
|
136
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
137
|
+
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
138
|
+
s.add_dependency(%q<dalli>, [">= 0"])
|
139
|
+
s.add_dependency(%q<poltergeist>, [">= 0"])
|
140
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.8"])
|
141
|
+
s.add_dependency(%q<jasmine>, ["= 1.3.2"])
|
142
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
describe('ListKeysController', function(){
|
2
|
+
describe('keys', function(){
|
3
|
+
var scope;
|
4
|
+
|
5
|
+
// mocking keys resource to return []
|
6
|
+
var keysResource = {
|
7
|
+
get: function(){
|
8
|
+
return [];
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
beforeEach(module('memcached-keys'));
|
13
|
+
|
14
|
+
beforeEach(inject(function($rootScope, $controller){
|
15
|
+
scope = $rootScope.$new();
|
16
|
+
ctrl = $controller('ListKeysController', {
|
17
|
+
$scope: scope,
|
18
|
+
Keys: keysResource
|
19
|
+
});
|
20
|
+
}));
|
21
|
+
|
22
|
+
it('sets up the keys attribute with Keys resource call', function(){
|
23
|
+
expect(scope.keys).toEqual([]);
|
24
|
+
});
|
25
|
+
});
|
26
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
describe("Factory Notification", function() {
|
2
|
+
var service;
|
3
|
+
var message;
|
4
|
+
|
5
|
+
beforeEach(function(){
|
6
|
+
module('keysServices');
|
7
|
+
inject(function(Notification){
|
8
|
+
service = Notification;
|
9
|
+
});
|
10
|
+
message = "Some random message";
|
11
|
+
});
|
12
|
+
|
13
|
+
describe("alert method", function(){
|
14
|
+
it("notificates the user with an alert", function(){
|
15
|
+
noty = jasmine.createSpy('noty');
|
16
|
+
service.alert(message);
|
17
|
+
expect(noty).toHaveBeenCalledWith({text: message, type: 'alert'});
|
18
|
+
});
|
19
|
+
});
|
20
|
+
|
21
|
+
describe("error method", function(){
|
22
|
+
it("notificates the user with an error", function(){
|
23
|
+
noty = jasmine.createSpy('noty');
|
24
|
+
service.error(message);
|
25
|
+
expect(noty).toHaveBeenCalledWith({text: message, type: 'error'});
|
26
|
+
});
|
27
|
+
});
|
28
|
+
|
29
|
+
describe("info method", function(){
|
30
|
+
it("notificates the user with an info", function(){
|
31
|
+
noty = jasmine.createSpy('noty');
|
32
|
+
service.info(message);
|
33
|
+
expect(noty).toHaveBeenCalledWith({text: message, type: 'information'});
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
describe("success method", function(){
|
38
|
+
it("notificates the user with as success", function(){
|
39
|
+
noty = jasmine.createSpy('noty');
|
40
|
+
service.success(message);
|
41
|
+
expect(noty).toHaveBeenCalledWith({text: message, type: 'success'});
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
45
|
+
});
|
@@ -0,0 +1,41 @@
|
|
1
|
+
describe("Factory Resource", function() {
|
2
|
+
var $httpBackend;
|
3
|
+
|
4
|
+
beforeEach(function(){
|
5
|
+
module('keysServices');
|
6
|
+
module('ngResource');
|
7
|
+
inject(function($injector){
|
8
|
+
$httpBackend = $injector.get('$httpBackend');
|
9
|
+
});
|
10
|
+
});
|
11
|
+
|
12
|
+
it("requests a bunch of keys correctly", inject(function(Keys){
|
13
|
+
$httpBackend.expectGET('/api/keys.json').respond([]);
|
14
|
+
Keys.get();
|
15
|
+
}));
|
16
|
+
|
17
|
+
it("requests the save of a key correctly", inject(function(Keys){
|
18
|
+
$httpBackend.expectPOST('/api/keys.json').respond([]);
|
19
|
+
Keys.save({});
|
20
|
+
}));
|
21
|
+
|
22
|
+
it("requests the update of key correctly", inject(function(Keys){
|
23
|
+
$httpBackend.expectPUT('/api/keys.json').respond([]);
|
24
|
+
Keys.update({});
|
25
|
+
}));
|
26
|
+
|
27
|
+
it("requests the find of a key correctly", inject(function(Key){
|
28
|
+
$httpBackend.expectGET('/api/keys/xpto.json').respond([]);
|
29
|
+
Key.find({key: 'xpto'});
|
30
|
+
}));
|
31
|
+
|
32
|
+
it("requests the delete of a key correctly", inject(function(Key){
|
33
|
+
$httpBackend.expectDELETE('/api/keys/xpto.json').respond([]);
|
34
|
+
Key.delete({key: 'xpto'});
|
35
|
+
}));
|
36
|
+
|
37
|
+
it("requests the stats correctly", inject(function(Stats){
|
38
|
+
$httpBackend.expectGET('/api/stats.json').respond([]);
|
39
|
+
Stats.all();
|
40
|
+
}));
|
41
|
+
});
|