Permalink
Browse files

Accept string keys for all options.

  • Loading branch information...
1 parent e08ebf7 commit 2e1288a192b914d67a953affbe45d5ff8bb63cc6 @treeder treeder committed Apr 4, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/iron_worker_ng/api_client.rb
@@ -21,11 +21,11 @@ def initialize(options = {})
@token = options[:token] || options['token']
@project_id = options[:project_id] || options['project_id']
- @scheme = options[:scheme] || 'https'
- @host = options[:host] || IronWorkerNG::APIClient::AWS_US_EAST_HOST
- @port = options[:port] || 443
- @api_version = options[:api_version] || 2
- @user_agent = options[:user_agent] || 'iron_worker_ng-' + IronWorkerNG.version
+ @scheme = options[:scheme] || options['scheme'] || 'https'
+ @host = options[:host] || options['host'] || IronWorkerNG::APIClient::AWS_US_EAST_HOST
+ @port = options[:port] || options['port'] || 443
+ @api_version = options[:api_version] || options['api_version'] || 2
+ @user_agent = options[:user_agent] || options['user_agent'] || 'iron_worker_ng-' + IronWorkerNG.version
@url = "#{scheme}://#{host}:#{port}/#{api_version}/"

0 comments on commit 2e1288a

Please sign in to comment.