sferik/twitter — pull request #338 by DanKnox (2012-12-30 02:26:39+00:00)
Title: Ensure credentials set in Twitter.configure are of a valid type.

This pull request adds basic credential validation when the credentials are set using the Twitter.configure block. If the credentials are not a string or symbol, a Twitter::Error::ConfigurationError is raised with a helpful message.

Whether or not this is worthy of being merged in is debatable, however it would have saved @saiko-chriskun $10 today. He had opened issue #336 and posted to the mailing list. Unfortunately, no one had noticed the syntax error in his code snippet before he had opened a bounty on [Bountify](https://bountify.co/twitter-gem-not-authenticating-correctly).

```ruby
Twitter.configure do |config|
config.consumer_key = ENV['TWITTER_KEY'], # Whoops a comma
config.consumer_secret = ENV['TWITTER_SECRET']
end
```

After this block was evaluated, the `config.consumer_secret` was set correctly, but the `config.consumer_key` received the result of that assignment along with the intended `ENV['TWITTER_KEY']` packaged up as a nice neat array.

```ruby
=> #