summaryrefslogtreecommitdiff
path: root/qpid/ruby/Rakefile
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-11-13 02:45:18 +0000
committerRafael H. Schloming <rhs@apache.org>2008-11-13 02:45:18 +0000
commit92239a7a1362501ec492f176909eb3c092771cb9 (patch)
treed5392e5a3355dfd6929216e99a6141fda7276506 /qpid/ruby/Rakefile
parent726494e8b3d6eb93a500d2e06a707fea5ce3dfd3 (diff)
downloadqpid-python-92239a7a1362501ec492f176909eb3c092771cb9.tar.gz
merged 0-10 ruby client from QPID-1443 into existing ruby client
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@713616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/ruby/Rakefile')
-rw-r--r--qpid/ruby/Rakefile75
1 files changed, 75 insertions, 0 deletions
diff --git a/qpid/ruby/Rakefile b/qpid/ruby/Rakefile
new file mode 100644
index 0000000000..66e0fed226
--- /dev/null
+++ b/qpid/ruby/Rakefile
@@ -0,0 +1,75 @@
+# Rakefile for ruby-rpm -*- ruby -*-
+require 'rake/clean'
+require 'rake/testtask'
+require 'rake/gempackagetask'
+require 'pathname'
+
+PKG_NAME='ruby-qpid'
+PKG_VERSION='0.10.2'
+GEM_NAME='qpid'
+
+AMQP_SPEC_SRC=Pathname.new("../specs").realpath
+AMQP_SPEC_PATH=["/usr/share/amqp", AMQP_SPEC_SRC].join(File::PATH_SEPARATOR)
+AMQP_SPEC_FILES = FileList["amqp.0-10-qpid-errata.xml"]
+
+ENV["AMQP_SPEC_PATH"] = AMQP_SPEC_PATH unless ENV["AMQP_SPEC_PATH"]
+
+#
+# Additional files for clean/clobber
+#
+
+CLEAN.include [ "**/*~", "lib/*/spec_cache" ]
+
+Rake::TestTask.new(:test) do |t|
+ t.test_files = FileList['tests/*.rb'].exclude("tests/util.rb")
+ t.libs = [ 'lib' ]
+end
+
+Rake::TestTask.new(:"test_0-8") do |t|
+ t.test_files = FileList["tests_0-8/*.rb"]
+ t.libs = [ 'lib' ]
+end
+
+desc "Create cached versions of the AMQP specs"
+task :spec_cache do |t|
+ AMQP_SPEC_FILES.each do |f|
+ pid = fork do
+ $: << "lib"
+ require 'qpid'
+ Qpid::Spec010::load(f)
+ puts "Cached #{f}"
+ end
+ Process.wait(pid)
+ end
+end
+
+#
+# Packaging
+#
+
+PKG_FILES = FileList[
+ "DISCLAIMER", "LICENSE.txt", "NOTICE.txt",
+ "Rakefile", "RELEASE_NOTES",
+ "lib/**/*.rb", "lib/*/spec_cache/*.rb*", "tests/**/*", "examples/**"
+]
+
+DIST_FILES = FileList[
+ "pkg/*.tgz", "pkg/*.gem"
+]
+
+SPEC = Gem::Specification.new do |s|
+ s.name = GEM_NAME
+ s.version = PKG_VERSION
+ s.email = "qpid-dev@incubator.apache.org"
+ s.homepage = "http://cwiki.apache.org/qpid/"
+ s.summary = "Ruby client for Qpid"
+ s.files = PKG_FILES
+ s.required_ruby_version = '>= 1.8.1'
+ s.description = "Ruby client for Qpid"
+end
+
+Rake::GemPackageTask.new(SPEC) do |pkg|
+ task pkg.package_dir => [ :spec_cache ]
+ pkg.need_tar = true
+ pkg.need_zip = true
+end