[SCM] ci-tooling packaging branch, master, updated. b899afe2189b4459db6228324de5d6317aecbd77
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Mon Dec 7 12:25:19 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=5eb5c7e
The following commit has been merged in the master branch:
commit 5eb5c7ef4c42bffd00515400cfecebf81135f6dc
Author: Harald Sitter <sitter at kde.org>
Date: Mon Dec 7 13:24:39 2015 +0100
bring down ABC complexity by using a general purpose flagging check
---
lib/debian/changelog.rb | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/debian/changelog.rb b/lib/debian/changelog.rb
index 6401409..6030915 100644
--- a/lib/debian/changelog.rb
+++ b/lib/debian/changelog.rb
@@ -33,14 +33,19 @@ class Changelog
def version(flags = ALL)
ret = ''
- ret += @comps[:epoch] if flags & EPOCH > 0
- ret += @comps[:base] if flags & BASE > 0
- ret += @comps[:base_suffix] if flags & BASESUFFIX > 0
- ret += @comps[:revision] if flags & REVISION > 0
+ ret += @comps[:epoch] if flagged?(flags, EPOCH)
+ ret += @comps[:base] if flagged?(flags, BASE)
+ ret += @comps[:base_suffix] if flagged?(flags, BASESUFFIX)
+ ret += @comps[:revision] if flagged?(flags, REVISION)
ret
end
private
+
+ def flagged?(flags, type)
+ flags & type > 0
+ end
+
# right parition
# @return [Array] of size 2 with the remainder of str as first and the right
# sub-string as last.
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list