Permalink
Browse files

Fixes #6 Special Thank you to ekaranto and tommeier for the elegant s…

…olution for determining whether the mq installation is 32 bit or 64 bit on Linux/Unix and setup the lib_path appropriately
  • Loading branch information...
1 parent d36a65d commit 1777ffac4727d4a21b845c5baf6d0d1ece992162 @reidmorrison committed May 30, 2013
Showing with 25 additions and 17 deletions.
  1. +1 −0 .ruby-gemset
  2. +1 −0 .ruby-version
  3. +17 −13 Rakefile
  4. +3 −1 ext/extconf.rb
  5. +2 −2 ext/wmq_queue_manager.c
  6. +1 −1 lib/wmq/version.rb
View
@@ -0,0 +1 @@
+rubywmq
View
@@ -0,0 +1 @@
+ruby-2.0.0
View
@@ -2,6 +2,7 @@ lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
require 'rubygems'
+require 'rubygems/package'
require 'rake/clean'
require 'rake/testtask'
require 'date'
@@ -10,15 +11,16 @@ require 'wmq/version'
desc "Build Ruby Source gem"
task :gem do |t|
excludes = [
- 'lib/wmq/constants.rb',
- 'lib/wmq/constants_admin.rb',
- 'ext/wmq_structs.c',
- 'ext/wmq_reason.c',
- 'ext/Makefile',
- 'ext/*.o',
- 'ext/wmq.so',
- '*.gem',
- 'nbproject'
+ /lib.wmq.constants\.rb/,
+ /lib.wmq.constants_admin\.rb/,
+ /ext.wmq_structs\.c/,
+ /ext.wmq_reason\.c/,
+ /ext.Makefile/,
+ /ext.*\.o/,
+ /ext.wmq\.so/,
+ /\.gem$/,
+ /\.log$/,
+ /nbproject/
]
gemspec = Gem::Specification.new do |spec|
@@ -31,8 +33,8 @@ task :gem do |t|
spec.date = Date.today.to_s
spec.summary = "Native Ruby interface into WebSphere MQ"
spec.description = "RubyWMQ is a high performance native Ruby interface into WebSphere MQ."
- spec.files = FileList["./**/*"].exclude(*excludes).map{|f| f.sub(/^\.\//, '')} +
- ['.document']
+ spec.files = FileList["./**/*"].exclude(*excludes).map{|f| f.sub(/^\.\//, '')} + ['.document']
+ spec.license = "Apache License V2.0"
spec.extensions << 'ext/extconf.rb'
spec.rubyforge_project = 'rubywmq'
spec.test_file = 'tests/test.rb'
@@ -41,7 +43,8 @@ task :gem do |t|
spec.add_development_dependency 'shoulda'
spec.requirements << 'WebSphere MQ v5.3, v6 or v7 Client or Server with Development Kit'
end
- Gem::Builder.new(gemspec).build
+ p gemspec.files
+ Gem::Package.build gemspec
end
desc "Build a binary gem including pre-compiled binary files for re-distribution"
@@ -66,14 +69,15 @@ task :binary do |t|
Dir['doc/**/*.*'] +
Dir['lib/**/*.rb'] +
['lib/wmq/wmq.so', 'tests/test.rb', 'README', 'LICENSE']
+ spec.license = "Apache License V2.0"
spec.rubyforge_project = 'rubywmq'
spec.test_file = 'tests/test.rb'
spec.has_rdoc = false
spec.required_ruby_version = '>= 1.8.4'
spec.add_development_dependency 'shoulda'
spec.requirements << 'WebSphere MQ v5.3, v6 or v7 Client or Server with Development Kit'
end
- Gem::Builder.new(gemspec).build
+ Gem::Package.build gemspec
end
desc "Run Test Suite"
View
@@ -11,7 +11,9 @@
dir_config('mqm', include_path, '.')
else
include_path = '/opt/mqm/inc'
- #dir_config('mqm', include_path, '/opt/mqm/lib')
+ lib64_path = '/opt/mqm/lib64'
+ lib_path = File.directory?(lib64_path) ? lib64_path : '/opt/mqm/lib'
+ dir_config('mqm', include_path, lib_path)
end
have_header('cmqc.h')
View
@@ -412,8 +412,8 @@ VALUE QueueManager_connect(VALUE self)
}
pqm->MQCONNX(
- RSTRING_PTR(name), /* queue manager */
- &pqm->connect_options, /* Connection Options */
+ RSTRING_PTR(name), /* queue manager */
+ &pqm->connect_options, /* connection options */
&pqm->hcon, /* connection handle */
&pqm->comp_code, /* completion code */
&pqm->reason_code); /* connect reason code */
View
@@ -1,3 +1,3 @@
module WMQ #:nodoc
- VERSION = "2.0.0"
+ VERSION = "2.0.2"
end

0 comments on commit 1777ffa

Please sign in to comment.