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

Invalid API key: (CopycopterClient::InvalidApiKey) #13

Open
croaky opened this issue Dec 15, 2011 · 1 comment
Open

Invalid API key: (CopycopterClient::InvalidApiKey) #13

croaky opened this issue Dec 15, 2011 · 1 comment

Comments

@croaky
Copy link
Contributor

croaky commented Dec 15, 2011

I want my config/initializers/copycopter.rb to look like this:

CopycopterClient.configure do |config|                      
  config.api_key = ENV['COPYCOPTER_API_KEY']                
end

In this particular instance, the reason is because I want to use Copycopter in an app that will soon be open sourced. However, I think it's cleaner in general to think in terms of having config variables as separate from the source code. Heroku provides them and you can use them locally with foreman in the .env file. However, the two cases that .env or config variables aren't available are in the test suite and during rake assets:precompile when deploying to Heroku. It'd be sweet if Copycopter just printed a warning instead of throwing an error, which blows up the deploy and makes for an unsatisfying end to a test run.

@croaky
Copy link
Contributor Author

croaky commented Jan 2, 2012

It's now possible to use ENV variables in Copycopter's config on Heroku. So, Copycopter is usable on Heroku except for the rake task, which still throws this error.

It also throws the error on every rails generate task and other items.

I would like to replace this error with a printed warning. Thoughts?

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

No branches or pull requests

1 participant