(QENG-2208) Move Sinatra Helpers to own file

This moves the inline Helpers contained in V1.rb to their own file:
helpers.rb. In making this change, any API.settings call was removed
from the helper method itself and passed through from V1.

This also adds tests for hostname shortener and validate date string.
This commit is contained in:
Colin 2015-04-15 10:44:31 -07:00
parent 86a3a7a4ba
commit ab990e2081
4 changed files with 188 additions and 137 deletions

View file

@ -30,7 +30,7 @@ module Vmpooler
use Vmpooler::Dashboard
# Load API components
%w( dashboard reroute v1 ).each do |lib|
%w( helpers dashboard reroute v1 ).each do |lib|
begin
require "api/#{lib}"
rescue LoadError