Permalink
Browse files

Use Faraday.default_adapter instead of a constant.

  • Loading branch information...
1 parent 1d958db commit daacef35c91eba7ec85b3c495d5a29e4941511b3 @tylerhunt committed Jul 4, 2012
Showing with 3 additions and 5 deletions.
  1. +1 −2 lib/brewery_db/config.rb
  2. +1 −1 spec/brewery_db/client_spec.rb
  3. +1 −2 spec/brewery_db/config_spec.rb
View
@@ -2,7 +2,6 @@
module BreweryDB
class Config
- ADAPTER = Faraday.default_adapter
ENDPOINT = 'http://api.brewerydb.com/v2'
MIDDLEWARE = []
USER_AGENT = "BreweryDB Ruby Gem #{BreweryDB::VERSION}"
@@ -13,7 +12,7 @@ class Config
attr_accessor :user_agent
def initialize
- self.adapter = ADAPTER
+ self.adapter = Faraday.default_adapter
self.endpoint = ENDPOINT
self.user_agent = USER_AGENT
end
@@ -6,7 +6,7 @@
it { should be_a(BreweryDB::Config) }
- its(:adapter) { should == BreweryDB::Config::ADAPTER }
+ its(:adapter) { should == Faraday.default_adapter }
its(:api_key) { should == nil }
its(:endpoint) { should == BreweryDB::Config::ENDPOINT }
its(:user_agent) { should == BreweryDB::Config::USER_AGENT }
@@ -2,7 +2,6 @@
describe BreweryDB::Config do
{
- ADAPTER: Faraday.default_adapter,
ENDPOINT: 'http://api.brewerydb.com/v2',
USER_AGENT: "BreweryDB Ruby Gem #{BreweryDB::VERSION}"
}.each do |constant, value|
@@ -14,7 +13,7 @@
end
context 'defaults' do
- its(:adapter) { should == described_class::ADAPTER }
+ its(:adapter) { should == Faraday.default_adapter }
its(:api_key) { should == nil }
its(:endpoint) { should == described_class::ENDPOINT }
its(:user_agent) { should == described_class::USER_AGENT }

0 comments on commit daacef3

Please sign in to comment.