class Twingly::HTTP::Heroku

Public Class Methods

app_name() click to toggle source
# File lib/twingly/heroku.rb, line 6
def self.app_name
  ENV.fetch("HEROKU_APP_NAME") { "unknown_heroku_app_name" }
end
dyno_id() click to toggle source
# File lib/twingly/heroku.rb, line 10
def self.dyno_id
  ENV.fetch("HEROKU_DYNO_ID") { "unknown_heroku_dyno_id" }
end
release_version() click to toggle source
# File lib/twingly/heroku.rb, line 18
def self.release_version
  ENV.fetch("HEROKU_RELEASE_VERSION") { "unknown_heroku_release_version" }
end
review_app?() click to toggle source
# File lib/twingly/heroku.rb, line 22
def self.review_app?
  parent_name = ENV.fetch("HEROKU_PARENT_APP_NAME") {}

  return false unless parent_name

  app_name               = ENV.fetch("HEROKU_APP_NAME") { "" }
  review_app_name_format = /\A#{parent_name}-pr-\d+\z/

  review_app_name_format.match?(app_name)
end
slug_commit() click to toggle source
# File lib/twingly/heroku.rb, line 14
def self.slug_commit
  ENV.fetch("HEROKU_SLUG_COMMIT") { "unknown_heroku_slug_commit" }
end