lib/circuitbox.rb in circuitbox-2.0.0.pre1 vs lib/circuitbox.rb in circuitbox-2.0.0.pre2

- old
+ new

@@ -10,14 +10,10 @@ class Circuitbox class << self include Configuration - def [](service_name, options = {}) - circuit(service_name, options) - end - - def circuit(service_name, options = {}) + def circuit(service_name, options) circuit = (cached_circuits[service_name] ||= CircuitBreaker.new(service_name, options)) return circuit unless block_given? circuit.run(circuitbox_exceptions: false) { yield }