switch to jeweler

This commit is contained in:
Justin Balthrop 2009-11-19 13:46:24 -08:00
parent 478c94529f
commit ea38686c2c
5 changed files with 113 additions and 62 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
pkg

View file

@ -1,4 +1,5 @@
Copyright (c) 2008 Dan Janowski <danj@3skel.com>, Matt Bauer <bauer@pedalbrain.com>
Copyright (c) 2009 Justin Balthrop <code@justinbalthrop.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

View file

@ -1,41 +1,57 @@
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "bdb"
gem.summary = %Q{Ruby Berkeley DB}
gem.description = %Q{Advanced Ruby Berkeley DB library.}
gem.email = "code@justinbalthrop.com"
gem.homepage = "http://github.com/ninjudd/bdb"
gem.authors = ["Justin Balthrop"]
gem.files = ["README.rdoc", "VERSION", "ext/*", "lib/**/*.rb", "test/*.rb"]
gem.extensions = ["ext/extconf.rb"]
gem.require_paths = ["ext", "lib"]
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
require 'rake/testtask'
load 'bdb.gemspec'
Rake::GemPackageTask.new(BDB_SPEC) do |pkg|
pkg.need_tar = true
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test' << 'ext'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
task :default => "test"
desc "Clean"
task :clean do
include FileUtils
Dir.chdir('ext') do
rm(Dir.glob('*') - ['bdb.c', 'bdb.h', 'extconf.rb'])
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
rm_rf 'pkg'
end
desc "Run tests"
Rake::TestTask.new("test") do |t|
t.libs.concat ["test", "ext"]
t.pattern = 'test/*_test.rb'
t.verbose = true
t.warning = true
end
task :doc => [:rdoc]
namespace :doc do
Rake::RDocTask.new do |rdoc|
files = ["README", "lib/**/*.rb"]
rdoc.rdoc_files.add(files)
rdoc.main = "README.textile"
rdoc.title = "Bdb Docs"
rdoc.rdoc_dir = "doc"
rdoc.options << "--line-numbers" << "--inline-source"
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "bdb #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.1.0

View file

@ -1,29 +1,61 @@
BDB_SPEC = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.required_ruby_version = '>=1.8.4'
s.name = "bdb"
s.version = "0.0.9"
s.authors = ["Matt Bauer", "Dan Janowski"]
s.email = "bauer@pedalbrain.com"
s.summary = "A Ruby interface to BerkeleyDB"
s.files = ['bdb.gemspec',
'ext/bdb.c',
'ext/bdb.h',
'ext/extconf.rb',
'lib/bdb/simple.rb',
'LICENSE',
'README.textile',
'Rakefile']
s.test_files = ['test/cursor_test.rb',
'test/db_test.rb',
'test/env_test.rb',
'test/stat_test.rb',
'test/test_helper.rb',
'test/txn_test.rb']
s.extensions = ["ext/extconf.rb"]
s.homepage = "http://github.com/mattbauer/bdb"
s.require_paths = ["lib", "ext"]
s.has_rdoc = false
# Generated by jeweler
# DO NOT EDIT THIS FILE
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{bdb}
s.version = "0.1.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Justin Balthrop"]
s.date = %q{2009-11-19}
s.description = %q{Advanced Ruby Berkeley DB library.}
s.email = %q{code@justinbalthrop.com}
s.extensions = ["ext/extconf.rb"]
s.extra_rdoc_files = [
"LICENSE",
"README.textile"
]
s.files = [
"VERSION",
"ext/bdb.c",
"ext/bdb.h",
"ext/extconf.rb",
"lib/bdb/database.rb",
"lib/bdb/environment.rb",
"test/benchmark.rb",
"test/cursor_test.rb",
"test/db_test.rb",
"test/env_test.rb",
"test/simple_test.rb",
"test/stat_test.rb",
"test/test_helper.rb",
"test/txn_test.rb"
]
s.homepage = %q{http://github.com/ninjudd/bdb}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["ext", "lib"]
s.rubygems_version = %q{1.3.5}
s.summary = %q{Ruby Berkeley DB}
s.test_files = [
"test/benchmark.rb",
"test/cursor_test.rb",
"test/db_test.rb",
"test/env_test.rb",
"test/simple_test.rb",
"test/stat_test.rb",
"test/test_helper.rb",
"test/txn_test.rb"
]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
end