ferocia-rubywmq 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Rakefile +11 -0
  2. data/ext/extconf.rb +3 -2
  3. data/lib/wmq.rb +17 -11
  4. data/lib/wmq/version.rb +1 -1
  5. metadata +15 -2
data/Rakefile CHANGED
@@ -42,6 +42,17 @@ task :gem do |t|
42
42
  spec.required_ruby_version = '>= 1.8.4'
43
43
  spec.add_development_dependency 'shoulda'
44
44
  spec.requirements << 'WebSphere MQ v5.3, v6 or v7 Client or Server with Development Kit'
45
+
46
+ if RUBY_PLATFORM =~ /darwin/
47
+ spec.post_install_message = <<-MESSAGE
48
+
49
+ ###########################################
50
+ * [rubywmq] The rubywmq gem cannot be installed on a mac as you need WMQ client libraries on the system.
51
+ * [rubywmq] Installation will complete successfully (so you can keep this gem in your bundles) but the gem will not function, you'll need stubs on a mac.
52
+ ###########################################
53
+
54
+ MESSAGE
55
+ end
45
56
  end
46
57
  p gemspec.files
47
58
  Gem::Builder.new(gemspec).build
data/ext/extconf.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  if RUBY_PLATFORM =~ /darwin/
2
- puts "[rubywmq] cannot be installed on a mac"
3
- puts "[rubywmq] installation will complete (so you can keep this gem in your bundles), but the gem will not function"
2
+ # do nothing on a mac, this is so people developing applications using this
3
+ # gem on a mac (using stubs for development) can still keep the gem in their
4
+ # Gemfile
4
5
 
5
6
  # create a blank Makefile to satisfy extension install requirements
6
7
  File.open("Makefile", "w") { |f| f << 'install:' }
data/lib/wmq.rb CHANGED
@@ -1,16 +1,22 @@
1
1
  require 'wmq/version'
2
- require 'wmq/constants'
3
- require 'wmq/constants_admin'
4
2
  require 'wmq/queue_manager'
5
3
  require 'wmq/message'
6
4
 
7
- # Load wmq using the auto-load library.
8
- #
9
- # If it fails, then it is most likely since this platform is not supported
10
- # by the auto load facility in Ruby WMQ, so try to load client linked library
11
- # For Example AIX does not support Autoload whereas Windows and Linux are supported
12
- begin
13
- require 'wmq/wmq'
14
- rescue LoadError
15
- require 'wmq/wmq_client'
5
+ unless RUBY_PLATFORM =~ /darwin/
6
+ # don't try and require any of these on a mac as they do not exist, they
7
+ # required the gem extensions to have been compiled.
8
+
9
+ require 'wmq/constants'
10
+ require 'wmq/constants_admin'
11
+
12
+ # Load wmq using the auto-load library.
13
+ #
14
+ # If it fails, then it is most likely since this platform is not supported
15
+ # by the auto load facility in Ruby WMQ, so try to load client linked library
16
+ # For Example AIX does not support Autoload whereas Windows and Linux are supported
17
+ begin
18
+ require 'wmq/wmq'
19
+ rescue LoadError
20
+ require 'wmq/wmq_client'
21
+ end
16
22
  end
data/lib/wmq/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module WMQ #:nodoc
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ferocia-rubywmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -87,7 +87,20 @@ files:
87
87
  homepage: https://github.com/reidmorrison/rubywmq
88
88
  licenses:
89
89
  - Apache License V2.0
90
- post_install_message:
90
+ post_install_message: ! '
91
+
92
+ ###########################################
93
+
94
+ * [rubywmq] The rubywmq gem cannot be installed on a mac as you need WMQ client
95
+ libraries on the system.
96
+
97
+ * [rubywmq] Installation will complete successfully (so you can keep this gem in
98
+ your bundles) but the gem will not function, you''ll need stubs on a mac.
99
+
100
+ ###########################################
101
+
102
+
103
+ '
91
104
  rdoc_options: []
92
105
  require_paths:
93
106
  - lib