Akinori MUSHA
8c30527293
Update rdoc and comments.
2013-04-12 20:22:50 +09:00
Akinori MUSHA
f1fe763007
CookieJar#cookie(): Allow call without an argument.
2013-04-12 01:40:17 +09:00
Akinori MUSHA
53758d0a77
Omit expiration check in cookies(). Remove an unused variable.
2013-04-12 15:41:18 +09:00
Akinori MUSHA
f3b8abdd8e
Add CookieJar#delete().
2013-04-12 01:19:39 +09:00
Akinori MUSHA
2ef3e42067
Add a note about the for_domain flag in the rdoc for CookieJar#add().
2013-04-12 01:19:03 +09:00
Akinori MUSHA
8649485f53
Improve rdoc.
2013-04-11 21:13:40 +09:00
Akinori MUSHA
57218cb858
HTTP::CookieJar#cookies: accessed_at is updated in the underlying store.
2013-04-11 21:12:53 +09:00
Akinori MUSHA
f0eb5d0cd8
Improve markups.
2013-04-08 00:03:04 +09:00
Akinori MUSHA
dcf7f7e7a5
Avoid a bug of ruby 1.8.
2013-04-03 20:09:48 +09:00
Akinori MUSHA
ffabb614ad
Perform acceptance check in CookieJar#add instead of origin=.
...
- Cookie#acceptable? is added, which is called by such methods as
Cookie.parse and CookieJar#add.
- Cookie#origin= no longer raises ArgumentError just because it
conflicts with the domain.
- Cookie#origin= raises ArgumentError if it is given an object that is
not URI or string-like.
2013-04-03 17:57:27 +09:00
Akinori MUSHA
90ffce9aa6
Improve rdoc.
2013-04-03 17:29:08 +09:00
Akinori MUSHA
1c140c035d
Add a utility shorthand method HTTP::CookieJar#parse.
2013-03-29 01:55:43 +09:00
Akinori MUSHA
a7575ae3df
Improve documentation.
2013-03-27 18:17:56 +09:00
Akinori MUSHA
a0ea64da56
CookieJar.new: Pass the store class via a :store keyword.
2013-03-27 17:43:58 +09:00
Akinori MUSHA
69b3186666
Add MozillaStore.
2013-03-27 16:01:48 +09:00
Akinori MUSHA
f5bc5032dd
No need to check validity here any more.
2013-03-26 01:43:19 +09:00
Akinori MUSHA
38f7e98f09
Replace compatibility errors with documentation.
...
Leave compatibility stuff to Mechanize itself and just keep
http-cookie clean.
2013-03-23 00:27:38 +09:00
Akinori MUSHA
c442e8e0c8
The compatibility method clear! does not need to take arguments.
2013-03-21 17:30:25 +09:00
Akinori MUSHA
c6d28de9b7
Improve documentation.
2013-03-15 19:22:39 +09:00
Akinori MUSHA
05e5d332df
These autoloads do not serve much.
2013-03-15 12:10:22 +09:00
Akinori MUSHA
8be03978a0
Make each(uri) not fail if a non-HTTP URL is given.
...
Fix documents with #each. The uri argument was not made a keyword
argument.
Guarantee that the +uri+ given to AbstractStore#each() is a URI
object.
Make HashStore#each return self as required.
2013-03-15 11:33:54 +09:00
Akinori MUSHA
c0d5f3a121
Add error messages to make migration from Mechanize::Cookie easier.
...
Add a section to elaborate on the incompatibilities to README.md.
2013-03-15 05:53:11 +09:00
Akinori MUSHA
d004408296
Introduce an abstraction layer for the cookie store.
...
CookieJar#jar is removed and #store is added instead.
2013-03-15 04:20:59 +09:00
Akinori MUSHA
1f5eb6bc7f
Introduce an abstraction layer for saving (serializing) CookieJar.
...
CookieJar#save is the new name for the now obsolete #save_as.
CookieJar#save and #load now accept IO-like instead of a filename.
Change the YAML file format, and make #load discard incompatible data.
2013-03-15 04:20:59 +09:00
Akinori MUSHA
fd7450717a
Implement HTTP::CookieJar#empty? without an argument.
2013-03-15 04:20:59 +09:00
Akinori MUSHA
f60e678cb8
Do not store a cookie if it is already expired at the time of adding.
2013-03-15 04:20:59 +09:00
Akinori MUSHA
10e9ca5c60
Add HTTP::Cookie#session? as an alias for #session.
2013-03-15 04:20:58 +09:00
Akinori MUSHA
f79387080b
Use Hash#clear rather than creating a new one.
2013-03-08 21:31:11 +09:00
Akinori MUSHA
5f21b364d3
Remove an unused variable to suppress warning.
2013-03-08 21:31:11 +09:00
Mike Morearty
184fae797e
Slight change to cookie-jar header
...
Instead of "Netscape HTTP Cookie File", now writing "HTTP Cookie File".
Python's cookie code recognizes either one.
2013-02-18 15:54:14 -08:00
Mike Morearty
0decfe98b7
Add header line when writing to cookies.txt
...
When Python is reading a Netscape-format cookies.txt file, it seems to
require an initial line that looks like this:
# Netscape HTTP Cookie File
2013-02-17 18:23:32 -08:00
Akinori MUSHA
f4cd8ffb58
Hide load_yaml, renaming to require_yaml.
2012-10-22 15:14:19 +09:00
Akinori MUSHA
2a9476707c
HTTP::CookieJar#load: Use File.open() instead of Kernel#open().
2012-10-22 15:10:34 +09:00
Akinori MUSHA
7fa5b10df6
HTTP::CookieJar#each: Take an optional URL/URI which is used as a scope.
...
Do not call cleanup in each or cookies.
2012-10-22 15:08:08 +09:00
Akinori MUSHA
7c5ac21d0f
HTTP::CookieJar#cleanup: Use delete_if.
2012-10-22 15:03:36 +09:00
Akinori MUSHA
b7254599bd
Try not to expose @jar in normal methods.
2012-10-22 14:52:30 +09:00
Akinori MUSHA
c7247cf965
HTTP::CookieJar#empty?: Optimize.
2012-10-22 14:51:59 +09:00
Akinori MUSHA
1731b155e6
HTTP::CookieJar#add: Check if both the domain and path of the cookie are set.
2012-10-22 14:50:49 +09:00
Akinori MUSHA
fa45e028a7
Treat an empty path as '/'.
...
HTTP::CookieJar#cookies: Do not modify a given URI. Remove a
redundant cleanup() call.
2012-10-22 14:21:46 +09:00
Akinori MUSHA
24e9b26004
HTTP::CookieJar#add: Use the hostname of domain_name.
2012-10-22 12:59:08 +09:00
Akinori MUSHA
c727d39076
Move cookies.txt parser and serializer from HTTP::CookieJar to HTTP::Cookie.
...
Fix a bug where anything after '#' in cookies.txt are removed.
2012-10-22 03:30:01 +09:00
Akinori MUSHA
95c702f99b
Rename HTTP::CookieJar#add! to HTTP::CookieJar#add removing the original #add.
2012-10-22 02:39:20 +09:00
Akinori MUSHA
ae4a9d8d40
Make HTTP::Cookie Comparable.
2012-10-22 01:02:00 +09:00
Akinori MUSHA
aa64d3d98b
Rename HTTP::Cookie#clear! to clear.
2012-10-21 23:48:57 +09:00
Akinori MUSHA
060fc63c2a
Import cookie related stuff from Mechanize.
2012-10-14 18:52:52 +09:00