-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise an error if PERCY_TOKEN is set but PERCY_PROJECT is not.
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the
PERCY_TOKEN
variable specifically need to be set if theaccess_token
is manually configured as your documentation describes? This feels like it would raise errors in those cases where it shouldn't.Maybe I'm missing something about the different use cases for configuring Percy. I know it has to be flexible enough to work in various environments and continuous integration suites so I probably don't have all the context.
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gareth If you're using percy-capybara, it's currently not going to work without the environment variables set (the docs you linked to are for percy-client, a different gem, that needs a docs update).
Can you explain a little about your use case, describing the scenario where setting an environment variable doesn't work well for you please? I'd like to understand it better.
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timhaines There is another way to set the token in code by doing
Percy.config.access_token = 'foo'
. That's what @gareth is referencing.@gareth You bring up a good point, the current state of the gem requires the ENV vars to be set when really we should be flexible on that. It was just an oversight, not a specific design decision. Any chance you're interested in sending up a PR for that use case? Otherwise we're happy to take a look, would be great to get an issue filed to remind us.
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick replies, Tim and Mike. I'm happy to open an issue but I think I'd have to fiddle around more to be able to write a PR - as I mentioned it would take more knowledge of Percy's internals to understand the implications. I might try over the weekend though
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gareth no prob :) if this is blocking you from upgrading, I'm happy to take care of it quickly. Let me know what you think.
e0f019b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you chatted to @samjewell the other day and helped resolve the problem we were having. This issue was just something we discovered while post-mortem-ing the situation, trying to work out what specific dependencies the library had at different points. It's not blocking us at all