Skip to content

Commit

Permalink
MiscService -> AuthService
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Jan 13, 2016
1 parent 33f90aa commit 578d4d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Dnsimple
class Client
module Misc
module Auth

# Gets the information about the current authenticated context.
#
Expand Down
12 changes: 6 additions & 6 deletions lib/dnsimple/client/clients.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ def domains
@services[:domains] ||= Client::DomainsService.new(self)
end

# @return [Dnsimple::Client::MiscService] The miscellaneous-methods API proxy.
def misc
@services[:misc] ||= Client::MiscService.new(self)
# @return [Dnsimple::Client::AuthService] The authentication-methods API proxy.
def auth
@services[:auth] ||= Client::AuthService.new(self)
end

# @return [Dnsimple::Client::ZonesService] The zone-related API proxy.
Expand Down Expand Up @@ -55,10 +55,10 @@ class DomainsService < ClientService
end


require_relative 'misc'
require_relative 'auth'

class MiscService < ClientService
include Client::Misc
class AuthService < ClientService
include Client::Auth
end


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'spec_helper'

describe Dnsimple::Client, ".misc" do
describe Dnsimple::Client, ".auth" do

subject { described_class.new(api_endpoint: "https://api.dnsimple.test", access_token: "a1b2c3").misc }
subject { described_class.new(api_endpoint: "https://api.dnsimple.test", access_token: "a1b2c3").auth }


describe "#whoami" do
Expand Down

0 comments on commit 578d4d1

Please sign in to comment.