diff options
Diffstat (limited to 'lib/bitbucket')
-rw-r--r-- | lib/bitbucket/client.rb | 4 | ||||
-rw-r--r-- | lib/bitbucket/connection.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/bitbucket/client.rb b/lib/bitbucket/client.rb index 5c2ef2a4509..f8ee7e0f9ae 100644 --- a/lib/bitbucket/client.rb +++ b/lib/bitbucket/client.rb @@ -1,5 +1,7 @@ module Bitbucket class Client + attr_reader :connection + def initialize(options = {}) @connection = Connection.new(options) end @@ -48,8 +50,6 @@ module Bitbucket private - attr_reader :connection - def get_collection(path, type) paginator = Paginator.new(connection, path, type) Collection.new(paginator) diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb index c150a20761e..7e55cf4deab 100644 --- a/lib/bitbucket/connection.rb +++ b/lib/bitbucket/connection.rb @@ -4,6 +4,8 @@ module Bitbucket DEFAULT_BASE_URI = 'https://api.bitbucket.org/' DEFAULT_QUERY = {} + attr_reader :expires_at, :expires_in, :refresh_token, :token + def initialize(options = {}) @api_version = options.fetch(:api_version, DEFAULT_API_VERSION) @base_uri = options.fetch(:base_uri, DEFAULT_BASE_URI) @@ -38,8 +40,6 @@ module Bitbucket private - attr_reader :expires_at, :expires_in, :refresh_token, :token - def client @client ||= OAuth2::Client.new(provider.app_id, provider.app_secret, options) end |