diff options
author | José Valim <jose.valim@gmail.com> | 2009-10-15 18:51:51 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-10-15 18:51:51 -0300 |
commit | 2d7abe245e7a2b1717e48ef550e4083318fd7ec2 (patch) | |
tree | 0de135e1a3c5dadb3f6e1c5457832e6ef81bb834 /activesupport/lib | |
parent | 5988b87c30eb0ce50c235187f5dfcfcfb98da01b (diff) | |
download | rails-2d7abe245e7a2b1717e48ef550e4083318fd7ec2.tar.gz rails-2d7abe245e7a2b1717e48ef550e4083318fd7ec2.tar.bz2 rails-2d7abe245e7a2b1717e48ef550e4083318fd7ec2.zip |
Renamed Orchestra to Notifications once again [#3321 state:resolved]
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/notifications.rb (renamed from activesupport/lib/active_support/orchestra.rb) | 26 |
3 files changed, 15 insertions, 15 deletions
diff --git a/activesupport/lib/active_support/autoload.rb b/activesupport/lib/active_support/autoload.rb index fa657ac99a..63f7338a68 100644 --- a/activesupport/lib/active_support/autoload.rb +++ b/activesupport/lib/active_support/autoload.rb @@ -18,9 +18,9 @@ module ActiveSupport autoload :MessageVerifier, 'active_support/message_verifier' autoload :Multibyte, 'active_support/multibyte' autoload :OptionMerger, 'active_support/option_merger' - autoload :Orchestra, 'active_support/orchestra' autoload :OrderedHash, 'active_support/ordered_hash' autoload :OrderedOptions, 'active_support/ordered_options' + autoload :Notifications, 'active_support/notifications' autoload :Rescuable, 'active_support/rescuable' autoload :SecureRandom, 'active_support/secure_random' autoload :StringInquirer, 'active_support/string_inquirer' diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index a2717499e7..818983fdd6 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -256,7 +256,7 @@ module ActiveSupport if self.class.instrument payload = { :key => key } payload.merge!(options) if options.is_a?(Hash) - ActiveSupport::Orchestra.instrument(:"cache_#{operation}", payload, &block) + ActiveSupport::Notifications.instrument(:"cache_#{operation}", payload, &block) else yield end diff --git a/activesupport/lib/active_support/orchestra.rb b/activesupport/lib/active_support/notifications.rb index 5f57127401..7e9ffca13f 100644 --- a/activesupport/lib/active_support/orchestra.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -3,10 +3,10 @@ require 'active_support/core_ext/module/delegation' require 'active_support/core_ext/module/attribute_accessors' module ActiveSupport - # Orchestra provides an instrumentation API for Ruby. To instrument an action - # in Ruby you just need to do: + # Notifications provides an instrumentation API for Ruby. To instrument an + # action in Ruby you just need to do: # - # ActiveSupport::Orchestra.instrument(:render, :extra => :information) do + # ActiveSupport::Notifications.instrument(:render, :extra => :information) do # render :text => "Foo" # end # @@ -15,39 +15,39 @@ module ActiveSupport # # @events = [] # - # ActiveSupport::Orchestra.subscribe do |event| + # ActiveSupport::Notifications.subscribe do |event| # @events << event # end # - # ActiveSupport::Orchestra.instrument(:render, :extra => :information) do + # ActiveSupport::Notifications.instrument(:render, :extra => :information) do # render :text => "Foo" # end # # event = @events.first - # event.class #=> ActiveSupport::Orchestra::Event + # event.class #=> ActiveSupport::Notifications::Event # event.name #=> :render # event.duration #=> 10 (in miliseconds) # event.result #=> "Foo" # event.payload #=> { :extra => :information } # - # When subscribing to Orchestra, you can pass a pattern, to only consume + # When subscribing to Notifications, you can pass a pattern, to only consume # events that match the pattern: # - # ActiveSupport::Orchestra.subscribe(/render/) do |event| + # ActiveSupport::Notifications.subscribe(/render/) do |event| # @render_events << event # end # - # Orchestra ships with a queue implementation that consumes and publish events + # Notifications ships with a queue implementation that consumes and publish events # to subscribers in a thread. You can use any queue implementation you want. # - module Orchestra + module Notifications mattr_accessor :queue class << self delegate :instrument, :to => :instrumenter def instrumenter - Thread.current[:orchestra_instrumeter] ||= Instrumenter.new(publisher) + Thread.current[:notifications_instrumeter] ||= Instrumenter.new(publisher) end def publisher @@ -119,7 +119,7 @@ module ActiveSupport end end - # This is a default queue implementation that ships with Orchestra. It + # This is a default queue implementation that ships with Notifications. It # consumes events in a thread and publish them to all registered subscribers. # class LittleFanout @@ -167,5 +167,5 @@ module ActiveSupport end end - Orchestra.queue = Orchestra::LittleFanout.new + Notifications.queue = Notifications::LittleFanout.new end |