Module: Fiveruns::Tuneup::Instrumentation::ActionController::Base::InstanceMethods
- Defined in:
- lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
Instance Method Summary collapse
- #expire_fragment_with_fiveruns_tuneup(*args, &block) ⇒ Object
- #perform_action_with_fiveruns_tuneup(*args, &block) ⇒ Object
- #process_with_fiveruns_tuneup(request, response, *args, &block) ⇒ Object
- #write_fragment_with_fiveruns_tuneup(*args, &block) ⇒ Object
Instance Method Details
#expire_fragment_with_fiveruns_tuneup(*args, &block) ⇒ Object
48 49 50 51 52 |
# File 'lib/fiveruns/tuneup/instrumentation/action_controller/base.rb', line 48 def expire_fragment_with_fiveruns_tuneup(*args, &block) Fiveruns::Tuneup.step "Expire fragment cache", :controller do expire_fragment_without_fiveruns_tuneup(*args, &block) end end |
#perform_action_with_fiveruns_tuneup(*args, &block) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fiveruns/tuneup/instrumentation/action_controller/base.rb', line 22 def perform_action_with_fiveruns_tuneup(*args, &block) Fiveruns::Tuneup.run(self, request) do action = (request.parameters['action'] || 'index').to_s if Fiveruns::Tuneup.recording? Fiveruns::Tuneup.instrument_filters(self) Fiveruns::Tuneup.instrument_action_methods(self) Fiveruns::Tuneup.instrument_custom_methods end result = Fiveruns::Tuneup.step "Perform #{action.capitalize} action in #{self.class.name}", :controller, false do perform_action_without_fiveruns_tuneup(*args, &block) end end end |
#process_with_fiveruns_tuneup(request, response, *args, &block) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/fiveruns/tuneup/instrumentation/action_controller/base.rb', line 35 def process_with_fiveruns_tuneup(request, response, *args, &block) result = process_without_fiveruns_tuneup(request, response, *args, &block) if !request.xhr? && response.content_type && response.content_type.include?('html') && controller_name != 'tuneup' Fiveruns::Tuneup.(response) end result end |
#write_fragment_with_fiveruns_tuneup(*args, &block) ⇒ Object
43 44 45 46 47 |
# File 'lib/fiveruns/tuneup/instrumentation/action_controller/base.rb', line 43 def write_fragment_with_fiveruns_tuneup(*args, &block) Fiveruns::Tuneup.step "Cache fragment", :controller do write_fragment_without_fiveruns_tuneup(*args, &block) end end |