cookie_store 0.1.1 → 0.1.2

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: 357d0cd9cba5f261e3a55d0a048e1737fe15a016
4
- data.tar.gz: 17ff5ec43a6c9a4015da03cefa36a93e5c3543bd
3
+ metadata.gz: 29abc6c560da56cebca5d0fb11276868b60cfbb8
4
+ data.tar.gz: a2ec8c727588b16427dd57abdce421484b5a24fe
5
5
  SHA512:
6
- metadata.gz: af2c607f784fe22a7e3fa2af8e902502237f7e3f058bba180f573eb5b9aed77230e6ac49bc3652ebb62bbffd6227ef2183883285717e1b3c0522662f4a651948
7
- data.tar.gz: eef6a231b153041af53ec59431639dc073b969a561e7aabce0c631aac517d6c474d3ac301d3a49f2ba270ce82d5b30cd331e529aed60308a9c6931e7ac88a7f2
6
+ metadata.gz: 258940c03a7219d087061a8446e0c016ffc795a43fee85a3b59ca427ffef3c001ca75228c742a7baa389ad2230b801a8239ce8e519ecf5a8f3a2052a7544f335
7
+ data.tar.gz: 8d3d9fefa69dcb5fac6e659471288856389074c78e8f333caf4d95677f367fa8de26be0fb22491f18c383a05db4a7054eb01e34dadecb20e5a2d594b1b905394
data/cookie_store.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.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.1'
6
+ s.version = '0.1.2'
7
7
  s.authors = ["Jon Bracy"]
8
8
  s.email = ["jonbracy@gmail.com"]
9
9
  s.homepage = "https://github.com/malomalo/cookie_store"
data/lib/cookie_store.rb CHANGED
@@ -17,7 +17,7 @@ class CookieStore
17
17
  cookie = CookieStore::Cookie.parse(request_uri, set_cookie_value)
18
18
 
19
19
  # reject as per RFC2965 Section 3.3.2
20
- return if !cookie.request_match?(request_uri) || !(cookie.domain =~ /.+\..+/)
20
+ return if !cookie.request_match?(request_uri) || !(cookie.domain =~ /.+\..+/ || cookie.domain == 'localhost')
21
21
 
22
22
  # reject cookies over the max-bytes
23
23
  return if cookie.to_s.size > MAX_COOKIE_LENGTH
@@ -6,9 +6,11 @@ class CookieStoreTest < Minitest::Test
6
6
 
7
7
  test "#set_cookie" do
8
8
  store = CookieStore.new
9
- store.expects(:add)
9
+ store.expects(:add).times(3)
10
10
 
11
11
  store.set_cookie('http://google.com/test/this', 'foo=bar; Max-Age=3600')
12
+ store.set_cookie('http://localhost/test/this', 'foo=bar; Max-Age=3600')
13
+ store.set_cookie('http://127.0.0.1/test/this', 'foo=bar; Max-Age=3600')
12
14
  end
13
15
 
14
16
  test "#set_cookie rejects cookies where the value for the Domain attribute contains no embedded dots" do
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.1
4
+ version: 0.1.2
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-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake