gocardless/gocardless-ruby — pull request #26 by timcraft (2012-10-23 15:41:12+00:00)
Title: Environment variables for client app_id and app_secret

So best practice for storing credentials for external services within an app is to use environment variables, as described nicely here: http://www.12factor.net/config

Using this technique to store GoCardless credentials is currently very verbose. This change adds support for defaulting to environment variables if app_id and app_secret options were not specified explicitly.

Before:

```ruby
GoCardless::Client.new(app_id: ENV['GOCARDLESS_APP_ID'], app_secret: ENV['GOCARDLESS_APP_SECRET'])
```

After:

```ruby
GoCardless::Client.new
```

Alternative naming could be GOCARDLESS_CLIENT_ID and GOCARDLESS_CLIENT_SECRET, not sure what your preferences are on that.

Cheers,
Tim