cookie_store 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03f6d983ab27d0ae52b8af6468da9a131e815e4c
4
- data.tar.gz: b235fd0ecfba2b57d10d121cca4bace173e56b08
3
+ metadata.gz: 357d0cd9cba5f261e3a55d0a048e1737fe15a016
4
+ data.tar.gz: 17ff5ec43a6c9a4015da03cefa36a93e5c3543bd
5
5
  SHA512:
6
- metadata.gz: c74560238d8e3ec19ccf3d987bea2c8dcb1f516fa45ec58eaeddacb43553557736f54e2c92f6e2e87daf0234d1ec3acee2346b291e63f583718432d7bf735774
7
- data.tar.gz: 3a4f46c5276009ca3203ea6bdf1b6597fa872f1e3ad4ab731cae18e719fc15bb03f721439ec5f3a177c065f65b7b10a93c7cc3ab74f7a1c2dc7b17f05264c13f
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.0'
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 and store client-side HTTP cookies}
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")
@@ -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
@@ -14,6 +14,7 @@ require 'faker'
14
14
  require 'webmock/minitest'
15
15
  require "mocha"
16
16
  require "mocha/mini_test"
17
+ require 'active_support/time'
17
18
  require 'active_support/testing/time_helpers'
18
19
 
19
20
  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
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.0
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-07-09 00:00:00.000000000 Z
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 and store client-side HTTP cookies
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: []