From bc994b9fa2cc965264a8a693d8f2ecf801bb3c39 Mon Sep 17 00:00:00 2001 From: Doug Fales Date: Sat, 27 Feb 2010 17:03:59 -0700 Subject: [PATCH] Putting the gem building stuff into a gemspec. --- Rakefile | 29 ----------------------------- gpx.gemspec | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 29 deletions(-) create mode 100644 gpx.gemspec diff --git a/Rakefile b/Rakefile index 528d7a5..8c0d95d 100644 --- a/Rakefile +++ b/Rakefile @@ -42,35 +42,6 @@ Rake::RDocTask.new("doc") { |rdoc| rdoc.rdoc_files.include('lib/**/*.rb') } -# Genereate the package -spec = Gem::Specification.new do |s| - - s.name = 'gpx' - s.version = PKG_VERSION - s.summary = <<-EOF - A basic API for reading and writing GPX files. - EOF - s.description = <<-EOF - A basic API for reading and writing GPX files. - EOF - - s.files = PKG_FILES - - s.require_path = 'lib' - s.autorequire = 'gpx' - - s.has_rdoc = true - - s.author = "Doug Fales" - s.email = "doug.fales@gmail.com" - s.homepage = "http://gpx.rubyforge.com/" -end - -Rake::GemPackageTask.new(spec) do |pkg| - pkg.need_zip = true - pkg.need_tar = true -end - desc "Report code statistics (KLOCs, etc) from the application" task :stats do require 'code_statistics' diff --git a/gpx.gemspec b/gpx.gemspec new file mode 100644 index 0000000..ddb4f79 --- /dev/null +++ b/gpx.gemspec @@ -0,0 +1,16 @@ +require 'xml/libxml' +require 'lib/gpx/gpx' # load this and xml/libxml just to get GPX::VERSION +require 'rake' # For FileList +Gem::Specification.new do |s| + s.name = 'gpx' + s.version = GPX::VERSION + s.summary = %q{A basic API for reading and writing GPX files.} + s.description = %q{A basic API for reading and writing GPX files.} + s.files = FileList[ "lib/**/*", "bin/*", "tests/**/*", "[A-Z]*", "Rakefile", "doc/**/*" ] + s.require_path = 'lib' + s.has_rdoc = true + s.author = "Doug Fales" + s.email = "doug.fales@gmail.com" + s.homepage = "http://dougfales.github.com/gpx/" + s.rubyforge_project = "gpx" +end