modern_times 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -58,13 +58,14 @@ module ModernTimes
58
58
  @@worker_instances.each do |worker|
59
59
  if worker.kind_of?(Worker) && ModernTimes::JMS.same_destination?(@producer_options, worker.class.destination_options)
60
60
  ModernTimes.logger.debug "Dummy publishing #{object} to #{worker}"
61
+ worker.message = OpenStruct.new(:jms_message_id => @@message_id.to_s)
61
62
  worker.perform(object)
62
63
  end
63
64
  end
64
65
  if correlation_id = props[:jms_correlation_id]
65
66
  @@dummy_cache[correlation_id] = object
66
67
  end
67
- return @@message_id
68
+ return @@message_id.to_s
68
69
  end
69
70
 
70
71
  def to_s
@@ -72,6 +73,7 @@ module ModernTimes
72
73
  end
73
74
 
74
75
  def self.setup_dummy_publishing(workers)
76
+ require 'ostruct'
75
77
  @@message_id = 0
76
78
  @@dummy_cache = {}
77
79
  @@worker_instances = workers.map {|worker| worker.new}
@@ -32,7 +32,8 @@ module ModernTimes
32
32
  module Worker
33
33
  include ModernTimes::Base::Worker
34
34
 
35
- attr_reader :session, :message, :message_count
35
+ attr_reader :session, :message_count
36
+ attr_accessor :message
36
37
 
37
38
  module ClassMethods
38
39
  def create_supervisor(manager, worker_options)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: modern_times
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.7
5
+ version: 0.2.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brad Pardee