Remove app version

This commit is contained in:
Hakan Ensari 2017-06-14 21:17:34 +01:00
parent 40b4e39465
commit b05ed02b5e
3 changed files with 1 additions and 11 deletions

View File

@ -5,8 +5,6 @@ require 'pathname'
# Encapsulates app configuration # Encapsulates app configuration
module App module App
class << self class << self
attr_reader :version
def env def env
ENV['RACK_ENV'] || 'development' ENV['RACK_ENV'] || 'development'
end end
@ -15,6 +13,4 @@ module App
Pathname.pwd Pathname.pwd
end end
end end
@version = `git rev-parse --short HEAD 2>/dev/null`.strip!
end end

View File

@ -53,8 +53,7 @@ get '*' do
end end
get '/' do get '/' do
etag App.version jsonp details: 'http://fixer.io'
jsonp details: 'http://fixer.io', version: App.version
end end
get '/latest' do get '/latest' do

View File

@ -71,11 +71,6 @@ describe 'the API' do
end end
end end
it 'returns an etag header' do
get '/'
headers['ETag'].wont_be_nil
end
it 'allows cross-origin requests' do it 'allows cross-origin requests' do
%w[/ /latest /2012-11-20].each do |path| %w[/ /latest /2012-11-20].each do |path|
header 'Origin', '*' header 'Origin', '*'