memcached-manager 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/.rspec +2 -0
  2. data/.travis.yml +19 -0
  3. data/Gemfile +24 -0
  4. data/Gemfile.lock +133 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.rdoc +72 -0
  7. data/Rakefile +57 -0
  8. data/VERSION +1 -0
  9. data/config.ru +8 -0
  10. data/features/api/create_memcached_key.feature +6 -0
  11. data/features/api/delete_memcached_key.feature +6 -0
  12. data/features/api/list_memcached_keys.feature +6 -0
  13. data/features/api/set_memcached_info.feature +5 -0
  14. data/features/api/show_memcached_key.feature +10 -0
  15. data/features/api/show_memcached_stats.feature +5 -0
  16. data/features/api/update_memcached_key.feature +7 -0
  17. data/features/step_definitions/api/create_memcached_key.rb +21 -0
  18. data/features/step_definitions/api/delete_memcached_key.rb +7 -0
  19. data/features/step_definitions/api/list_memcached_keys.rb +16 -0
  20. data/features/step_definitions/api/show_memcached_key.rb +18 -0
  21. data/features/step_definitions/api/show_memcached_stats.rb +3 -0
  22. data/features/step_definitions/api/update_memcached_key.rb +18 -0
  23. data/features/step_definitions/set_memcached_info.rb +25 -0
  24. data/features/step_definitions/webapp/create_memcached_key.rb +10 -0
  25. data/features/step_definitions/webapp/delete_memcached_key.rb +16 -0
  26. data/features/step_definitions/webapp/edit_memcached_key.rb +3 -0
  27. data/features/step_definitions/webapp/list_memcached_keys.rb +4 -0
  28. data/features/step_definitions/webapp/show_memcached_key.rb +4 -0
  29. data/features/step_definitions/webapp/show_memcached_stats.rb +5 -0
  30. data/features/support/env.rb +27 -0
  31. data/features/support/hooks.rb +3 -0
  32. data/features/webapp/create_memcached_key.feature +9 -0
  33. data/features/webapp/delete_memcached_key.feature +8 -0
  34. data/features/webapp/edit_memcached_key.feature +9 -0
  35. data/features/webapp/list_memcached_keys.feature +8 -0
  36. data/features/webapp/show_memcached_key.feature +7 -0
  37. data/features/webapp/show_memcached_stats.feature +6 -0
  38. data/lib/api.rb +85 -0
  39. data/lib/extensions/api_response.rb +15 -0
  40. data/lib/extensions/errors.rb +19 -0
  41. data/lib/extensions/memcached_connection.rb +15 -0
  42. data/lib/extensions/memcached_inspector.rb +49 -0
  43. data/lib/extensions/memcached_settings.rb +18 -0
  44. data/lib/extensions.rb +14 -0
  45. data/lib/public/images/glyphicons-halflings-white.png +0 -0
  46. data/lib/public/images/glyphicons-halflings.png +0 -0
  47. data/lib/public/javascripts/angular/controllers.js +86 -0
  48. data/lib/public/javascripts/angular/routes.js +66 -0
  49. data/lib/public/javascripts/angular/services/notification.js +16 -0
  50. data/lib/public/javascripts/angular/services/resources.js +20 -0
  51. data/lib/public/javascripts/angular/services/response.js +10 -0
  52. data/lib/public/javascripts/angular-resource.min.js +10 -0
  53. data/lib/public/javascripts/angular-ui-states.min.js +7 -0
  54. data/lib/public/javascripts/angular.min.js +161 -0
  55. data/lib/public/javascripts/application.js +18 -0
  56. data/lib/public/javascripts/jquery-1.9.1.min.js +5 -0
  57. data/lib/public/javascripts/noty/jquery.noty.js +547 -0
  58. data/lib/public/javascripts/noty/layouts/top.js +34 -0
  59. data/lib/public/javascripts/noty/themes/default.js +156 -0
  60. data/lib/public/javascripts/noty_config.js +25 -0
  61. data/lib/public/stylesheets/app.css +50 -0
  62. data/lib/public/stylesheets/base.css +269 -0
  63. data/lib/public/stylesheets/icons.css +492 -0
  64. data/lib/public/stylesheets/layout.css +58 -0
  65. data/lib/public/stylesheets/skeleton.css +242 -0
  66. data/lib/public/templates/edit.html.erb +6 -0
  67. data/lib/public/templates/keys.html.erb +36 -0
  68. data/lib/public/templates/new.html.erb +6 -0
  69. data/lib/public/templates/show.html.erb +2 -0
  70. data/lib/public/templates/stats.html.erb +8 -0
  71. data/lib/views/index.erb +13 -0
  72. data/lib/views/layout.erb +52 -0
  73. data/lib/webapp.rb +14 -0
  74. data/memcached-manager.gemspec +145 -0
  75. data/spec/javascripts/angular/controllers/list_keys_controller_spec.js +26 -0
  76. data/spec/javascripts/angular/services/notification_spec.js +45 -0
  77. data/spec/javascripts/angular/services/resource_spec.js +41 -0
  78. data/spec/javascripts/angular/services/response_spec.js +26 -0
  79. data/spec/javascripts/helpers/SpecHelper.js +2 -0
  80. data/spec/javascripts/helpers/angular-mocks.js +1962 -0
  81. data/spec/javascripts/support/jasmine.yml +96 -0
  82. data/spec/javascripts/support/jasmine_helper.rb +11 -0
  83. data/spec/lib/extensions/api_response_spec.rb +28 -0
  84. data/spec/lib/extensions/error_spec.rb +23 -0
  85. data/spec/lib/extensions/memcached_connection_spec.rb +25 -0
  86. data/spec/lib/extensions/memcached_inspector_spec.rb +41 -0
  87. data/spec/lib/extensions/memcached_settings_spec.rb +53 -0
  88. data/spec/spec_helper.rb +41 -0
  89. 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
+ });
@@ -0,0 +1,2 @@
1
+ beforeEach(function() {
2
+ });