Permalink
Browse files

switch to jeweler

  • Loading branch information...
1 parent 478c945 commit ea38686c2cb94b0125d1f7f02bc448507e829d39 @ninjudd ninjudd committed Nov 19, 2009
Showing with 112 additions and 61 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 LICENSE
  3. +49 −33 Rakefile
  4. +1 −0 VERSION
  5. +60 −28 bdb.gemspec
View
@@ -0,0 +1 @@
+pkg
View
@@ -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
@@ -1,41 +1,57 @@
require 'rubygems'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-require 'rake/testtask'
+require 'rake'
-load 'bdb.gemspec'
-
-Rake::GemPackageTask.new(BDB_SPEC) do |pkg|
- pkg.need_tar = true
+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
-
-task :default => "test"
-desc "Clean"
-task :clean do
- include FileUtils
- Dir.chdir('ext') do
- rm(Dir.glob('*') - ['bdb.c', 'bdb.h', 'extconf.rb'])
- end
- rm_rf 'pkg'
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test' << 'ext'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
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
+
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |test|
+ test.libs << 'test'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
+ 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
-
-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"
+
+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
View
@@ -0,0 +1 @@
+0.1.0
View
@@ -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

0 comments on commit ea38686

Please sign in to comment.