From 690c59820568bedf38e8a9fd8cc890a85c49ba6b Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Wed, 14 Jan 2015 13:43:55 +0100 Subject: [PATCH] remove obsolete file --- lib/travis/api/app.rb | 1 - lib/travis/api/conditional_skylight.rb | 50 -------------------------- 2 files changed, 51 deletions(-) delete mode 100644 lib/travis/api/conditional_skylight.rb diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index cf4e3bc5..1bf44abe 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -20,7 +20,6 @@ require 'metriks/librato_metrics_reporter' require 'travis/support/log_subscriber/active_record_metrics' require 'fileutils' require 'travis/api/v2/http' -require 'travis/api/conditional_skylight' # Rack class implementing the HTTP API. # Instances respond to #call. diff --git a/lib/travis/api/conditional_skylight.rb b/lib/travis/api/conditional_skylight.rb deleted file mode 100644 index d4a2de37..00000000 --- a/lib/travis/api/conditional_skylight.rb +++ /dev/null @@ -1,50 +0,0 @@ -# if ENV['SKYLIGHT_AUTHENTICATION'] -# -# # require 'skylight/sinatra' -# # require 'tool/thread_local' -# # Skylight.start! -# # -# # module Travis -# # module Api -# # module ConditionalSkylight -# # FEATURES = Tool::ThreadLocal.new -# # CHECK_FREQUENCY = 120 -# # NOT_JSON = %r(\.(xml|png|txt|atom|svg)$) -# # -# # module Middleware -# # ::Skylight::Middleware.send(:prepend, self) -# # def call(env) -# # if ConditionalSkylight.track?(env) -# # super(env) -# # else -# # t { "skipping middleware (condition not met)".freeze } -# # @app.call(env) -# # end -# # end -# # end -# # -# # extend self -# # -# # def track?(env) -# # return false unless feature_active? :skylight -# # return false if feature_active? :skylight_json_only and env['PATH_INFO'.freeze] =~ NOT_JSON -# # true -# # end -# # -# # def feature_active?(feature) -# # last_clear = Time.now.to_i - FEATURES[:last_clear].to_i -# # -# # if last_clear > CHECK_FREQUENCY -# # FEATURES.clear -# # FEATURES[:last_clear] = Time.now.to_i -# # end -# # -# # FEATURES.fetch(feature) { FEATURES[feature] = Travis::Features.feature_active?(feature) } -# # end -# # end -# # end -# # end -# -# else -# Travis.logger.info('SKYLIGHT_AUTHENTICATION not set, skipping Skylight.') -# end