Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Platform support for Linux

  • Loading branch information...
commit e6837de2e26c95bb2e2588317109f5f67e9f9bbe 1 parent 6d309d3
@snscaimito authored
View
1  Gemfile.lock
@@ -14,6 +14,7 @@ GEM
rspec-mocks (2.7.0)
PLATFORMS
+ ruby
x86-mingw32
DEPENDENCIES
View
11 lib/rmq/mqclient.rb
@@ -3,7 +3,16 @@ module MQClient
include Constants
extend FFI::Library
- ffi_lib "mqic32.dll"
+ def MQClient.running_on_windows?
+ (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
+ end
+
+ def MQClient.running_on_linux?
+ RUBY_PLATFORM.include?("linux")
+ end
+
+ ffi_lib "mqic32.dll" if running_on_windows?
+ ffi_lib "libmqic" if running_on_linux?
ffi_convention :stdcall
attach_function :mqconn, :MQCONN,
View
4 spec/rmq/queue_manager_spec.rb
@@ -12,10 +12,6 @@
@qm.disconnect if !@qm.nil?
end
- it 'should pass the canary test' do
- true.should == true
- end
-
it 'should connect/disconnect to/from local queue manager' do
@qm = RMQ::QueueManager::connect(SpecHelper::DATA[:queue_manager])
@qm.should_not be_nil
Please sign in to comment.
Something went wrong with that request. Please try again.