Skip to content

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