cookie_monster 0.1.2 → 0.1.3

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDc0OThjMzRkMWM5ODZhOTNiMTBlOGFlMTAyZTY3ZmE5NjhhZDA2Mw==
4
+ OWFiOThjMzI5Y2FjOGUwYjcxOWRiMzU4NzVjYzY2YzM5NTllNmRjYw==
5
5
  data.tar.gz: !binary |-
6
- NjgxNmEyZDM5MTVlZmYzNjhmYTVhYWVjODdjZDM1Y2E5YjcyY2Y5Ng==
6
+ OGIwZTMwYmMwODg2M2FlYmE3M2IyNzFjYzRjMDBiYjcxZjRlODAyMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTBiMjI5Zjc0ZWYxNWE0NGU1MzJmNjFhMjI1Y2VhMzI1MTEwYWQ3M2Q2Nzgx
10
- Y2E0OGQ4ZTAxMmU0NmQ2ZGNkYjg2Njk3NGQ5NDQyNmQzNDQ5NTQ4OWI0Nzkx
11
- ZTg1ODRkMTFhNzlkODQ4ZGYyMTkwOTMyNmNmNTExMDdmNzlmZTU=
9
+ NmIwNTVjM2Q3ZWJkZjE1MTFkNmZiNzBlMmViYzMzODJmNTIyOWMxZWE1Y2Fh
10
+ NjVjZDRlOTBkMGI3NGRhNDk0ODNmMjhkN2I0NTE2YTE1ZTVhYzY5ODA3Y2Nh
11
+ MjA5ZWU3YTMwODkzMWEyOTU5NTAxYzA2OGE2M2VlY2QyOWZiNjM=
12
12
  data.tar.gz: !binary |-
13
- YzA2MGMxZTUwZjRkMTVlNzBkOTIxMTI3MDBiZWY2MDZjMWE1NjA0OTBkYzZj
14
- YWZmNTUxNWZiNzE4MTgyZGI3YzY1YjdiNzFiZGFlNjRjNDQyZGNkMWFkMjIx
15
- YmRmZmVjYjBlNTA5YzI5NGM0NTgzYTNjOTIzMzAxODQzMzU2MDM=
13
+ ODU5Y2RiZjk0NmE2Nzg5YzVjYWFlODA4NTY1OWQ3NTg1ODEwMDI1MzI5ZWQ3
14
+ ZjU0ZTFiMGEyYWEzYjQwMjQ4NzNiNGIwNzJlMzBhMWExZTY0YTBmN2E1NmI0
15
+ ZGMxNWNmODUwZmRhZTc1M2QxM2EzMDU0MWUxYjhmYWI4NjMyMmE=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cookie_monster (0.1.1)
4
+ cookie_monster (0.1.2)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
@@ -28,15 +28,18 @@ module CookieMonster
28
28
  encrypted.decrypt
29
29
  end
30
30
 
31
- def []=(key, value)
31
+ def []=(key, value_or_options)
32
+ value, options = value_or_options
33
+ options ||= {}
34
+
32
35
  encrypted_value = Encryption.new(value).encrypt
33
36
 
34
37
  @response.set_cookie key, {
35
38
  :value => encrypted_value,
36
- :httponly => @options[:httponly],
37
- :expires => @options[:expires],
38
- :domain => @options[:domain],
39
- :path => @options[:path] || '/',
39
+ :httponly => options[:httponly],
40
+ :expires => options[:expires],
41
+ :domain => options[:domain],
42
+ :path => options[:path] || '/',
40
43
  :secure => false # Needed so it can be read by cookie logger over http
41
44
  }
42
45
  end
@@ -1,3 +1,3 @@
1
1
  module CookieMonster
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -53,4 +53,9 @@ class JarTest < Test::Unit::TestCase
53
53
  @jar[:something] = hash
54
54
  assert_equal hash, @jar[:something]
55
55
  end
56
+
57
+ def test_including_other_options
58
+ @jar[:cookie] = 'something', { expires: 'some point in the future' }
59
+ assert_equal 'some point in the future', @jar.response.cookies[:cookie][:expires]
60
+ end
56
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookie_monster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Griffin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-19 00:00:00.000000000 Z
11
+ date: 2013-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport