resque-bus 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/resque-bus.rb +9 -2
- data/lib/resque_bus/version.rb +1 -1
- metadata +3 -2
data/lib/resque-bus.rb
CHANGED
@@ -138,9 +138,16 @@ module ResqueBus
|
|
138
138
|
original_timezone = false
|
139
139
|
original_locale = false
|
140
140
|
|
141
|
-
|
142
|
-
|
141
|
+
if attributes["bus_locale"] && defined?(I18n) && I18n.respond_to?(:locale=)
|
142
|
+
original_locale = I18n.locale if I18n.respond_to?(:locale)
|
143
|
+
I18n.locale = attributes["bus_locale"]
|
144
|
+
end
|
143
145
|
|
146
|
+
if attributes["bus_timezone"] && defined?(Time) && Time.respond_to?(:zone=)
|
147
|
+
original_timezone = Time.zone if Time.respond_to?(:zone)
|
148
|
+
Time.zone = attributes["bus_timezone"]
|
149
|
+
end
|
150
|
+
|
144
151
|
yield
|
145
152
|
ensure
|
146
153
|
I18n.locale = original_locale unless original_locale == false
|
data/lib/resque_bus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: resque
|
@@ -233,3 +233,4 @@ test_files:
|
|
233
233
|
- spec/subscriber_spec.rb
|
234
234
|
- spec/subscription_list_spec.rb
|
235
235
|
- spec/subscription_spec.rb
|
236
|
+
has_rdoc:
|