lib/rack/traffic_signal/config.rb in rack-traffic-signal-0.1.3 vs lib/rack/traffic_signal/config.rb in rack-traffic-signal-0.1.4

- old
+ new

@@ -7,18 +7,22 @@ attr_reader :maintenance_group attr_accessor :internal_ips, :skip_paths, :default_status, :default_content_type, - :default_body + :default_body, + :secret_word, + :skip_proc, + :skip_with_warning_proc def initialize @internal_ips = [] @maintenance_group = { } @default_status = 503 @default_content_type = 'application/json' @default_body = '' + @secret_word = '' @skip_paths = [/^\/assets/] @maintenance_status_proc = ->{ [] } @skip_proc = ->(env){ false } @skip_with_warning_proc = ->(env){ false } end @@ -43,19 +47,11 @@ def skip_by(&block) @skip_proc = block end - def skip?(env) - @skip_proc.call(env) - end - def skip_with_warning_by(&block) @skip_with_warning_proc = block - end - - def skip_with_warning?(env) - @skip_with_warning_proc.call(env) end private def valid_maintenance_group?(mg) return false unless mg.is_a? Hash