switch to jeweler
This commit is contained in:
parent
478c94529f
commit
ea38686c2c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pkg
|
1
LICENSE
1
LICENSE
|
@ -1,4 +1,5 @@
|
||||||
Copyright (c) 2008 Dan Janowski <danj@3skel.com>, Matt Bauer <bauer@pedalbrain.com>
|
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
|
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
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|
76
Rakefile
76
Rakefile
|
@ -1,41 +1,57 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'rake/gempackagetask'
|
require 'rake'
|
||||||
require 'rake/rdoctask'
|
|
||||||
|
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'
|
require 'rake/testtask'
|
||||||
|
Rake::TestTask.new(:test) do |test|
|
||||||
load 'bdb.gemspec'
|
test.libs << 'lib' << 'test' << 'ext'
|
||||||
|
test.pattern = 'test/**/*_test.rb'
|
||||||
Rake::GemPackageTask.new(BDB_SPEC) do |pkg|
|
test.verbose = true
|
||||||
pkg.need_tar = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
task :default => "test"
|
begin
|
||||||
|
require 'rcov/rcovtask'
|
||||||
desc "Clean"
|
Rcov::RcovTask.new do |test|
|
||||||
task :clean do
|
test.libs << 'test'
|
||||||
include FileUtils
|
test.pattern = 'test/**/*_test.rb'
|
||||||
Dir.chdir('ext') do
|
test.verbose = true
|
||||||
rm(Dir.glob('*') - ['bdb.c', 'bdb.h', 'extconf.rb'])
|
end
|
||||||
|
rescue LoadError
|
||||||
|
task :rcov do
|
||||||
|
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
||||||
end
|
end
|
||||||
rm_rf 'pkg'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run tests"
|
task :test => :check_dependencies
|
||||||
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]
|
task :default => :test
|
||||||
namespace :doc do
|
|
||||||
|
require 'rake/rdoctask'
|
||||||
Rake::RDocTask.new do |rdoc|
|
Rake::RDocTask.new do |rdoc|
|
||||||
files = ["README", "lib/**/*.rb"]
|
if File.exist?('VERSION')
|
||||||
rdoc.rdoc_files.add(files)
|
version = File.read('VERSION')
|
||||||
rdoc.main = "README.textile"
|
else
|
||||||
rdoc.title = "Bdb Docs"
|
version = ""
|
||||||
rdoc.rdoc_dir = "doc"
|
|
||||||
rdoc.options << "--line-numbers" << "--inline-source"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rdoc.rdoc_dir = 'rdoc'
|
||||||
|
rdoc.title = "bdb #{version}"
|
||||||
|
rdoc.rdoc_files.include('README*')
|
||||||
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||||
end
|
end
|
||||||
|
|
82
bdb.gemspec
82
bdb.gemspec
|
@ -1,29 +1,61 @@
|
||||||
BDB_SPEC = Gem::Specification.new do |s|
|
# Generated by jeweler
|
||||||
s.platform = Gem::Platform::RUBY
|
# DO NOT EDIT THIS FILE
|
||||||
s.required_ruby_version = '>=1.8.4'
|
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
||||||
s.name = "bdb"
|
# -*- encoding: utf-8 -*-
|
||||||
s.version = "0.0.9"
|
|
||||||
s.authors = ["Matt Bauer", "Dan Janowski"]
|
Gem::Specification.new do |s|
|
||||||
s.email = "bauer@pedalbrain.com"
|
s.name = %q{bdb}
|
||||||
s.summary = "A Ruby interface to BerkeleyDB"
|
s.version = "0.1.0"
|
||||||
s.files = ['bdb.gemspec',
|
|
||||||
'ext/bdb.c',
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
'ext/bdb.h',
|
s.authors = ["Justin Balthrop"]
|
||||||
'ext/extconf.rb',
|
s.date = %q{2009-11-19}
|
||||||
'lib/bdb/simple.rb',
|
s.description = %q{Advanced Ruby Berkeley DB library.}
|
||||||
'LICENSE',
|
s.email = %q{code@justinbalthrop.com}
|
||||||
'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.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"
|
||||||
|
]
|
||||||
|
|
||||||
s.homepage = "http://github.com/mattbauer/bdb"
|
if s.respond_to? :specification_version then
|
||||||
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
||||||
|
s.specification_version = 3
|
||||||
|
|
||||||
s.require_paths = ["lib", "ext"]
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
||||||
s.has_rdoc = false
|
else
|
||||||
|
end
|
||||||
|
else
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue