cookie_store 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/cookie_store.gemspec +2 -3
- data/lib/cookie_store/cookie.rb +1 -1
- data/test/cookie_store/cookie_test.rb +18 -0
- data/test/test_helper.rb +1 -0
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 357d0cd9cba5f261e3a55d0a048e1737fe15a016
|
4
|
+
data.tar.gz: 17ff5ec43a6c9a4015da03cefa36a93e5c3543bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af2c607f784fe22a7e3fa2af8e902502237f7e3f058bba180f573eb5b9aed77230e6ac49bc3652ebb62bbffd6227ef2183883285717e1b3c0522662f4a651948
|
7
|
+
data.tar.gz: eef6a231b153041af53ec59431639dc073b969a561e7aabce0c631aac517d6c474d3ac301d3a49f2ba270ce82d5b30cd331e529aed60308a9c6931e7ac88a7f2
|
data/cookie_store.gemspec
CHANGED
@@ -3,13 +3,12 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "cookie_store"
|
6
|
-
s.version = '0.1.
|
7
|
-
s.licenses = ['MIT']
|
6
|
+
s.version = '0.1.1'
|
8
7
|
s.authors = ["Jon Bracy"]
|
9
8
|
s.email = ["jonbracy@gmail.com"]
|
10
9
|
s.homepage = "https://github.com/malomalo/cookie_store"
|
11
10
|
s.summary = %q{A Ruby library to handle client-side HTTP cookies}
|
12
|
-
s.description = %q{A Ruby library to handle
|
11
|
+
s.description = %q{A Ruby library to handle client-side HTTP cookies}
|
13
12
|
|
14
13
|
s.files = `git ls-files`.split("\n")
|
15
14
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/cookie_store/cookie.rb
CHANGED
@@ -2,7 +2,7 @@ class CookieStore::Cookie
|
|
2
2
|
|
3
3
|
QUOTED_PAIR = "\\\\[\\x00-\\x7F]"
|
4
4
|
LWS = "\\r\\n(?:[ \\t]+)"
|
5
|
-
QDTEXT = "[\\t\\x20-\\x21\\x23-\\x7E\\x80-\\xFF]|(?:#{LWS})"
|
5
|
+
QDTEXT = "[\\t\\x20-\\x21\\x23-\\x3A\\x3C-\\x7E\\x80-\\xFF]|(?:#{LWS})"
|
6
6
|
QUOTED_TEXT = "(?:#{QUOTED_PAIR}|#{QDTEXT})*"
|
7
7
|
IPADDR = /\A#{URI::REGEXP::PATTERN::IPV4ADDR}\Z|\A#{URI::REGEXP::PATTERN::IPV6ADDR}\Z/
|
8
8
|
|
@@ -196,6 +196,24 @@ class CookieStore::CookieTest < Minitest::Test
|
|
196
196
|
assert_equal nil, cookie.expires
|
197
197
|
assert_equal nil, cookie.max_age
|
198
198
|
end
|
199
|
+
|
200
|
+
test "::parse a cookie with options" do
|
201
|
+
cookie = CookieStore::Cookie.parse('http://google.com/test', "foo=bar; path=/; HttpOnly")
|
202
|
+
|
203
|
+
assert_equal 'foo', cookie.name
|
204
|
+
assert_equal 'bar', cookie.value
|
205
|
+
assert_equal 'google.com', cookie.domain
|
206
|
+
assert_equal '/', cookie.path
|
207
|
+
assert_equal false, cookie.secure
|
208
|
+
assert_equal true, cookie.http_only
|
209
|
+
assert_equal nil, cookie.comment
|
210
|
+
assert_equal nil, cookie.comment_url
|
211
|
+
assert_equal 1, cookie.version
|
212
|
+
assert_equal false, cookie.discard
|
213
|
+
assert_equal nil, cookie.ports
|
214
|
+
assert_equal nil, cookie.expires
|
215
|
+
assert_equal nil, cookie.max_age
|
216
|
+
end
|
199
217
|
|
200
218
|
test "::parse normalizes the request domain" do
|
201
219
|
cookie = CookieStore::Cookie.parse('http://GoOGlE.com/test', "foo=bar")
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookie_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: A Ruby library to handle
|
69
|
+
description: A Ruby library to handle client-side HTTP cookies
|
70
70
|
email:
|
71
71
|
- jonbracy@gmail.com
|
72
72
|
executables: []
|
@@ -85,8 +85,7 @@ files:
|
|
85
85
|
- test/cookie_store_test.rb
|
86
86
|
- test/test_helper.rb
|
87
87
|
homepage: https://github.com/malomalo/cookie_store
|
88
|
-
licenses:
|
89
|
-
- MIT
|
88
|
+
licenses: []
|
90
89
|
metadata: {}
|
91
90
|
post_install_message:
|
92
91
|
rdoc_options: []
|