mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-24 20:15:15 +01:00
26 lines
374 B
Ruby
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
|