plugins.rb
277 Bytes
-
* Every class now can declare that it is able to inlcude hotspots by declaring 'acts_as_having_hotspots'. It's important to note that every class that have hotspots must define an instance method named 'environment' that returns the environment associated with the instance. * Now the enabled_plugins method is centralized in the Thread.current making the plugins instantiation happen only once by Thread. Every request reinstantiate the plugins since every request creates a new Thread. The models that access this method only instantiate it if it wasn't instantiated already. * Since the models doesn't reinstantiate the plugins in the same Thread and the tests run in only one Thread, the tests that have some plugin stuff must clean the instantiation in the teardown.