nutcracker 0.2.4.beta2 → 0.2.4.beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +8 -2
- data/lib/nutcracker.rb +2 -2
- data/lib/nutcracker/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
# Nutcracker
|
2
2
|
<a href="https://rubygems.org/gems/nutcracker"><img src=https://fury-badge.herokuapp.com/rb/nutcracker.png></a>
|
3
3
|
|
4
|
-
This
|
5
|
-
|
4
|
+
This library wraps Twitter's [Nutcracker](https://github.com/twitter/twemproxy) in a gem package and provides a simple ruby API to the `nutcracker` executable.
|
5
|
+
|
6
|
+
### DISCLAIMER
|
7
|
+
this is still a work in progress...
|
6
8
|
|
7
9
|
## Motivation
|
8
10
|
The main motivation here is to take the advantages of working with Bundler's dependencies management and to be able to embed Twitter's [Nutcracker](https://github.com/twitter/twemproxy) as a dependency to any Ruby project, this allow you to create small-configuration-only-apps tied to specific version of Nutcracker as I show in the example bellow.
|
9
11
|
|
12
|
+
## Plugins
|
13
|
+
- [nutcracker-graphite](https://github.com/kontera-technologies/nutcracker-graphite) - Send cluster stats to Graphite
|
14
|
+
- [nutcracker-ui](https://github.com/kontera-technologies/nutcracker-ui) - Web interface for admin operations and graphs
|
15
|
+
|
10
16
|
### Installation
|
11
17
|
Add this line to your application's Gemfile:
|
12
18
|
```
|
data/lib/nutcracker.rb
CHANGED
@@ -54,10 +54,10 @@ module Nutcracker
|
|
54
54
|
def config
|
55
55
|
@config ||= YAML.load_file config_file
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
# syntactic sugar for initialize plugins
|
59
59
|
def use plugin, *args
|
60
|
-
|
60
|
+
Nutcracker.const_get("#{plugin.to_s.capitalize}").start(self,*args)
|
61
61
|
end
|
62
62
|
|
63
63
|
private
|
data/lib/nutcracker/version.rb
CHANGED