[SCM] ci-tooling packaging branch, master, updated. 35277096009b100c57e0ab254be94b0a2e2756f2
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Mon Dec 7 12:57:51 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=3527709
The following commit has been merged in the master branch:
commit 35277096009b100c57e0ab254be94b0a2e2756f2
Author: Harald Sitter <sitter at kde.org>
Date: Mon Dec 7 13:48:20 2015 +0100
reduce get complexity by splitting it into get and get_through_token
---
lib/lp.rb | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/lp.rb b/lib/lp.rb
index 324e967..4ccff25 100644
--- a/lib/lp.rb
+++ b/lib/lp.rb
@@ -114,11 +114,8 @@ module Launchpad
token
end
- # HTTP GET. Possibly via token.
- # @note Thread safe
- # @param uri [URI] to get
- # @return [String] body of response
- def self.get(uri)
+ # @!visibility private
+ def self.get_through_token(uri)
if (token = Launchpad.token)
# Token internally URIfies again without checking if it already has
# a URI, so simply give it a string...
@@ -130,6 +127,14 @@ module Launchpad
return response.body
end
end
+ end
+
+ # HTTP GET. Possibly via token.
+ # @note Thread safe
+ # @param uri [URI] to get
+ # @return [String] body of response
+ def self.get(uri)
+ return get_through_token if Launchpad.token
# Set cache control.
# Launchpad employs server-side caching, which is nice but for our purposes
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list