1+ # frozen_string_literal: true
2+
13require 'travis/config'
24require 'travis/support'
35require 'travis/listener/app'
@@ -14,12 +16,14 @@ def config
1416
1517 module Listener
1618 class Config < Travis ::Config
17- define redis : { url : ENV . fetch ( 'REDIS_URL' , 'redis://localhost:6379' ) , namespace : 'sidekiq' , network_timeout : 5 } ,
18- redis_gatekeeper : { url : ENV . fetch ( 'REDIS_GATEKEEPER_URL' , 'redis://localhost:6379' ) , namespace : 'sidekiq' , network_timeout : 5 } ,
19- gator : { queue : ENV . fetch ( 'SIDEKIQ_GATEKEEPER_QUEUE' , 'build_requests' ) } ,
20- sync : { queue : ENV . fetch ( 'SIDEKIQ_SYNC_QUEUE' , 'sync.gh_apps' ) } ,
21- sentry : { } ,
22- metrics : { reporter : 'librato' }
19+ define redis : { url : ENV . fetch ( 'REDIS_URL' , 'redis://localhost:6379' ) ,
20+ namespace : 'sidekiq' , network_timeout : 5 } ,
21+ redis_gatekeeper : { url : ENV . fetch ( 'REDIS_GATEKEEPER_URL' , 'redis://localhost:6379' ) ,
22+ namespace : 'sidekiq' , network_timeout : 5 } ,
23+ gator : { queue : ENV . fetch ( 'SIDEKIQ_GATEKEEPER_QUEUE' , 'build_requests' ) } ,
24+ sync : { queue : ENV . fetch ( 'SIDEKIQ_SYNC_QUEUE' , 'sync.gh_apps' ) } ,
25+ sentry : { } ,
26+ metrics : { reporter : 'librato' }
2327 end
2428
2529 class << self
@@ -28,11 +32,11 @@ def setup
2832 require 'raven'
2933 ::Raven . configure do |config |
3034 config . dsn = Travis . config . sentry . dsn
31- config . excluded_exceptions = %w{ Sinatra::NotFound }
35+ config . excluded_exceptions = %w[ Sinatra::NotFound ]
3236 end
3337 end
3438
35- Travis ::Metrics . setup if ENV [ 'RACK_ENV' ] == " production"
39+ Travis ::Metrics . setup if ENV . fetch ( 'RACK_ENV' , nil ) == ' production'
3640 end
3741
3842 def disconnect
0 commit comments