Skip to content

Commit

Permalink
Move from jeweler to bundler.
Browse files Browse the repository at this point in the history
  • Loading branch information
mat813 committed Dec 3, 2012
1 parent 2b99663 commit fa6fac6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 93 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/pkg
/.yardoc
/doc
Gemfile.lock
3 changes: 3 additions & 0 deletions Gemfile
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gemspec
44 changes: 2 additions & 42 deletions Rakefile
@@ -1,45 +1,5 @@
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_kqueue
write_without_kqueue
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_kqueue, :write
alias_method :write, :write_with_kqueue
end

class Jeweler::Commands::Version::Base
def commit_version_with_kqueue
return unless self.repo
self.repo.add(File.join(File.dirname(__FILE__), "lib/rb-kqueue.rb"))
commit_version_without_kqueue
end
alias_method :commit_version_without_kqueue, :commit_version
alias_method :commit_version, :commit_version_with_kqueue
end
#!/usr/bin/env rake
require "bundler/gem_tasks"

begin
require 'yard'
Expand Down
70 changes: 19 additions & 51 deletions rb-kqueue.gemspec
Expand Up @@ -3,59 +3,27 @@
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{rb-kqueue}
s.version = "0.2.0"
Gem::Specification.new do |gem|
gem.name = %q{rb-kqueue}
gem.version = "0.2.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nathan Weizenbaum"]
s.date = %q{2010-02-08}
s.description = %q{A Ruby wrapper for BSD's kqueue, using FFI}
s.email = %q{nex342@gmail.com}
s.extra_rdoc_files = [
"README.md"
]
s.files = [
".gitignore",
".yardopts",
"MIT-LICENSE",
"README.md",
"Rakefile",
"VERSION",
"lib/rb-kqueue.rb",
"lib/rb-kqueue/event.rb",
"lib/rb-kqueue/native.rb",
"lib/rb-kqueue/native/flags.rb",
"lib/rb-kqueue/queue.rb",
"lib/rb-kqueue/watcher.rb",
"lib/rb-kqueue/watcher/file.rb",
"lib/rb-kqueue/watcher/process.rb",
"lib/rb-kqueue/watcher/read_write.rb",
"lib/rb-kqueue/watcher/signal.rb",
"lib/rb-kqueue/watcher/socket_read_write.rb",
"lib/rb-kqueue/watcher/timer.rb",
"rb-kqueue.gemspec"
]
s.homepage = %q{http://github.com/mat813/rb-kqueue}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5}
s.summary = %q{A Ruby wrapper for BSD's kqueue, using FFI}
gem.authors = ["Mathieu Arnold", "Nathan Weizenbaum"]
gem.email = %q{mat@mat.cc nex342@gmail.com}
gem.date = %q{2012-12-03}
gem.description = %q{A Ruby wrapper for BSD's kqueue, using FFI}
gem.extra_rdoc_files = %w(README.md)

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
gem.files = `git ls-files`.split(/\n/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<ffi>, [">= 0.5.0"])
s.add_development_dependency(%q<yard>, [">= 0.4.0"])
else
s.add_dependency(%q<ffi>, [">= 0.5.0"])
s.add_dependency(%q<yard>, [">= 0.4.0"])
end
else
s.add_dependency(%q<ffi>, [">= 0.5.0"])
s.add_dependency(%q<yard>, [">= 0.4.0"])
end
gem.homepage = %q{http://github.com/mat813/rb-kqueue}
gem.rdoc_options = ["--charset=UTF-8"]
gem.require_paths = ["lib"]
gem.rubygems_version = %q{1.3.5}
gem.summary = %q{A Ruby wrapper for BSD's kqueue, using FFI}

gem.add_runtime_dependency(%q<ffi>, [">= 0.5.0"])
gem.add_development_dependency(%q<yard>, [">= 0.4.0"])
end

0 comments on commit fa6fac6

Please sign in to comment.