[SCM] ci-tooling packaging branch, master, updated. 140faea23dfb80980fb6187cad3820833debca1f
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Fri Jan 15 10:12:53 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=39af8b4
The following commit has been merged in the master branch:
commit 39af8b4463a28d4ec45fe06f901dd77d1134a402
Author: Harald Sitter <sitter at kde.org>
Date: Fri Jan 15 10:58:32 2016 +0100
fail on slash in name and component
---
lib/projects.rb | 11 +++++++++++
test/test_projects.rb | 12 ++++++++++++
2 files changed, 23 insertions(+)
diff --git a/lib/projects.rb b/lib/projects.rb
index 3917814..0929e58 100644
--- a/lib/projects.rb
+++ b/lib/projects.rb
@@ -76,6 +76,17 @@ class Project
@dependees = []
@series_branches = []
@autopkgtest = false
+
+ # Jenkins doesn't like slashes. Nor should it have to, any sort of ordering
+ # would be the result of component/name, which is precisely why neither must
+ # contain additional slashes as then they'd be $pathtype/$pathtype which
+ # often will need different code (mkpath vs. mkdir).
+ if @name.include?('/')
+ fail NameError, "name value contains a slash: #{@name}"
+ end
+ if @component.include?('/')
+ fail NameError, "component contains a slash: #{@component}"
+ end
# Clean up path to remove useless slashes and colons.
# FIXME: git dir needs to be set somewhere, somehow, somewhat, lol, kittens?
diff --git a/test/test_projects.rb b/test/test_projects.rb
index ea45acc..8180e0f 100644
--- a/test/test_projects.rb
+++ b/test/test_projects.rb
@@ -257,4 +257,16 @@ class ProjectTest < TestCase
def test_default_url
assert_equal(Project::DEFAULT_URL, Project.default_url)
end
+
+ def test_slash_in_name
+ assert_raise NameError do
+ Project.new('a/b', 'component', 'git:///')
+ end
+ end
+
+ def test_slash_in_component
+ assert_raise NameError do
+ Project.new('name', 'a/b', 'git:///')
+ end
+ end
end
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list