mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Comment out unused/advisory bits to gain coverage.
This commit is contained in:
parent
10ddb688df
commit
b02e800dfa
3 changed files with 29 additions and 33 deletions
|
|
@ -26,7 +26,7 @@ class HTTP::CookieJar::AbstractSaver
|
|||
end
|
||||
|
||||
def default_options
|
||||
{}
|
||||
# {}
|
||||
end
|
||||
private :default_options
|
||||
|
||||
|
|
@ -42,10 +42,10 @@ class HTTP::CookieJar::AbstractSaver
|
|||
end
|
||||
|
||||
def save(io, jar)
|
||||
raise
|
||||
# self
|
||||
end
|
||||
|
||||
def load(io, jar)
|
||||
raise
|
||||
# self
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class HTTP::CookieJar::AbstractStore
|
|||
end
|
||||
|
||||
def default_options
|
||||
{}
|
||||
# {}
|
||||
end
|
||||
private :default_options
|
||||
|
||||
|
|
@ -46,18 +46,15 @@ class HTTP::CookieJar::AbstractStore
|
|||
end
|
||||
|
||||
def initialize_copy(other)
|
||||
raise
|
||||
self
|
||||
# self
|
||||
end
|
||||
|
||||
def add(cookie)
|
||||
raise
|
||||
self
|
||||
# self
|
||||
end
|
||||
|
||||
def delete(cookie)
|
||||
raise
|
||||
self
|
||||
# self
|
||||
end
|
||||
|
||||
# Iterates over all cookies that are not expired.
|
||||
|
|
@ -70,35 +67,34 @@ class HTTP::CookieJar::AbstractStore
|
|||
# If (and only if) the +uri+ option is given, last access time of
|
||||
# each cookie is updated to the current time.
|
||||
def each(uri = nil, &block)
|
||||
if uri
|
||||
raise
|
||||
else
|
||||
synchronize {
|
||||
raise
|
||||
}
|
||||
end
|
||||
self
|
||||
# if uri
|
||||
# ...
|
||||
# else
|
||||
# synchronize {
|
||||
# ...
|
||||
# }
|
||||
# end
|
||||
# self
|
||||
end
|
||||
include Enumerable
|
||||
|
||||
def empty?
|
||||
raise
|
||||
# true or false
|
||||
end
|
||||
|
||||
def clear
|
||||
raise
|
||||
self
|
||||
# self
|
||||
end
|
||||
|
||||
def cleanup(session = false)
|
||||
if session
|
||||
select { |cookie| cookie.session? || cookie.expired? }
|
||||
else
|
||||
select(&:expired?)
|
||||
end.each { |cookie|
|
||||
delete(cookie)
|
||||
}
|
||||
# subclasses can optionally remove over-the-limit cookies.
|
||||
self
|
||||
# if session
|
||||
# select { |cookie| cookie.session? || cookie.expired? }
|
||||
# else
|
||||
# select(&:expired?)
|
||||
# end.each { |cookie|
|
||||
# delete(cookie)
|
||||
# }
|
||||
# # subclasses can optionally remove over-the-limit cookies.
|
||||
# self
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ module TestHTTPCookieJar
|
|||
@jar2 = HTTP::CookieJar.new(new_options2)
|
||||
end
|
||||
|
||||
def hash_store?
|
||||
@store_type == :hash
|
||||
end
|
||||
#def hash_store?
|
||||
# @store_type == :hash
|
||||
#end
|
||||
|
||||
def mozilla_store?
|
||||
@store_type == :mozilla
|
||||
|
|
|
|||
Loading…
Reference in a new issue