memcached-manager 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,28 @@
1
+ == Running development mode
2
+
3
+ bundle install
4
+ rackup
5
+
6
+ == Running the test suite
7
+
8
+ First, make sure you have phantomjs installed if you want to run cukes tagged as @javascript(those who are in the features/webapp directory.
9
+
10
+ Have `memcached` run on `localhost:11211` then run:
11
+
12
+ bundle exec rake
13
+
14
+ == Roadmap(stuff you can do)
15
+
16
+ * Develop frontend & artwork (in progress)
17
+ * Favicon
18
+ * Update API/frontend in order to use http statuses for errors, creation and so on.
19
+
20
+ == Making a pull request?
21
+
22
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
23
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
24
+ * Fork the project.
25
+ * Start a feature/bugfix branch.
26
+ * Commit and push until you are happy with your contribution.
27
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
28
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
data/README.rdoc CHANGED
@@ -14,24 +14,17 @@ A single-page sinatra memcached manager/admin that allows you to read stats, vie
14
14
 
15
15
  memcached-manager
16
16
 
17
- == Plugging memcached manager to an existing Rails app
18
-
19
- Todo.
17
+ If you are running memcached on a different host/port than its defaults(locahost:11211)
20
18
 
21
- == Roadmap
19
+ memcached-manager -H foo.bar -P 1337
22
20
 
23
- * Develop frontend & artwork (in progress)
24
- * Favicon
25
- * Add memcached host & port configs hooked to the binary
26
- * Update API/frontend in order to use http statuses for errors, creation and so on.
21
+ or
27
22
 
28
- == Running the test suite
23
+ memcached-manager --memcached-host foo.bar --memcached-port 1337
29
24
 
30
- First, make sure you have phantomjs installed if you want to run cukes tagged as @javascript(those who are in the features/webapp directory.
31
-
32
- Have `memcached` run on `localhost:11211` then run:
25
+ == Plugging memcached manager to an existing Rails app
33
26
 
34
- bundle exec rake
27
+ Todo.
35
28
 
36
29
  == Requirements
37
30
 
@@ -40,13 +33,7 @@ Memcached (of course)
40
33
 
41
34
  == Contributing to Memcached Manager
42
35
 
43
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
44
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
45
- * Fork the project.
46
- * Start a feature/bugfix branch.
47
- * Commit and push until you are happy with your contribution.
48
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
49
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
36
+ Check CONTRIBUTING.md
50
37
 
51
38
  == Maintainers
52
39
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -12,4 +12,13 @@ require_relative './../lib/api'
12
12
 
13
13
  options = Vegas::WINDOWS ? {:foreground => true} : {}
14
14
  Vegas::Runner.new(Rack::URLMap.new({ "/api" => MemcachedManager::API.new, "/" => MemcachedManager::Webapp.new }), 'memcached-manager', options) do |runner, opts, app|
15
+ opts.on('-H host', '--memcached-host H', 'Define memcached host') do |mh|
16
+ ENV['memcached_host'] = mh
17
+ runner.logger.info "Running memcached with host #{ENV['memcached_host']}"
18
+ end
19
+
20
+ opts.on('-P port', '--memcached-port P', 'Define memcached port') do |mp|
21
+ ENV['memcached_port'] = mp
22
+ runner.logger.info "Running memcached with port #{ENV['memcached_port']}"
23
+ end
15
24
  end
@@ -5,6 +5,7 @@ require 'dalli'
5
5
  require 'rspec'
6
6
  require 'rspec/expectations'
7
7
  require 'capybara/poltergeist'
8
+ require 'sinatra'
8
9
 
9
10
  Capybara.javascript_driver = :poltergeist
10
11
 
@@ -1,5 +1,8 @@
1
1
  controllers.controller('ListKeysController', ['$scope', 'Keys', '$state', '$location', function($scope, Keys, $state, $location) {
2
2
  $scope.keys = Keys.get();
3
+ $scope.showKeys = function() {
4
+ $state.transitionTo('showKeys');
5
+ };
3
6
  }]);
4
7
 
5
8
  controllers.controller('CreateKeyController', ['$scope', 'Keys', '$state', '$location', 'Notification', 'Response', function($scope, Keys, $state, $location, Notification, Response) {
@@ -1,5 +1,5 @@
1
1
  <section>
2
- <h3>memcached manager</h3>
2
+ <h3 ng-click="showKeys()">memcached manager</h3>
3
3
  <hr>
4
4
  <section id="key-menu">
5
5
  <div id="key-text">
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "memcached-manager"
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thiago Fernandes Massa"]
12
- s.date = "2013-10-26"
12
+ s.date = "2013-10-27"
13
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
14
  s.email = "thiagown@gmail.com"
15
15
  s.executables = ["memcached-manager"]
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.files = [
21
21
  ".rspec",
22
22
  ".travis.yml",
23
+ "CONTRIBUTING.md",
23
24
  "Gemfile",
24
25
  "Gemfile.lock",
25
26
  "LICENSE.txt",
@@ -1,6 +1,7 @@
1
1
  describe('ListKeysController', function(){
2
2
  describe('keys', function(){
3
- var scope;
3
+ var scope,
4
+ location;
4
5
 
5
6
  // mocking keys resource to return []
6
7
  var keysResource = {
@@ -11,16 +12,27 @@ describe('ListKeysController', function(){
11
12
 
12
13
  beforeEach(module('memcached-keys'));
13
14
 
14
- beforeEach(inject(function($rootScope, $controller){
15
+ beforeEach(inject(function($rootScope, $controller, $location){
16
+ location = $location;
15
17
  scope = $rootScope.$new();
16
18
  ctrl = $controller('ListKeysController', {
17
19
  $scope: scope,
18
- Keys: keysResource
20
+ Keys: keysResource,
21
+ $state: {
22
+ transitionTo: function() {
23
+ location.path('/');
24
+ }
25
+ }
19
26
  });
20
27
  }));
21
28
 
22
29
  it('sets up the keys attribute with Keys resource call', function(){
23
30
  expect(scope.keys).toEqual([]);
24
31
  });
32
+
33
+ it('should show keys', function() {
34
+ scope.showKeys();
35
+ expect(location.path()).toBe('/');
36
+ })
25
37
  });
26
38
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcached-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-26 00:00:00.000000000 Z
12
+ date: 2013-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -151,6 +151,7 @@ extra_rdoc_files:
151
151
  files:
152
152
  - .rspec
153
153
  - .travis.yml
154
+ - CONTRIBUTING.md
154
155
  - Gemfile
155
156
  - Gemfile.lock
156
157
  - LICENSE.txt
@@ -253,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
254
  version: '0'
254
255
  segments:
255
256
  - 0
256
- hash: 4267379797714957962
257
+ hash: 2320618041102712995
257
258
  required_rubygems_version: !ruby/object:Gem::Requirement
258
259
  none: false
259
260
  requirements: