vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb
# Collect the Rails::Info into an associative array as well as the list of plugins
Collect the Rails::Info into an associative array as well as the list of plugins
Collect the Rails :: Info into an associative array as well as the list of plugins
def gather_info
      i = []
      begin 
        require 'builtin/rails_info/rails/info'
        i += Rails::Info.properties
      rescue Exception => e
        log.debug "Unable to get the Rails info: #{e.inspect}"
        log.debug e.backtrace.join("\n")
      end
      plugins = Dir[File.join(File.expand_path(__FILE__+"/../../../../.."),"/*")].collect { |p| File.basename p }
      i << ['Plugin List', plugins]
      rev_file = File.expand_path(File.join(RAILS_ROOT, "REVISION"))
      if File.readable?(rev_file) && File.size(rev_file) < 64
        File.open(rev_file) { | file | i << ['Revision', file.read] } rescue nil
      end
      i
    end
def gather_info i = [ ] begin require 'builtin/rails_info/rails/info' i += Rails :: Info . properties rescue Exception => e log . debug "Unable to get the Rails info: #{e.inspect}" log . debug e . backtrace . join ( "\n" ) end plugins = Dir [ File . join ( File . expand_path ( __FILE__ + "/../../../../.." ) , "/*" ) ] . collect { | p | File . basename p } i << [ 'Plugin List' , plugins ] rev_file = File . expand_path ( File . join ( RAILS_ROOT , "REVISION" ) ) if File . readable? ( rev_file ) && File . size ( rev_file ) < 64 File . open ( rev_file ) { | file | i << [ 'Revision' , file . read ] } rescue nil end i end
Collect the Rails::Info into an associative array as well as the list of plugins
Collect the Rails :: Info into an associative array as well as the list of plugins
# Would like to get this from config, but how? # Look for a capistrano file indicating the current revision: