Class: Honeybadger::Util::Revision Private

Inherits:
Object
  • Object
show all
Defined in:
lib/honeybadger/util/revision.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.detect(root = Dir.pwd) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
8
9
10
11
12
13
14
# File 'lib/honeybadger/util/revision.rb', line 5

def detect(root = Dir.pwd)
  revision = from_heroku ||
    from_capistrano(root) ||
    from_git

  revision = revision.to_s.strip
  return unless revision =~ /\S/

  revision
end