lib/rack/throttle/limiters/limiter.rb in improved-rack-throttle-0.8.0 vs lib/rack/throttle/limiters/limiter.rb in improved-rack-throttle-0.9.0

- old
+ new

@@ -24,9 +24,10 @@ rules = options.delete(:rules) || {} @app, @options, @matchers = app, options, [] @matchers += Array(rules[:url]).map { |rule| UrlMatcher.new(rule) } if rules[:url] @matchers += Array(rules[:user_agent]).map { |rule| UserAgentMatcher.new(rule) } if rules[:user_agent] @matchers += Array(rules[:method]).map { |rule| MethodMatcher.new(rule) } if rules[:method] + @matchers += Array(rules[:basic_auth]).map { |rule| BasicAuthMatcher.new(rule) } if rules[:basic_auth] end ## # @param [Hash{String => String}] env # @return [Array(Integer, Hash, #each)]