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,26 @@
|
|
1
|
+
describe("Factory Response", function() {
|
2
|
+
var service;
|
3
|
+
|
4
|
+
beforeEach(function(){
|
5
|
+
module('keysServices');
|
6
|
+
inject(function(Response){
|
7
|
+
service = Response;
|
8
|
+
});
|
9
|
+
});
|
10
|
+
|
11
|
+
describe("valid method", function(){
|
12
|
+
beforeEach(function(){
|
13
|
+
response = jasmine.createSpyObj('response', ['errors']);
|
14
|
+
});
|
15
|
+
|
16
|
+
it("tells if a response is valid", function(){
|
17
|
+
response.errors.andReturn('undefined');
|
18
|
+
expect(service.valid(response)).toBeFalsy;
|
19
|
+
});
|
20
|
+
|
21
|
+
it("tells if a response isn't valid", function(){
|
22
|
+
response.errors.andReturn('xpto');
|
23
|
+
expect(service.valid(response)).toBeTruthy;
|
24
|
+
});
|
25
|
+
});
|
26
|
+
});
|