mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-10-29 23:32:35 +01:00
Remove app version
This commit is contained in:
parent
40b4e39465
commit
b05ed02b5e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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', '*'
|
||||
|
Loading…
Reference in New Issue
Block a user