Skip to content

Commit

Permalink
Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Mar 22, 2011
1 parent 49f6312 commit f496146
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.gem
36 changes: 36 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/rdoctask'
#require 'spec/rake/spectask'

CLEAN.include('**/*.gem')

desc "Create the postgis_adapter gem"
task :create_gem => [:clean] do
spec = eval(IO.read('ticgit-ng.gemspec'))
gem = Gem::Builder.new(spec).build
Dir.mkdir("pkg") unless Dir.exists? "pkg"
FileUtils.mv("#{File.dirname(__FILE__)}/#{gem}", "pkg")
end

Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION').chomp : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "postgis_adapter #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

task :default => :create_gem

# Spec::Rake::SpecTask.new(:spec) do |spec|
# spec.libs << 'lib' << 'spec'
# spec.spec_files = FileList['spec/**/*_spec.rb']
# end

# Spec::Rake::SpecTask.new(:rcov) do |spec|
# spec.libs << 'lib' << 'spec'
# spec.pattern = 'spec/**/*_spec.rb'
# spec.rcov = true
# end

0 comments on commit f496146

Please sign in to comment.