Created
November 24, 2014 14:20
-
-
Save hemalvarambhia/f067c2e8b49ea4ea7f5f to your computer and use it in GitHub Desktop.
Factory methods that provide a fluent interface to the NginxPrivilegeMatcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(ChefSpec) | |
def whitelist_requests_from(ip_addresses) | |
ChefSpec::Matchers::NginxPrivilegeMatcher.new(chef_run, ip_addresses, "allow") | |
end | |
def blacklist_requests_from(ip_addresses) | |
ChefSpec::Matchers::NginxPrivilegeMatcher.new(chef_run, ip_addresses, "deny") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment