projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '3149-filter-any' refs #3149
[arvados.git]
/
services
/
api
/
app
/
models
/
locator.rb
diff --git
a/services/api/app/models/locator.rb
b/services/api/app/models/locator.rb
index 39d7da94dc234ab4797d5cfe91a0d75a6378327e..d01c9dcbc00f9825e86356e88a4dacb527d33abf 100644
(file)
--- a/
services/api/app/models/locator.rb
+++ b/
services/api/app/models/locator.rb
@@
-11,7
+11,7
@@
# hint-content ::= [A-Za-z0-9@_-]+
#
# Individual hints may have their own required format:
# hint-content ::= [A-Za-z0-9@_-]+
#
# Individual hints may have their own required format:
-#
+#
# sign-hint ::= "+A" <40 lowercase hex digits> "@" sign-timestamp
# sign-timestamp ::= <8 lowercase hex digits>
# sign-hint ::= "+A" <40 lowercase hex digits> "@" sign-timestamp
# sign-timestamp ::= <8 lowercase hex digits>
@@
-66,6
+66,15
@@
class Locator
Locator.new(@hash, @size, @hints.reject { |o| o.start_with?("A") })
end
Locator.new(@hash, @size, @hints.reject { |o| o.start_with?("A") })
end
+ def strip_hints
+ Locator.new(@hash, @size, [])
+ end
+
+ def strip_hints!
+ @hints = []
+ self
+ end
+
def hash
@hash
end
def hash
@hash
end