2014-12-15 14:26:54 +03:00
|
|
|
module Devops
|
|
|
|
|
module Version2_0
|
2014-12-22 14:22:04 +03:00
|
|
|
module Routes
|
2014-12-15 14:26:54 +03:00
|
|
|
module BootstrapTemplatesRoutes
|
2014-05-08 15:34:26 +04:00
|
|
|
|
2014-12-15 14:26:54 +03:00
|
|
|
extend BootstrapTemplatesCommands
|
2014-07-08 11:48:23 +04:00
|
|
|
|
2014-12-15 14:26:54 +03:00
|
|
|
def self.registered(app)
|
2014-05-08 15:34:26 +04:00
|
|
|
|
2014-12-22 14:22:04 +03:00
|
|
|
app.before "/templates" do
|
|
|
|
|
check_headers :accept
|
|
|
|
|
check_privileges("templates", "r")
|
2015-01-26 15:02:58 +03:00
|
|
|
# broadcast(:cancel_order_failed, "hello")
|
2014-12-22 14:22:04 +03:00
|
|
|
end
|
|
|
|
|
|
2014-12-15 14:26:54 +03:00
|
|
|
# Get list of available bootstrap templates
|
|
|
|
|
#
|
|
|
|
|
# * *Request*
|
|
|
|
|
# - method : GET
|
|
|
|
|
# - headers :
|
|
|
|
|
# - Accept: application/json
|
|
|
|
|
#
|
|
|
|
|
# * *Returns* : array of strings
|
|
|
|
|
# [
|
|
|
|
|
# "omnibus"
|
|
|
|
|
# ]
|
2014-12-22 14:22:04 +03:00
|
|
|
app.get "/templates", &Devops::Version2_0::Handler::BootstrapTemplates.get_bootstrap_templates
|
2014-12-15 14:26:54 +03:00
|
|
|
|
|
|
|
|
puts "Bootstrap templates routes initialized"
|
|
|
|
|
end
|
2014-05-08 15:34:26 +04:00
|
|
|
|
2014-12-15 14:26:54 +03:00
|
|
|
end
|
|
|
|
|
end
|
2014-05-08 15:34:26 +04:00
|
|
|
end
|
|
|
|
|
end
|