lib/logjam_agent/railtie.rb in logjam_agent-0.24.2 vs lib/logjam_agent/railtie.rb in logjam_agent-0.24.3

- old
+ new

@@ -68,10 +68,11 @@ LogjamAgent.forwarding_error_logger = forwarding_error_logger # ignore asset requests in development LogjamAgent.ignore_asset_requests = Rails.env.development? - LogjamAgent.application_revision = `git rev-parse HEAD 2>/dev/null`.chomp rescue "" + revision_file = File.join(app.root, 'REVISION') + LogjamAgent.application_revision = File.exist?(revision_file) ? File.read(revision_file) : `git rev-parse HEAD 2>/dev/null`.chomp rescue "" # disable logjam request forwarding by default in test environment LogjamAgent.disable! if Rails.env.test? # patch controller testing to create a logjam request, because middlewares aren't executed