Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add real project stuff, like a README and a Rakefile.
- Loading branch information
Showing
5 changed files
with
79 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,20 @@ | ||
Copyright (c) 2010 Nathan Weizenbaum | ||
|
||
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,5 @@ | ||
# rb-kqueue | ||
|
||
This is a simple wrapper over the [kqueue](http://en.wikipedia.org/wiki/Kqueue) | ||
BSD event notification interface (supported on FreeBSD, NetBSD, OpenBSD, and Darwin). | ||
It uses the [FFI](http://wiki.github.com/ffi/ffi) gem to avoid having to compile a C extension. |
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,51 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "rb-kqueue" | ||
gem.summary = "A Ruby wrapper for BSD's kqueue, using FFI" | ||
gem.description = gem.summary | ||
gem.email = "nex342@gmail.com" | ||
gem.homepage = "http://github.com/nex3/rb-kqueue" | ||
gem.authors = ["Nathan Weizenbaum"] | ||
gem.add_dependency "ffi", ">= 0.5.0" | ||
gem.add_development_dependency "yard", ">= 0.4.0" | ||
end | ||
Jeweler::GemcutterTasks.new | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" | ||
end | ||
|
||
module Jeweler::VersionHelper::PlaintextExtension | ||
def write_with_inotify | ||
write_without_inotify | ||
filename = File.join(File.dirname(__FILE__), "lib/rb-kqueue.rb") | ||
text = File.read(filename) | ||
File.open(filename, 'w') do |f| | ||
f.write text.gsub(/^( VERSION = ).*/, '\1' + [major, minor, patch].inspect) | ||
end | ||
end | ||
alias_method :write_without_inotify, :write | ||
alias_method :write, :write_with_inotify | ||
end | ||
|
||
class Jeweler::Commands::Version::Base | ||
def commit_version_with_inotify | ||
return unless self.repo | ||
self.repo.add(File.join(File.dirname(__FILE__), "lib/rb-kqueue.rb")) | ||
commit_version_without_inotify | ||
end | ||
alias_method :commit_version_without_inotify, :commit_version | ||
alias_method :commit_version, :commit_version_with_inotify | ||
end | ||
|
||
begin | ||
require 'yard' | ||
YARD::Rake::YardocTask.new | ||
rescue LoadError | ||
task :yardoc do | ||
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard" | ||
end | ||
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 @@ | ||
0.0.0 |
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