Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Fixes #6 Special Thank you to ekaranto and tommeier for the elegant s…
Browse files Browse the repository at this point in the history
…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
reidmorrison committed May 30, 2013
1 parent d36a65d commit 1777ffa
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
@@ -0,0 +1 @@
rubywmq
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
ruby-2.0.0
30 changes: 17 additions & 13 deletions Rakefile
Expand Up @@ -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'
Expand All @@ -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|
Expand All @@ -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'
Expand All @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion ext/extconf.rb
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions ext/wmq_queue_manager.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/wmq/version.rb
@@ -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.