gitlabhq/lib/api.rb
Robert Speicher 7754189187 Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00

21 lines
403 B
Ruby

Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module Gitlab
class API < Grape::API
VERSION = 'v2'
version VERSION, using: :path
rescue_from ActiveRecord::RecordNotFound do
rack_response({'message' => '404 Not found'}.to_json, 404)
end
format :json
error_format :json
helpers APIHelpers
mount Users
mount Projects
mount Issues
end
end