frankfurter/config/app.rb
Hakan Ensari 702f6ac9aa Refactor internals
- Removed yajl-ruby
- Removed sinatra-jsonp
- Inlined #halt_with_message
- Added last_modified header to root path
2016-04-24 17:15:02 +01:00

24 lines
429 B
Ruby

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