server version
This commit is contained in:
parent
c47b10c952
commit
9ab05ec43e
@ -34,7 +34,7 @@ config[:report_dir_v2] = File.expand_path(File.join(config[:devops_home], "repor
|
|||||||
run Rack::URLMap.new({
|
run Rack::URLMap.new({
|
||||||
"#{config[:url_prefix]}/v2.0" => DevopsService.new(config),
|
"#{config[:url_prefix]}/v2.0" => DevopsService.new(config),
|
||||||
"#{config[:url_prefix]}/client" => Client.new(config),
|
"#{config[:url_prefix]}/client" => Client.new(config),
|
||||||
"#{config[:url_prefix]}/v2.0/report" => Report.new(config, "v2"),
|
"#{config[:url_prefix]}/v2.0/report" => ReportRoutes.new(config, "v2"),
|
||||||
"#{config[:url_prefix]}/sidekiq" => Sidekiq::Web,
|
"#{config[:url_prefix]}/sidekiq" => Sidekiq::Web,
|
||||||
"#{config[:url_prefix]}/version" => DevopsVersion.new
|
"#{config[:url_prefix]}/version" => DevopsVersion.new
|
||||||
})
|
})
|
||||||
|
|||||||
@ -364,7 +364,7 @@ class MongoConnector
|
|||||||
|
|
||||||
def save_report r
|
def save_report r
|
||||||
r.created_at = Time.new
|
r.created_at = Time.new
|
||||||
@reports.insert(r.to_hash)
|
@reports.insert(r.to_mongo_hash)
|
||||||
end
|
end
|
||||||
|
|
||||||
def reports
|
def reports
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
require 'sinatra/base'
|
require 'sinatra/base'
|
||||||
|
|
||||||
class Report< Sinatra::Base
|
class ReportRoutes < Sinatra::Base
|
||||||
|
|
||||||
def initialize config, version
|
def initialize config, version
|
||||||
super()
|
super()
|
||||||
|
|||||||
10
devops-service/version.rb
Normal file
10
devops-service/version.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
require 'sinatra/base'
|
||||||
|
|
||||||
|
class DevopsVersion < Sinatra::Base
|
||||||
|
|
||||||
|
VERSION = "2.0.1"
|
||||||
|
|
||||||
|
get "/" do
|
||||||
|
VERSION
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue
Block a user