resque-bus 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/resque-bus.rb +2 -2
- data/lib/resque_bus/version.rb +1 -1
- metadata +1 -1
data/lib/resque-bus.rb
CHANGED
@@ -135,8 +135,8 @@ module ResqueBus
|
|
135
135
|
bus_attr = {"bus_published_at" => Time.now.to_i, "created_at" => Time.now.to_i, "bus_event_type" => event_type}
|
136
136
|
bus_attr["bus_id"] = "#{Time.now.to_i}-#{generate_uuid}"
|
137
137
|
bus_attr["bus_app_hostname"] = hostname
|
138
|
-
bus_attr["bus_locale"] = I18n.locale
|
139
|
-
bus_attr["bus_timezone"] = Time.zone.name
|
138
|
+
bus_attr["bus_locale"] = I18n.locale.to_s if defined?(I18n) && I18n.respond_to?(:locale)
|
139
|
+
bus_attr["bus_timezone"] = Time.zone.name if defined?(Time) && Time.respond_to?(:zone)
|
140
140
|
bus_attr.merge(attributes || {})
|
141
141
|
end
|
142
142
|
|
data/lib/resque_bus/version.rb
CHANGED