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 /actionpack/lib/action_controller | |
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 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching/fragments.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/notifications.rb (renamed from actionpack/lib/action_controller/instrument.rb) | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 00fb55f843..8c1167d526 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -53,7 +53,7 @@ module ActionController #:nodoc: return content unless cache_configured? key = fragment_cache_key(key) - ActiveSupport::Orchestra.instrument(:write_fragment, :key => key) do + ActiveSupport::Notifications.instrument(:write_fragment, :key => key) do cache_store.write(key, content, options) end content @@ -64,7 +64,7 @@ module ActionController #:nodoc: return unless cache_configured? key = fragment_cache_key(key) - ActiveSupport::Orchestra.instrument(:read_fragment, :key => key) do + ActiveSupport::Notifications.instrument(:read_fragment, :key => key) do cache_store.read(key, options) end end @@ -74,7 +74,7 @@ module ActionController #:nodoc: return unless cache_configured? key = fragment_cache_key(key) - ActiveSupport::Orchestra.instrument(:fragment_exist?, :key => key) do + ActiveSupport::Notifications.instrument(:fragment_exist?, :key => key) do cache_store.exist?(key, options) end end @@ -101,7 +101,7 @@ module ActionController #:nodoc: key = fragment_cache_key(key) unless key.is_a?(Regexp) message = nil - ActiveSupport::Orchestra.instrument(:expire_fragment, :key => key) do + ActiveSupport::Notifications.instrument(:expire_fragment, :key => key) do if key.is_a?(Regexp) message = "Expired fragments matching: #{key.source}" cache_store.delete_matched(key, options) diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index 72551d1fd6..d46f528c7e 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -64,7 +64,7 @@ module ActionController #:nodoc: return unless perform_caching path = page_cache_path(path) - ActiveSupport::Orchestra.instrument(:expire_page, :path => path) do + ActiveSupport::Notifications.instrument(:expire_page, :path => path) do File.delete(path) if File.exist?(path) end end @@ -75,7 +75,7 @@ module ActionController #:nodoc: return unless perform_caching path = page_cache_path(path) - ActiveSupport::Orchestra.instrument(:cache_page, :path => path) do + ActiveSupport::Notifications.instrument(:cache_page, :path => path) do FileUtils.makedirs(File.dirname(path)) File.open(path, "wb+") { |f| f.write(content) } end diff --git a/actionpack/lib/action_controller/instrument.rb b/actionpack/lib/action_controller/notifications.rb index 2c87ed7391..4ec88193d5 100644 --- a/actionpack/lib/action_controller/instrument.rb +++ b/actionpack/lib/action_controller/notifications.rb @@ -1,6 +1,6 @@ -require 'active_support/orchestra' +require 'active_support/notifications' -ActiveSupport::Orchestra.subscribe(/(read|write|cache|expire|exist)_(fragment|page)\??/) do |event| +ActiveSupport::Notifications.subscribe(/(read|write|cache|expire|exist)_(fragment|page)\??/) do |event| if logger = ActionController::Base.logger human_name = event.name.to_s.humanize logger.info("#{human_name} (%.1fms)" % event.duration) |