Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
use Castle::Client instead of Castle::API
Browse files Browse the repository at this point in the history
  • Loading branch information
nijikon committed Feb 28, 2018
1 parent 864aba9 commit e6ad9fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/castle/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def log(level, message)

def track(context, options)
log(:debug, "[Castle] Tracking #{options[:name]}")
castle = ::Castle::API.new(context, options)
castle = ::Castle::Client.new(context, options)
castle.track(options)
rescue Castle::Error => e
log(:warn, "[Castle] Can't send tracking request because #{e} exception")
Expand Down
2 changes: 1 addition & 1 deletion spec/castle/middleware_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
describe '::track' do
let(:api) { spy }

before { allow(::Castle::API).to receive(:new).and_return(api) }
before { allow(::Castle::Client).to receive(:new).and_return(api) }

context 'when request raises exception' do
before do
Expand Down

0 comments on commit e6ad9fd

Please sign in to comment.