Skip to content

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

@croaky

Description

@croaky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions