5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/integrity_metrics.rb', line 5
def self.registered(app)
Integrity::App.send :include, Integrity::AppExt
Integrity::Configuration.send :include, Integrity::ConfigExt
Integrity::Build.send :include, Integrity::BuildExt
Integrity::Builder.send :include, Integrity::BuilderExt
app.helpers Integrity::MetricsHelpers
app.get "/:project/metrics" do
login_required unless current_project.public?
metrics_directory = Integrity.config.metrics_directory || "metrics"
redirect "/#{metrics_directory}/#{current_project.permalink}/output/index.html"
end
Integrity.logger.info "Metrics loaded"
end
|