summaryrefslogtreecommitdiff
path: root/cpp/bindings/qpid/ruby/Rakefile
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-09-30 12:32:26 +0000
committerTed Ross <tross@apache.org>2011-09-30 12:32:26 +0000
commit4ef8c1c78d62e6c8d014c69ced091090a07858b6 (patch)
treedbeaeb9abad68402fcc7e52c2a00a59762677780 /cpp/bindings/qpid/ruby/Rakefile
parent071e2890ac74336378cf58533d72060f6f754b3d (diff)
downloadqpid-python-4ef8c1c78d62e6c8d014c69ced091090a07858b6.tar.gz
QPID-3362 - Creates the Qpid gem file for distribution on RubyGems.org
Committed patch from Darryl Pierce git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1177629 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/ruby/Rakefile')
-rw-r--r--cpp/bindings/qpid/ruby/Rakefile100
1 files changed, 78 insertions, 22 deletions
diff --git a/cpp/bindings/qpid/ruby/Rakefile b/cpp/bindings/qpid/ruby/Rakefile
index ef2b158eba..07cfff9844 100644
--- a/cpp/bindings/qpid/ruby/Rakefile
+++ b/cpp/bindings/qpid/ruby/Rakefile
@@ -20,24 +20,42 @@
task :noop
-require 'rubygems'
-require 'rake/clean'
-require 'rake/rdoctask'
-require 'rake/testtask'
+# look for a root directory for out-of-tree builds
-CLOBBER.include('pkg')
+OUTPUT_DIR=ENV["OUTPUT_DIR"] || "."
-load './lib/qpid/version.rb'
+require "rubygems"
+require "rubygems/package_task"
-desc 'Default: run all tests.'
-task :default => :'test:all'
+require "rake/clean"
+require "rake/extensiontask"
+require "rake/rdoctask"
+require "rake/testtask"
+
+CLOBBER.include("pkg")
+
+load "./lib/qpid/version.rb"
+
+#-------------
+# Gem Details.
+#-------------
+
+NAME = "qpid"
+# VERSION = Qpid::VERSION
+AUTHOR = "Darryl L. Pierce"
+EMAIL = "dpierce@redhat.com"
+HOMEPAGE = "http://qpid.apache.org"
+SUMMARY = "Qpid is an enterprise messaging framework."
+
+desc "Default: run all tests."
+task :default => :"test:all"
#---------------
# Testing tasks.
#---------------
-desc 'Run all tests (alias for test:all).'
-task :test => :'test:all'
+desc "Run all tests (alias for test:all)."
+task :test => :"test:all"
namespace :test do
desc "Run all tests (default)."
@@ -45,15 +63,15 @@ namespace :test do
desc "Run unit tests."
Rake::TestTask.new(:units) do |t|
- t.libs << '.'
- t.pattern = 'test/test*.rb'
+ t.libs << "."
+ t.pattern = "test/test*.rb"
t.verbose = true
end
desc "Run integration tests."
Rake::TestTask.new(:integrations) do |t|
- t.libs << '.'
- t.pattern = 'test/integration/*.rb'
+ t.libs << "."
+ t.pattern = "test/integration/*.rb"
t.verbose = true
end
@@ -63,12 +81,50 @@ end
# Documentation tasks.
#---------------------
-Rake::RDocTask.new(
- :rdoc => 'rdoc',
- :clobber_rdoc => 'rdoc:clean',
- :rerdoc => 'rdoc:force'
- ) do |rd|
- rd.main = 'README.rdoc'
- rd.options << '--all'
- rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
+Rake::RDocTask.new(:rdoc => "rdoc",
+ :clobber_rdoc => "rdoc:clean",
+ :rerdoc => "rdoc:force") do |rd|
+ rd.main = "README.rdoc"
+ rd.options << "--all"
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
end
+
+#-----------------
+# Package the gem.
+#-----------------
+
+spec = Gem::Specification.new do |s|
+ s.name = NAME
+ s.version = Qpid::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.extra_rdoc_files = ["README.rdoc"]
+ s.summary = SUMMARY
+ s.description = s.summary
+ s.author = AUTHOR
+ s.email = EMAIL
+ s.homepage = HOMEPAGE
+
+ s.extensions = FileList["ext/**/extconf.rb"]
+
+ s.require_path = "lib"
+ # DEPRECATED s.autorequire = NAME
+ s.files = FileList["LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "TODO",
+ "lib/**/*.rb",
+ "test/**/*.rb",
+ "examples/**/*.rb",
+ "ext/**/*"]
+end
+
+Gem::PackageTask.new(spec) do |pkg|
+ pkg.package_dir = "#{OUTPUT_DIR}/pkg"
+end
+
+#------------------
+# Build native code
+#------------------
+
+Rake::ExtensionTask.new("cqpid", spec)
+