diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/autoload.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/orchestra.rb (renamed from activesupport/lib/active_support/notifications.rb) | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/autoload.rb b/activesupport/lib/active_support/autoload.rb index da12ecceca..a0fc2bb123 100644 --- a/activesupport/lib/active_support/autoload.rb +++ b/activesupport/lib/active_support/autoload.rb @@ -17,7 +17,7 @@ module ActiveSupport autoload :MessageVerifier, 'active_support/message_verifier' autoload :Multibyte, 'active_support/multibyte' autoload :OptionMerger, 'active_support/option_merger' - autoload :Notifications, 'active_support/notifications' + autoload :Orchestra, 'active_support/orchestra' autoload :OrderedHash, 'active_support/ordered_hash' autoload :OrderedOptions, 'active_support/ordered_options' autoload :Rescuable, 'active_support/rescuable' diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index e0f671f283..a415686020 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -247,7 +247,7 @@ module ActiveSupport payload = { :key => key } payload.merge!(options) if options.is_a?(Hash) - event = ActiveSupport::Notifications.instrument(:"cache_#{operation}", payload, &block) + event = ActiveSupport::Orchestra.instrument(:"cache_#{operation}", payload, &block) log("#{operation} (%.1fms)" % event.duration, key, options) event.result end diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/orchestra.rb index 6335686196..efe30669d8 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/orchestra.rb @@ -1,10 +1,10 @@ require 'thread' module ActiveSupport - # Notifications provides an instrumentation API for Ruby. To instrument an action + # Orchestra provides an instrumentation API for Ruby. To instrument an action # in Ruby you just need to: # - # ActiveSupport::Notifications.instrument(:render, :extra => :information) do + # ActiveSupport::Orchestra.instrument(:render, :extra => :information) do # render :text => "Foo" # end # @@ -12,23 +12,23 @@ module ActiveSupport # to push. You can even register an array: # # @listener = [] - # ActiveSupport::Notifications.register @listener + # ActiveSupport::Orchestra.register @listener # - # ActiveSupport::Notifications.instrument(:render, :extra => :information) do + # ActiveSupport::Orchestra.instrument(:render, :extra => :information) do # render :text => "Foo" # end # - # event #=> ActiveSupport::Notifications::Event + # event #=> ActiveSupport::Orchestra::Event # event.name #=> :render # event.duration #=> 10 (in miliseconds) # event.result #=> "Foo" # event.payload #=> { :extra => :information } # - # Notifications ships with a default listener implementation which puts events in + # Orchestra ships with a default listener implementation which puts events in # a stream and consume them in a Thread. This implementation is thread safe - # and is available at ActiveSupport::Notifications::Listener. + # and is available at ActiveSupport::Orchestra::Listener. # - module Notifications + module Orchestra @stacked_events = Hash.new { |h,k| h[k] = [] } @listeners = [] |