lib/deputy.rb in deputy-0.1.52 vs lib/deputy.rb in deputy-0.1.53
- old
+ new
@@ -98,10 +98,11 @@
end
end
end
def self.run_plugins(options={})
+ return if config['disabled']
start_time = Time.now.to_i
sleep_random_interval unless options[:no_wait]
content = get("/plugins.rb")
@@ -134,9 +135,10 @@
raise "separate #{group} with a ." unless group.split('.',2).size == 2
get "/notify?group=#{CGI.escape group}&value=#{CGI.escape value.to_s}", options
end
def self.get(path, options = {})
+ return if config['disabled']
url = "#{sheriff_url}#{path}"
url = "http://#{url}" unless url =~ %r{://}
options[:http_basic_authentication] = extract_auth_from_url!(url)
url = add_host_to_url(url, options.delete(:host))