Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
dradetsky committed Jan 5, 2015
0 parents commit 1cc0f21
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.gem
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "https://rubygems.org"

2 changes: 2 additions & 0 deletions ext/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Put the lib here and it'll be loaded instead of the system version
Stole idea from the zeromq for ruby guy.
9 changes: 9 additions & 0 deletions lib/seeklib.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module SeekLib
extend FFI::Library
local_lib_path = File.join File.dirname(__FILE__), '..', 'ext', 'libseek.so'
if File.exists? local_lib_path
ffi_lib local_lib_path
else
ffi_lib 'seek'
end
end
12 changes: 12 additions & 0 deletions seeklib.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- ruby -*-
Gem::Specification.new do |s|
s.name = 'seeklib'
s.authors = ['Daniel Radetsky']
s.email = ['[email protected]']
# s.homepage = <repo>
s.summary = 'fuck you rubygems'
s.version = '0.0.0'
s.files = ['lib/seeklib.rb']
s.require_paths = ['lib']
s.add_runtime_dependency "ffi", ["~> 1.9"]
end

0 comments on commit 1cc0f21

Please sign in to comment.