frankfurter/config/app.rb
2015-12-30 19:52:02 +00:00

26 lines
374 B
Ruby

# frozen_string_literal: true
require 'logger'
require 'pathname'
# Encapsulates app configuration
module App
class << self
attr_reader :logger
def env
ENV['RACK_ENV'] || 'development'
end
def root
Pathname.pwd
end
def version
`git rev-parse --short HEAD 2>/dev/null`.strip!
end
end
@logger = Logger.new(STDOUT)
end