2010-02-12 11:59:46 +01:00
|
|
|
require "rubygems"
|
|
|
|
require "rake/gempackagetask"
|
|
|
|
require "rake/rdoctask"
|
2006-04-15 01:23:35 +02:00
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
require "rake/testtask"
|
|
|
|
Rake::TestTask.new do |t|
|
|
|
|
t.libs << "test"
|
|
|
|
t.test_files = FileList["test/test_*.rb"]
|
|
|
|
t.verbose = true
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'spec/rake/spectask'
|
|
|
|
Spec::Rake::SpecTask.new
|
|
|
|
|
|
|
|
task :default => ["test", 'spec']
|
|
|
|
|
|
|
|
# This builds the actual gem. For details of what all these options
|
|
|
|
# mean, and other ones you can add, check the documentation here:
|
|
|
|
#
|
|
|
|
# http://rubygems.org/read/chapter/20
|
|
|
|
#
|
|
|
|
spec = Gem::Specification.new do |s|
|
2006-04-30 05:34:34 +02:00
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
# Change these as appropriate
|
|
|
|
s.name = "net-ldap"
|
|
|
|
s.version = "0.1.0"
|
|
|
|
s.summary = "What this thing does"
|
2010-02-12 15:12:52 +01:00
|
|
|
s.author = "Francis Cianfrocca"
|
|
|
|
s.author = 'Emiel van de Laar'
|
|
|
|
s.author = "Rory O'Connell"
|
|
|
|
s.author = "Kaspar Schiess"
|
2010-02-12 11:59:46 +01:00
|
|
|
|
|
|
|
s.description = "Pure Ruby LDAP library"
|
|
|
|
|
|
|
|
# s.has_rdoc = true
|
|
|
|
# s.extra_rdoc_files = %w(README.txt)
|
|
|
|
# s.rdoc_options = %w(--main README.txt)
|
2006-04-30 05:34:34 +02:00
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
# Add any extra files to include in the gem
|
2010-02-12 15:12:52 +01:00
|
|
|
s.files = %w(COPYING History.txt LICENSE Rakefile README.txt) + Dir.glob("{spec,test,lib/**/*}")
|
2010-02-12 11:59:46 +01:00
|
|
|
s.require_paths = ["lib"]
|
|
|
|
end
|
|
|
|
|
|
|
|
# This task actually builds the gem. We also regenerate a static
|
|
|
|
# .gemspec file, which is useful if something (i.e. GitHub) will
|
|
|
|
# be automatically building a gem for this project. If you're not
|
|
|
|
# using GitHub, edit as appropriate.
|
|
|
|
#
|
|
|
|
# To publish your gem online, install the 'gemcutter' gem; Read more
|
|
|
|
# about that here: http://gemcutter.org/pages/gem_docs
|
|
|
|
Rake::GemPackageTask.new(spec) do |pkg|
|
|
|
|
pkg.gem_spec = spec
|
2006-04-30 05:34:34 +02:00
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
# Generate the gemspec file for github.
|
|
|
|
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
|
|
|
|
File.open(file, "w") {|f| f << spec.to_ruby }
|
2006-04-30 05:34:34 +02:00
|
|
|
end
|
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
# Generate documentation
|
|
|
|
Rake::RDocTask.new do |rd|
|
|
|
|
rd.main = "README.txt"
|
|
|
|
rd.rdoc_files.include("README.txt", "lib/**/*.rb")
|
|
|
|
rd.rdoc_dir = "rdoc"
|
|
|
|
end
|
2010-02-10 19:13:59 +01:00
|
|
|
|
2010-02-12 11:59:46 +01:00
|
|
|
desc 'Clear out RDoc and generated packages'
|
|
|
|
task :clean => [:clobber_rdoc, :clobber_package] do
|
|
|
|
rm "#{spec.name}.gemspec"
|
|
|
|
end
|