mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +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
|
end
|
||||||
|
|
||||||
def default_options
|
def default_options
|
||||||
{}
|
# {}
|
||||||
end
|
end
|
||||||
private :default_options
|
private :default_options
|
||||||
|
|
||||||
|
|
@ -42,10 +42,10 @@ class HTTP::CookieJar::AbstractSaver
|
||||||
end
|
end
|
||||||
|
|
||||||
def save(io, jar)
|
def save(io, jar)
|
||||||
raise
|
# self
|
||||||
end
|
end
|
||||||
|
|
||||||
def load(io, jar)
|
def load(io, jar)
|
||||||
raise
|
# self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class HTTP::CookieJar::AbstractStore
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_options
|
def default_options
|
||||||
{}
|
# {}
|
||||||
end
|
end
|
||||||
private :default_options
|
private :default_options
|
||||||
|
|
||||||
|
|
@ -46,18 +46,15 @@ class HTTP::CookieJar::AbstractStore
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize_copy(other)
|
def initialize_copy(other)
|
||||||
raise
|
# self
|
||||||
self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def add(cookie)
|
def add(cookie)
|
||||||
raise
|
# self
|
||||||
self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(cookie)
|
def delete(cookie)
|
||||||
raise
|
# self
|
||||||
self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Iterates over all cookies that are not expired.
|
# 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
|
# If (and only if) the +uri+ option is given, last access time of
|
||||||
# each cookie is updated to the current time.
|
# each cookie is updated to the current time.
|
||||||
def each(uri = nil, &block)
|
def each(uri = nil, &block)
|
||||||
if uri
|
# if uri
|
||||||
raise
|
# ...
|
||||||
else
|
# else
|
||||||
synchronize {
|
# synchronize {
|
||||||
raise
|
# ...
|
||||||
}
|
# }
|
||||||
end
|
# end
|
||||||
self
|
# self
|
||||||
end
|
end
|
||||||
include Enumerable
|
include Enumerable
|
||||||
|
|
||||||
def empty?
|
def empty?
|
||||||
raise
|
# true or false
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear
|
def clear
|
||||||
raise
|
# self
|
||||||
self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cleanup(session = false)
|
def cleanup(session = false)
|
||||||
if session
|
# if session
|
||||||
select { |cookie| cookie.session? || cookie.expired? }
|
# select { |cookie| cookie.session? || cookie.expired? }
|
||||||
else
|
# else
|
||||||
select(&:expired?)
|
# select(&:expired?)
|
||||||
end.each { |cookie|
|
# end.each { |cookie|
|
||||||
delete(cookie)
|
# delete(cookie)
|
||||||
}
|
# }
|
||||||
# subclasses can optionally remove over-the-limit cookies.
|
# # subclasses can optionally remove over-the-limit cookies.
|
||||||
self
|
# self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ module TestHTTPCookieJar
|
||||||
@jar2 = HTTP::CookieJar.new(new_options2)
|
@jar2 = HTTP::CookieJar.new(new_options2)
|
||||||
end
|
end
|
||||||
|
|
||||||
def hash_store?
|
#def hash_store?
|
||||||
@store_type == :hash
|
# @store_type == :hash
|
||||||
end
|
#end
|
||||||
|
|
||||||
def mozilla_store?
|
def mozilla_store?
|
||||||
@store_type == :mozilla
|
@store_type == :mozilla
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue