Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: chatgris <jboyer@af83.com>
- Loading branch information
chatgris
committed
Sep 21, 2012
0 parents
commit 6b20850
Showing
6 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Because this is a gem, ignore Gemfile.lock: | ||
|
||
Gemfile.lock | ||
|
||
# And because this is Ruby, ignore the following | ||
# (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore): | ||
|
||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
coverage | ||
InstalledFiles | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
|
||
# YARD artifacts | ||
.yardoc | ||
_yardoc | ||
doc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source :rubygems | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT LICENSE | ||
|
||
Copyright (c) chatgris <jboyer@af83.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# sponges | ||
|
||
When I build some worker, I want them to be like an army of spongebob, always | ||
stressed and eager to work. sponges helps you to build this army of sponge, to | ||
control them, and, well, kill them gracefully. | ||
|
||
## Installation | ||
|
||
Ruby 1.9.3 is required. | ||
|
||
Install it with rubygems: | ||
|
||
gem install sponges | ||
|
||
With bundler, add it to your `Gemfile`: | ||
|
||
``` ruby | ||
gem "sponges" | ||
``` | ||
|
||
## Usage | ||
``` ruby | ||
# The worker class is the one you want to daemonize. | ||
# | ||
worker = Worker.new | ||
|
||
options = { | ||
size: 3, | ||
log_dir: "/tmp" | ||
} | ||
|
||
Sponges.new("name", options). | ||
work(worker, :run, *args, &block) | ||
``` | ||
|
||
## Copyright | ||
|
||
MIT. See LICENSE for further details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Sponges | ||
VERSION = "0.0.1" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# encoding: utf-8 | ||
|
||
$:.unshift File.expand_path('../lib', __FILE__) | ||
require 'sponges/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "sponges" | ||
s.version = Sponges::VERSION | ||
s.authors = ["chatgris"] | ||
s.email = ["jboyer@af83.com"] | ||
s.homepage = "https://github.com/AF83/sponges" | ||
s.summary = "Turn any ruby object in a daemons controlling an army of sponges." | ||
s.description = "When I build some worker, I want them to be like an army of spongebob, always stressed and eager to work. sponges helps you to build this army of sponge, to control them, and, well, kill them gracefully." | ||
s.files = `git ls-files app lib`.split("\n") | ||
s.platform = Gem::Platform::RUBY | ||
s.require_paths = ['lib'] | ||
end |