mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 11:02:30 +01:00
702f6ac9aa
- Removed yajl-ruby - Removed sinatra-jsonp - Inlined #halt_with_message - Added last_modified header to root path
24 lines
429 B
Ruby
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
|