Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing to exclude subdomains by a regular expression #367

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

kelvinst
Copy link

I was with this problem, there is a set of subdomains that start with "staging-pr-" then a number and I couldn't do nothing besides generating a huge array from "staging-pr-1" to "staging-pr-9999", and even with this, when I get more then 9999 pull requests on my app, it would stop to work.

So, I implemented to match the excluded subdomain if it is a regexp. The way I made you can even mix them with strings.

Thank you!

@kelvinst kelvinst force-pushed the excluded_subdomains_regex branch from ccdcb52 to 193ca97 Compare September 24, 2016 21:40
expect(described_class.excluded_subdomain?("cereal")).to eq(true)
expect(described_class.excluded_subdomain?("flakes")).to eq(false)

described_class.excluded_subdomains = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use after:

after { described_class.excluded_subdomains = nil }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants