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
module App
class << self
attr_reader :version
def env
ENV['RACK_ENV'] || 'development'
end
@ -15,6 +13,4 @@ module App
Pathname.pwd
end
end
@version = `git rev-parse --short HEAD 2>/dev/null`.strip!
end

View File

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

View File

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