lib/field_test.rb in field_test-0.3.1 vs lib/field_test.rb in field_test-0.3.2
- old
+ new
@@ -28,9 +28,13 @@
def self.config
@config ||= YAML.load(ERB.new(File.read(config_path)).result)
end
+ def self.excluded_ips
+ @excluded_ips ||= Array(config["exclude"] && config["exclude"]["ips"]).map { |ip| IPAddr.new(ip) }
+ end
+
def self.exclude_bots?
config["exclude"] && config["exclude"]["bots"]
end
def self.cache