Skip to content

Instantly share code, notes, and snippets.

@inopinatus
Last active November 2, 2017 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inopinatus/adf2f7a20c58da4279ff to your computer and use it in GitHub Desktop.
Save inopinatus/adf2f7a20c58da4279ff to your computer and use it in GitHub Desktop.
Stethoscope.url = "/stethoscope_myapp_ae53unit"
Stethoscope.check :database do |resp|
resp[:last_migration] = ActiveRecord::Migrator.current_version
resp[:pg_version] = ActiveRecord::Base.connection.select_value('SELECT version()')
end
Stethoscope.check :release do |resp|
resp[:version] = "#{MyApp.config.version} (#{Rails.env})"
resp[:git_revision] = `git rev-parse HEAD`.chomp
end
uname = `uname -a`.chomp
Stethoscope.check :platform do |resp|
resp[:ruby] = RUBY_DESCRIPTION
resp[:rails] = Rails::version
resp[:linux] = uname
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment