[ARVADOS] updated: e0196b6e279fa3ef368dec30bd4dd3af10af8f33
git at public.curoverse.com
git at public.curoverse.com
Mon Jun 15 11:34:47 EDT 2015
Summary of changes:
apps/workbench/app/controllers/users_controller.rb | 27 ++++++++++++++++++++--
.../app/views/users/_setup_popup.html.erb | 17 +++++++++-----
apps/workbench/test/integration/users_test.rb | 2 ++
sdk/ruby/lib/arvados/keep.rb | 4 ++++
sdk/ruby/test/test_keep_manifest.rb | 3 +++
5 files changed, 45 insertions(+), 8 deletions(-)
via e0196b6e279fa3ef368dec30bd4dd3af10af8f33 (commit)
via 771dae6fa850973dd5ae979c939d814bc45b8ab3 (commit)
via 832486e363889d47adecf8ad898ab9d21384dca3 (commit)
via 4617a33da4f02639db5a63d925abdf1eaa01145c (commit)
via d3fc80cd82a3850b34da4e19e480b07cc2aea476 (commit)
via db9ef7d6f53a413243bf929ac424f11b8cfb3f72 (commit)
via a2ad62cae1e549d9224c6851b9e7ff0f3470a07a (commit)
via af88dd5afc0d5a506bab9ac37ddcfb101e7e05af (commit)
via cdec4d7f86b3495649216e112d0f9d31d7fe026d (commit)
via 5b8709e261f1d0b93c9823cf88a682ca221cae91 (commit)
via 33dd05d22ecae6f9028692433096a8e3eca5c71b (commit)
via c0818b26246432407b8cd76a887dd61a7e824cd0 (commit)
from c07144a7aeeff53e25b5e6703b07ede4826a1f6e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e0196b6e279fa3ef368dec30bd4dd3af10af8f33
Merge: 771dae6 832486e
Author: radhika <radhika at curoverse.com>
Date: Mon Jun 15 11:34:37 2015 -0400
Merge branch 'master' into 6277-manifest-validation
commit 771dae6fa850973dd5ae979c939d814bc45b8ab3
Author: radhika <radhika at curoverse.com>
Date: Mon Jun 15 11:33:45 2015 -0400
6277: all that work and missed the basic nil and empty string check!!!
diff --git a/sdk/ruby/lib/arvados/keep.rb b/sdk/ruby/lib/arvados/keep.rb
index 62f231f..3c6b26b 100644
--- a/sdk/ruby/lib/arvados/keep.rb
+++ b/sdk/ruby/lib/arvados/keep.rb
@@ -231,6 +231,10 @@ module Keep
# Verify that a given manifest is valid according to
# https://arvados.org/projects/arvados/wiki/Keep_manifest_format
def self.validate! manifest
+ raise ArgumentError.new "No manifest found" if !manifest
+
+ return true if manifest.empty?
+
raise ArgumentError.new "Invalid manifest: does not end with newline" if !manifest.end_with?("\n")
line_count = 0
manifest.each_line do |line|
diff --git a/sdk/ruby/test/test_keep_manifest.rb b/sdk/ruby/test/test_keep_manifest.rb
index 306d8b3..5ed9cfc 100644
--- a/sdk/ruby/test/test_keep_manifest.rb
+++ b/sdk/ruby/test/test_keep_manifest.rb
@@ -281,6 +281,9 @@ class ManifestTest < Minitest::Test
end
[
+ [false, nil, "No manifest found"],
+ [true, ""],
+ [false, " ", "Invalid manifest: does not end with newline"],
[true, ". d41d8cd98f00b204e9800998ecf8427e 0:0:abc.txt\n"],
[true, ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:abc.txt\n"],
[true, ". d41d8cd98f00b204e9800998ecf8427e a41d8cd98f00b204e9800998ecf8427e+0 0:0:abc.txt\n"], # 2 locators
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list