lib/switchman/shackles.rb in switchman-1.6.1 vs lib/switchman/shackles.rb in switchman-1.7.0
- old
+ new
@@ -9,10 +9,10 @@
# Shackles' implementation.
def activate!(environment)
environment ||= :master
activated_environments << environment
old_environment = self.environment
- @environment = environment
+ Thread.current[:shackles_environment] = environment
old_environment
end
# since activate! really is just a variable swap now, it's safe to use in
# the ensure block, simplifying the implementation