Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adapt Rakefiles to Hoe.

 - Relocated FAQ out of doc folder
 - Added manifest support
 - Renamed Changelog and README to suit better Hoe defaults.
 - Include extension in gem specification.
 - Advertise rake-compiler as development dependency.
 - Ensure extension is always compiled before tests.
 - Add test database to cleanup.
 - Bumped SQLite to 3.6.16
  • Loading branch information...
commit e7c3813c205505d11836ea7fe5db924442dcc10e 1 parent 3279085
@luislavena luislavena authored
View
3  CHANGELOG.rdoc → History.txt
@@ -1,7 +1,8 @@
=== (unreleased)
* Check for illegal nil before executing SQL [Erik Veenstra]
-
+* Switch to Hoe for gem task management and packaging.
+* Advertise rake-compiler as development dependency.
=== 1.2.4 / 27 Aug 2008
View
38 Manifest.txt
@@ -0,0 +1,38 @@
+ChangeLog.cvs
+faq/faq.rb
+faq/faq.yml
+ext/sqlite3_api/extconf.rb
+ext/sqlite3_api/sqlite3_api.i
+ext/sqlite3_api/sqlite3_api_wrap.c
+ext/sqlite3_api/win32/build.bat
+History.txt
+lib/sqlite3.rb
+lib/sqlite3/constants.rb
+lib/sqlite3/database.rb
+lib/sqlite3/driver/dl/api.rb
+lib/sqlite3/driver/dl/driver.rb
+lib/sqlite3/driver/native/driver.rb
+lib/sqlite3/errors.rb
+lib/sqlite3/pragmas.rb
+lib/sqlite3/resultset.rb
+lib/sqlite3/statement.rb
+lib/sqlite3/translator.rb
+lib/sqlite3/value.rb
+lib/sqlite3/version.rb
+LICENSE
+Manifest.txt
+Rakefile
+README.txt
+setup.rb
+tasks/benchmark.rake
+tasks/gem.rake
+tasks/native.rake
+tasks/vendor_sqlite3.rake
+test/bm.rb
+test/driver/dl/tc_driver.rb
+test/mocks.rb
+test/native-vs-dl.rb
+test/tc_database.rb
+test/tc_errors.rb
+test/tc_integration.rb
+test/tests.rb
View
7 README.rdoc → README.txt
@@ -1,12 +1,17 @@
= SQLite3/Ruby Interface
+* http://sqlite3-ruby.rubyforge.org
+* http://rubyforge.org/projects/sqlite3-ruby
+* http://github.com/jamis/sqlite3-ruby
+
+== DESCRIPTION
+
This module allows Ruby programs to interface with the SQLite3
database engine (http://www.sqlite.org). You must have the
SQLite engine installed in order to build this module.
Note that this module is NOT compatible with SQLite 2.x.
-
== Compilation and Installation
Simply do the following, after installing SQLite3:
View
0  doc/faq/faq.rb → faq/faq.rb
File renamed without changes
View
0  doc/faq/faq.yml → faq/faq.yml
File renamed without changes
View
1  lib/sqlite3/version.rb
@@ -9,6 +9,7 @@ module Version
STRING = [ MAJOR, MINOR, TINY ].join( "." )
#:beta-tag:
+ VERSION = '1.2.4'
end
end
View
10 tasks/common.rake
@@ -1,10 +0,0 @@
-require 'rake/clean'
-
-# common pattern cleanup
-CLEAN.include('tmp')
-
-# set default task
-task :default => [:test]
-
-# make packing depend on success of running the tests
-task :package => [:test]
View
9 tasks/faq.rake
@@ -0,0 +1,9 @@
+# Generate FAQ
+desc "Generate the FAQ document"
+task :faq => ['faq/faq.html']
+
+file 'faq/faq.html' => ['faq/faq.rb', 'faq/faq.yml'] do
+ cd 'faq' do
+ ruby "faq.rb > faq.html"
+ end
+end
View
66 tasks/gem.rake
@@ -1,59 +1,31 @@
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
+require 'hoe'
-# add lib to the load path for using version in gem specification
-$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
-require 'sqlite3/version'
+HOE = Hoe.spec 'sqlite3-ruby' do
+ self.rubyforge_name = 'sqlite-ruby'
+ self.author = ['Jamis Buck']
+ self.email = %w[jamis@37signals.com]
+ self.readme_file = 'README.txt'
+ self.need_tar = false
+ self.need_zip = false
-GEM_SPEC = Gem::Specification.new do |s|
- # basic information
- s.name = "sqlite3-ruby"
- s.version = SQLite3::Version::STRING
- s.platform = Gem::Platform::RUBY
+ spec_extras[:required_ruby_version] = Gem::Requirement.new('> 1.8.5')
- # description and details
- s.summary = "SQLite3/Ruby is a module to allow Ruby scripts to interface with a SQLite3 database."
- s.description = s.summary
+ spec_extras[:extensions] = ["ext/sqlite3_api/extconf.rb"]
- # required versions
- s.required_ruby_version = '>= 1.8.0'
+ extra_dev_deps << ['rake-compiler', '> 0.5.0']
- # components, files and paths
- s.files = FileList["doc/**/*.{rb,yml}", "ext/**/*.{rb,c,i}",
- "lib/**/*.rb", "test/**/*.rb", "tasks/**/*.rake",
- "Rakefile", "LICENSE", "*.{rdoc,rb}"]
+ spec_extras['rdoc_options'] = proc do |rdoc_options|
+ rdoc_options << "--main=README.txt"
+ end
- # define test files (gem test sqlite3-ruby)
- s.test_files = FileList["test/tests.rb"]
-
- # extconf extensions
- s.extensions = FileList["ext/**/extconf.rb"]
-
- s.require_path = 'lib'
-
- # documentation
- s.has_rdoc = true
- s.extra_rdoc_files = %w(README.rdoc)
- s.rdoc_options = [ "--main", "README.rdoc" ]
-
- # project information
- s.homepage = "http://sqlite-ruby.rubyforge.org/sqlite3"
- s.rubyforge_project = 'sqlite-ruby'
-
- # author and contributors
- s.author = "Jamis Buck"
- s.email = "jamis@37signals.com"
-end
-
-gem_package = Rake::GemPackageTask.new(GEM_SPEC) do |pkg|
- pkg.need_tar_gz = false
- pkg.need_tar_bz2 = false
- pkg.need_zip = false
+ clean_globs.push('**/test.db')
end
-file "#{GEM_SPEC.name}.gemspec" => ['Rakefile', 'tasks/gem.rake'] do |t|
+file "#{HOE.spec.name}.gemspec" => ['Rakefile', 'tasks/gem.rake'] do |t|
puts "Generating #{t.name}"
- File.open(t.name, 'w') { |f| f.puts GEM_SPEC.to_yaml }
+ File.open(t.name, 'w') { |f| f.puts HOE.spec.to_yaml }
end
desc "Generate or update the standalone gemspec file for the project"
-task :gemspec => ["#{GEM_SPEC.name}.gemspec"]
+task :gemspec => ["#{HOE.spec.name}.gemspec"]
View
5 tasks/native.rake
@@ -2,7 +2,7 @@
require 'rake/extensiontask'
# build sqlite3_api C extension
-Rake::ExtensionTask.new('sqlite3_api', GEM_SPEC) do |ext|
+Rake::ExtensionTask.new('sqlite3_api', HOE.spec) do |ext|
# reference to the sqlite3 library
sqlite3_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'sqlite3'))
@@ -24,3 +24,6 @@ file 'ext/sqlite3_api/sqlite3_api_wrap.c' => ['ext/sqlite3_api/sqlite3_api.i'] d
fail "could not build wrapper via swig (perhaps swig is not installed?)"
end
end
+
+# ensure things are compiled prior testing
+task :test => [:compile]
View
27 tasks/rdoc.rake
@@ -1,27 +0,0 @@
-require 'rake/rdoctask'
-
-DOC = Rake::RDocTask.new(:rdoc) do |rd|
- rd.title = "SQLite3/Ruby"
- rd.main = 'README.rdoc'
- rd.rdoc_dir = 'api'
- rd.options += %w(--line-numbers --inline-source --main README.rdoc)
- rd.rdoc_files.include %w(README.rdoc lib/**/*.rb)
-
- # attempt to use jamis RDoc template
- begin
- require 'rdoc/generators/template/html/jamis'
- rd.template = "jamis"
- rescue LoadError
- nil
- end
-end
-
-# Generate FAQ
-desc "Generate the FAQ document"
-task :faq => ['doc/faq/faq.html']
-
-file 'doc/faq/faq.html' => ['doc/faq/faq.rb', 'doc/faq/faq.yml'] do
- cd 'doc/faq' do
- ruby "faq.rb > faq.html"
- end
-end
View
2  tasks/vendor_sqlite3.rake
@@ -25,7 +25,7 @@ def dlltool(dllname, deffile, libfile)
end
end
-version = '3_6_14_1'
+version = '3_6_16'
# required folder structure for --with-sqlite3-dir (include + lib)
directory "vendor/sqlite3/lib"
Please sign in to comment.
Something went wrong with that request. Please try again.