summaryrefslogtreecommitdiff
path: root/lib/bitbucket/connection.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-02-27 12:30:26 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-02-27 12:30:26 +0000
commit729d2ea04d24c068519515a4df6d4c38f25cd229 (patch)
tree57048bfd961acd44b0f278daf215b6e141fbd021 /lib/bitbucket/connection.rb
parentf95d46c9d22603445fc7b8247df1120eaed67cd1 (diff)
parentc425f366bfa84efab92b5d5e1d0721f16a2890bc (diff)
downloadgitlab-ce-729d2ea04d24c068519515a4df6d4c38f25cd229.tar.gz
Merge branch 'master' into ci-tables-ui-improvementsci-tables-ui-improvements
* master: (196 commits) Add quotes to coverage pattern Update CHANGELOG.md Bump omniauth to 1.4.2 Bump Hashie to 3.5.5 to eliminate warning noise use single backticks for inline code Add performance query regression fix for !9088 affecting #27267 Fix spec API: Return 400 for all validation erros in the mebers API Adds confirmation for cancel button Add newline Corrected indentation on the template string Adds backoff algo from EE to CE We don't need these checks anymore Raise error when no content is provided Address review Update API v3 in line with v4 Fix new offenses Fix spec Fix specs Rename commit_file, commit_dir and remove_file and update specs ...
Diffstat (limited to 'lib/bitbucket/connection.rb')
-rw-r--r--lib/bitbucket/connection.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb
index 7e55cf4deab..b9279c33f5b 100644
--- a/lib/bitbucket/connection.rb
+++ b/lib/bitbucket/connection.rb
@@ -1,8 +1,8 @@
module Bitbucket
class Connection
- DEFAULT_API_VERSION = '2.0'
- DEFAULT_BASE_URI = 'https://api.bitbucket.org/'
- DEFAULT_QUERY = {}
+ DEFAULT_API_VERSION = '2.0'.freeze
+ DEFAULT_BASE_URI = 'https://api.bitbucket.org/'.freeze
+ DEFAULT_QUERY = {}.freeze
attr_reader :expires_at, :expires_in, :refresh_token, :token
@@ -24,9 +24,7 @@ module Bitbucket
response.parsed
end
- def expired?
- connection.expired?
- end
+ delegate :expired?, to: :connection
def refresh!
response = connection.refresh!