nutcracker 0.2.4.beta1 → 0.2.4.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/nutcracker.rb +5 -0
- data/lib/nutcracker/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Nutcracker
|
2
|
-
<a href="https://rubygems.org/gems/
|
2
|
+
<a href="https://rubygems.org/gems/nutcracker"><img src=https://fury-badge.herokuapp.com/rb/nutcracker.png></a>
|
3
3
|
|
4
4
|
This "library" wraps Twitter's [Nutcracker](https://github.com/twitter/twemproxy) in a gem package and provides ( in the near future I hope ) simple ruby API to the `nutcracker` executable.
|
5
5
|
For now this repository only contains a Rakefile for building new `nutcracker` gems, look at the last section for more info.
|
data/lib/nutcracker.rb
CHANGED
@@ -54,6 +54,11 @@ module Nutcracker
|
|
54
54
|
def config
|
55
55
|
@config ||= YAML.load_file config_file
|
56
56
|
end
|
57
|
+
|
58
|
+
# syntactic sugar for initialize plugins
|
59
|
+
def use plugin, *args
|
60
|
+
self.class.const_get("::Nutcracker::#{plugin.to_s.capitalize}").start(self,*args)
|
61
|
+
end
|
57
62
|
|
58
63
|
private
|
59
64
|
|
data/lib/nutcracker/version.rb
CHANGED