ie_iframe_cookies 0.1.5 → 0.1.6

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ddd9cba03955ac7edbca843073b1ed8df67f1eb
4
- data.tar.gz: 247d304e7c531ba49b731d5ba6a4f45023bb74b2
3
+ metadata.gz: dff4a49044bed8c843f41c8c9a3cdcdf94026f67
4
+ data.tar.gz: 334747fd6bdbb3001df7c8265d811b8ca68010e4
5
5
  SHA512:
6
- metadata.gz: 0a98e0c94fab96e1adf73ff96da17d54dbbbb923f90917fb723a06113a5ef4d5e5bcbf3100482e77835408b7bfec64eca05fd101cd09042fb4c2250f590e94e8
7
- data.tar.gz: 2bb6e1aea8f7d1d5490f086fd19b97d95b731b1d17a13416a79f3517cdf3f365a6cf4fbf342fc72afd4673676b931e97d6c39b18eba9dd8c48a16dc8b6f6b069
6
+ metadata.gz: 7cf32737d25175e3104c1bce33f8a05204bf01d9297764a46c899da8a47725cafbc9f82c1b7e54de14064357d2fd7a6a4b421636e6ac450d0ab5e08bfdb90614
7
+ data.tar.gz: d7948458707c3a987e7ff7c005a2ab8fca8395a6e09cb29da1c71fd6cc4193f2ae022ed548cad16cf8fe7232edb9d31965a5212e417557a7cd33455da1c29485
checksums.yaml.gz.sig ADDED
@@ -0,0 +1 @@
1
+ �����л�����J?��C������dC�7%�tgsԈIȾ��q���`nW�7��Գa��6M�Tr�6��]���r���K��q�0E1HG�W�*��� _?J�Ҵ�E�>s��iD�}��g(��$9��@+R'�r�5������B��-��9#����;�����zbN�q8��5�Y��d U��Dž�v,�$J}M������##k�n,��ʫ]R��k�ݝY~4��� ����G>�\.N�e�g-�
data.tar.gz.sig ADDED
Binary file
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (C) 2013 AUTHOR_NAME <AUTHOR_EMAIL>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,3 +1,3 @@
1
1
  module IEIframeCookies
2
- VERSION = Version = "0.1.5"
2
+ VERSION = Version = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ie_iframe_cookies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MRAwDgYDVQQDDAdtaWNo
14
+ YWVsMRcwFQYKCZImiZPyLGQBGRYHZ3Jvc3NlcjESMBAGCgmSJomT8ixkARkWAml0
15
+ MB4XDTEzMDIwMzE4MTMxMVoXDTE0MDIwMzE4MTMxMVowPzEQMA4GA1UEAwwHbWlj
16
+ aGFlbDEXMBUGCgmSJomT8ixkARkWB2dyb3NzZXIxEjAQBgoJkiaJk/IsZAEZFgJp
17
+ dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMorXo/hgbUq97+kII9H
18
+ MsQcLdC/7wQ1ZP2OshVHPkeP0qH8MBHGg6eYisOX2ubNagF9YTCZWnhrdKrwpLOO
19
+ cPLaZbjUjljJ3cQR3B8Yn1veV5IhG86QseTBjymzJWsLpqJ1UZGpfB9tXcsFtuxO
20
+ 6vHvcIHdzvc/OUkICttLbH+1qb6rsHUceqh+JrH4GrsJ5H4hAfIdyS2XMK7YRKbh
21
+ h+IBu6dFWJJByzFsYmV1PDXln3UBmgAt65cmCu4qPfThioCGDzbSJrGDGLmw/pFX
22
+ FPpVCm1zgYSb1v6Qnf3cgXa2f2wYGm17+zAVyIDpwryFru9yF/jJxE38z/DRsd9R
23
+ /88CAwEAAaM5MDcwCQYDVR0TBAIwADAdBgNVHQ4EFgQUsiNnXHtKeMYYcr4yJVmQ
24
+ WONL+IwwCwYDVR0PBAQDAgSwMA0GCSqGSIb3DQEBBQUAA4IBAQAlyN7kKo/NQCQ0
25
+ AOzZLZ3WAePvStkCFIJ53tsv5Kyo4pMAllv+BgPzzBt7qi605mFSL6zBd9uLou+W
26
+ Co3s48p1dy7CjjAfVQdmVNHF3MwXtfC2OEyvSQPi4xKR8iba8wa3xp9LVo1PuLpw
27
+ /6DsrChWw74HfsJN6qJOK684hJeT8lBYAUfiC3wD0owoPSg+XtyAAddisR+KV5Y1
28
+ NmVHuLtQcNTZy+gRht3ahJRMuC6QyLmkTsf+6MaenwAMkAgHdswGsJztOnNnBa3F
29
+ y0kCSWmK6D+x/SbfS6r7Ke07MRqziJdB9GuE1+0cIRuFh8EQ+LN6HXCKM5pon/GU
30
+ ycwMXfl0
31
+ -----END CERTIFICATE-----
11
32
  date: 2013-11-28 00:00:00.000000000 Z
12
33
  dependencies:
13
34
  - !ruby/object:Gem::Dependency
@@ -66,6 +87,20 @@ dependencies:
66
87
  - - ~>
67
88
  - !ruby/object:Gem::Version
68
89
  version: '4.0'
90
+ - !ruby/object:Gem::Dependency
91
+ name: minitest-rg
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ type: :development
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
69
104
  - !ruby/object:Gem::Dependency
70
105
  name: wwtd
71
106
  requirement: !ruby/object:Gem::Requirement
@@ -86,22 +121,9 @@ executables: []
86
121
  extensions: []
87
122
  extra_rdoc_files: []
88
123
  files:
89
- - .travis.yml
90
- - Gemfile
91
- - Gemfile.lock
92
- - Rakefile
93
- - Readme.md
94
- - gemfiles/rails_2.gemfile
95
- - gemfiles/rails_2.gemfile.lock
96
- - gemfiles/rails_3.gemfile
97
- - gemfiles/rails_3.gemfile.lock
98
- - gemfiles/rails_4.gemfile
99
- - gemfiles/rails_4.gemfile.lock
100
- - ie_iframe_cookies.gemspec
124
+ - MIT-LICENSE
101
125
  - lib/ie_iframe_cookies.rb
102
126
  - lib/ie_iframe_cookies/version.rb
103
- - test/ie_iframe_cookies_test.rb
104
- - test/test_helper.rb
105
127
  homepage: http://github.com/grosser/ie_iframe_cookies
106
128
  licenses:
107
129
  - MIT
metadata.gz.sig ADDED
Binary file
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- rvm:
2
- - ree
3
- - 1.9.3
4
- - 2.0.0
5
- gemfile:
6
- - gemfiles/rails_2.gemfile
7
- - gemfiles/rails_3.gemfile
8
- - gemfiles/rails_4.gemfile
9
- matrix:
10
- exclude:
11
- - rvm: 2.0.0
12
- gemfile: gemfiles/rails_2.gemfile
13
- - rvm: ree
14
- gemfile: gemfiles/rails_4.gemfile
15
- bundler_args: ""
16
- script: bundle exec rake test
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec
data/Gemfile.lock DELETED
@@ -1,98 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- ie_iframe_cookies (0.1.5)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionmailer (3.2.5)
10
- actionpack (= 3.2.5)
11
- mail (~> 2.4.4)
12
- actionpack (3.2.5)
13
- activemodel (= 3.2.5)
14
- activesupport (= 3.2.5)
15
- builder (~> 3.0.0)
16
- erubis (~> 2.7.0)
17
- journey (~> 1.0.1)
18
- rack (~> 1.4.0)
19
- rack-cache (~> 1.2)
20
- rack-test (~> 0.6.1)
21
- sprockets (~> 2.1.3)
22
- activemodel (3.2.5)
23
- activesupport (= 3.2.5)
24
- builder (~> 3.0.0)
25
- activerecord (3.2.5)
26
- activemodel (= 3.2.5)
27
- activesupport (= 3.2.5)
28
- arel (~> 3.0.2)
29
- tzinfo (~> 0.3.29)
30
- activeresource (3.2.5)
31
- activemodel (= 3.2.5)
32
- activesupport (= 3.2.5)
33
- activesupport (3.2.5)
34
- i18n (~> 0.6)
35
- multi_json (~> 1.0)
36
- arel (3.0.2)
37
- builder (3.0.0)
38
- bump (0.5.0)
39
- erubis (2.7.0)
40
- hike (1.2.1)
41
- i18n (0.6.0)
42
- journey (1.0.3)
43
- json (1.7.3)
44
- mail (2.4.4)
45
- i18n (>= 0.4.0)
46
- mime-types (~> 1.16)
47
- treetop (~> 1.4.8)
48
- mime-types (1.18)
49
- minitest (4.7.5)
50
- multi_json (1.3.6)
51
- polyglot (0.3.3)
52
- rack (1.4.1)
53
- rack-cache (1.2)
54
- rack (>= 0.4)
55
- rack-ssl (1.3.2)
56
- rack
57
- rack-test (0.6.1)
58
- rack (>= 1.0)
59
- rails (3.2.5)
60
- actionmailer (= 3.2.5)
61
- actionpack (= 3.2.5)
62
- activerecord (= 3.2.5)
63
- activeresource (= 3.2.5)
64
- activesupport (= 3.2.5)
65
- bundler (~> 1.0)
66
- railties (= 3.2.5)
67
- railties (3.2.5)
68
- actionpack (= 3.2.5)
69
- activesupport (= 3.2.5)
70
- rack-ssl (~> 1.3.2)
71
- rake (>= 0.8.7)
72
- rdoc (~> 3.4)
73
- thor (>= 0.14.6, < 2.0)
74
- rake (0.9.2.2)
75
- rdoc (3.12)
76
- json (~> 1.4)
77
- sprockets (2.1.3)
78
- hike (~> 1.2)
79
- rack (~> 1.0)
80
- tilt (~> 1.1, != 1.3.0)
81
- thor (0.15.2)
82
- tilt (1.3.3)
83
- treetop (1.4.10)
84
- polyglot
85
- polyglot (>= 0.3.1)
86
- tzinfo (0.3.33)
87
- wwtd (0.4.4)
88
-
89
- PLATFORMS
90
- ruby
91
-
92
- DEPENDENCIES
93
- bump
94
- ie_iframe_cookies!
95
- minitest (~> 4.0)
96
- rails
97
- rake
98
- wwtd (>= 0.3.2)
data/Rakefile DELETED
@@ -1,13 +0,0 @@
1
- require 'bundler/setup'
2
- require 'bundler/gem_tasks'
3
- require 'rake/testtask'
4
- require 'bump/tasks'
5
- require 'wwtd/tasks'
6
-
7
- Rake::TestTask.new(:test) do |test|
8
- test.libs << 'lib'
9
- test.pattern = 'test/ie_iframe_cookies_test.rb'
10
- test.verbose = true
11
- end
12
-
13
- task :default => :wwtd
data/Readme.md DELETED
@@ -1,35 +0,0 @@
1
- Rails: Enabled cookies inside IFrames for IE via P3P headers.<br/>
2
-
3
- IFrames in IE only get the same cookies as normal pages when P3P headers are added<br/>
4
- => 'iframe-using' IE users get P3P headers on every request<br/>
5
- 304 Not modified pages do not get P3P headers (via ETag)<br/>
6
- => 'iframe-using' IE users do not get 304
7
-
8
- Install
9
- =======
10
-
11
- gem install ie_iframe_cookies
12
-
13
- Usage
14
- =====
15
- To cookie-tag users as 'iframe-using', add this to all actions rendered inside IFrames.<br/>
16
- (only IE users are tagged)
17
-
18
- before_filter :normal_cookies_for_ie_in_iframes! # :only => [:foo, :bar]
19
-
20
- TIPS
21
- ====
22
- - Problems with Safari? try [this](http://saizai.livejournal.com/897522.html) or [that](http://stackoverflow.com/questions/2691864/facebook-iframe-app-with-multiple-pages-in-safari-session-variables-not-persisti/2725790#2725790)
23
-
24
- Authors
25
- =======
26
-
27
- ### [Contributors](http://github.com/grosser/ie_iframe_cookies/contributors)
28
- - [Eric Harrison](https://github.com/fuelxc)
29
-
30
- [Sascha Depold](https://github.com/sdepold)
31
-
32
- [Michael Grosser](http://grosser.it)<br/>
33
- michael@grosser.it<br/>
34
- License: MIT<br/>
35
- [![Build Status](https://travis-ci.org/grosser/ie_iframe_cookies.png)](https://travis-ci.org/grosser/ie_iframe_cookies)
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
- gem "rails", "~> 2.3.18"
3
- gemspec :path=>"../"
@@ -1,41 +0,0 @@
1
- PATH
2
- remote: /Users/mgrosser/Code/tools/ie_iframe_cookies
3
- specs:
4
- ie_iframe_cookies (0.1.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionmailer (2.3.18)
10
- actionpack (= 2.3.18)
11
- actionpack (2.3.18)
12
- activesupport (= 2.3.18)
13
- rack (~> 1.1.0)
14
- activerecord (2.3.18)
15
- activesupport (= 2.3.18)
16
- activeresource (2.3.18)
17
- activesupport (= 2.3.18)
18
- activesupport (2.3.18)
19
- bump (0.5.0)
20
- minitest (4.7.5)
21
- rack (1.1.6)
22
- rails (2.3.18)
23
- actionmailer (= 2.3.18)
24
- actionpack (= 2.3.18)
25
- activerecord (= 2.3.18)
26
- activeresource (= 2.3.18)
27
- activesupport (= 2.3.18)
28
- rake (>= 0.8.3)
29
- rake (10.1.0)
30
- wwtd (0.4.4)
31
-
32
- PLATFORMS
33
- ruby
34
-
35
- DEPENDENCIES
36
- bump
37
- ie_iframe_cookies!
38
- minitest (~> 4.0)
39
- rails (~> 2.3.18)
40
- rake
41
- wwtd (>= 0.3.2)
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
- gem "rails", "~> 3.2.15"
3
- gemspec :path=>"../"
@@ -1,98 +0,0 @@
1
- PATH
2
- remote: /Users/mgrosser/Code/tools/ie_iframe_cookies
3
- specs:
4
- ie_iframe_cookies (0.1.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionmailer (3.2.15)
10
- actionpack (= 3.2.15)
11
- mail (~> 2.5.4)
12
- actionpack (3.2.15)
13
- activemodel (= 3.2.15)
14
- activesupport (= 3.2.15)
15
- builder (~> 3.0.0)
16
- erubis (~> 2.7.0)
17
- journey (~> 1.0.4)
18
- rack (~> 1.4.5)
19
- rack-cache (~> 1.2)
20
- rack-test (~> 0.6.1)
21
- sprockets (~> 2.2.1)
22
- activemodel (3.2.15)
23
- activesupport (= 3.2.15)
24
- builder (~> 3.0.0)
25
- activerecord (3.2.15)
26
- activemodel (= 3.2.15)
27
- activesupport (= 3.2.15)
28
- arel (~> 3.0.2)
29
- tzinfo (~> 0.3.29)
30
- activeresource (3.2.15)
31
- activemodel (= 3.2.15)
32
- activesupport (= 3.2.15)
33
- activesupport (3.2.15)
34
- i18n (~> 0.6, >= 0.6.4)
35
- multi_json (~> 1.0)
36
- arel (3.0.2)
37
- builder (3.0.4)
38
- bump (0.5.0)
39
- erubis (2.7.0)
40
- hike (1.2.3)
41
- i18n (0.6.5)
42
- journey (1.0.4)
43
- json (1.8.1)
44
- mail (2.5.4)
45
- mime-types (~> 1.16)
46
- treetop (~> 1.4.8)
47
- mime-types (1.25)
48
- minitest (4.7.5)
49
- multi_json (1.8.2)
50
- polyglot (0.3.3)
51
- rack (1.4.5)
52
- rack-cache (1.2)
53
- rack (>= 0.4)
54
- rack-ssl (1.3.3)
55
- rack
56
- rack-test (0.6.2)
57
- rack (>= 1.0)
58
- rails (3.2.15)
59
- actionmailer (= 3.2.15)
60
- actionpack (= 3.2.15)
61
- activerecord (= 3.2.15)
62
- activeresource (= 3.2.15)
63
- activesupport (= 3.2.15)
64
- bundler (~> 1.0)
65
- railties (= 3.2.15)
66
- railties (3.2.15)
67
- actionpack (= 3.2.15)
68
- activesupport (= 3.2.15)
69
- rack-ssl (~> 1.3.2)
70
- rake (>= 0.8.7)
71
- rdoc (~> 3.4)
72
- thor (>= 0.14.6, < 2.0)
73
- rake (10.1.0)
74
- rdoc (3.12.2)
75
- json (~> 1.4)
76
- sprockets (2.2.2)
77
- hike (~> 1.2)
78
- multi_json (~> 1.0)
79
- rack (~> 1.0)
80
- tilt (~> 1.1, != 1.3.0)
81
- thor (0.18.1)
82
- tilt (1.4.1)
83
- treetop (1.4.15)
84
- polyglot
85
- polyglot (>= 0.3.1)
86
- tzinfo (0.3.38)
87
- wwtd (0.4.4)
88
-
89
- PLATFORMS
90
- ruby
91
-
92
- DEPENDENCIES
93
- bump
94
- ie_iframe_cookies!
95
- minitest (~> 4.0)
96
- rails (~> 3.2.15)
97
- rake
98
- wwtd (>= 0.3.2)
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
- gem "rails", "~> 4.0.1"
3
- gemspec :path=>"../"
@@ -1,92 +0,0 @@
1
- PATH
2
- remote: /Users/mgrosser/Code/tools/ie_iframe_cookies
3
- specs:
4
- ie_iframe_cookies (0.1.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionmailer (4.0.1)
10
- actionpack (= 4.0.1)
11
- mail (~> 2.5.4)
12
- actionpack (4.0.1)
13
- activesupport (= 4.0.1)
14
- builder (~> 3.1.0)
15
- erubis (~> 2.7.0)
16
- rack (~> 1.5.2)
17
- rack-test (~> 0.6.2)
18
- activemodel (4.0.1)
19
- activesupport (= 4.0.1)
20
- builder (~> 3.1.0)
21
- activerecord (4.0.1)
22
- activemodel (= 4.0.1)
23
- activerecord-deprecated_finders (~> 1.0.2)
24
- activesupport (= 4.0.1)
25
- arel (~> 4.0.0)
26
- activerecord-deprecated_finders (1.0.3)
27
- activesupport (4.0.1)
28
- i18n (~> 0.6, >= 0.6.4)
29
- minitest (~> 4.2)
30
- multi_json (~> 1.3)
31
- thread_safe (~> 0.1)
32
- tzinfo (~> 0.3.37)
33
- arel (4.0.1)
34
- atomic (1.1.14)
35
- builder (3.1.4)
36
- bump (0.5.0)
37
- erubis (2.7.0)
38
- hike (1.2.3)
39
- i18n (0.6.5)
40
- mail (2.5.4)
41
- mime-types (~> 1.16)
42
- treetop (~> 1.4.8)
43
- mime-types (1.25)
44
- minitest (4.7.5)
45
- multi_json (1.8.2)
46
- polyglot (0.3.3)
47
- rack (1.5.2)
48
- rack-test (0.6.2)
49
- rack (>= 1.0)
50
- rails (4.0.1)
51
- actionmailer (= 4.0.1)
52
- actionpack (= 4.0.1)
53
- activerecord (= 4.0.1)
54
- activesupport (= 4.0.1)
55
- bundler (>= 1.3.0, < 2.0)
56
- railties (= 4.0.1)
57
- sprockets-rails (~> 2.0.0)
58
- railties (4.0.1)
59
- actionpack (= 4.0.1)
60
- activesupport (= 4.0.1)
61
- rake (>= 0.8.7)
62
- thor (>= 0.18.1, < 2.0)
63
- rake (10.1.0)
64
- sprockets (2.10.0)
65
- hike (~> 1.2)
66
- multi_json (~> 1.0)
67
- rack (~> 1.0)
68
- tilt (~> 1.1, != 1.3.0)
69
- sprockets-rails (2.0.1)
70
- actionpack (>= 3.0)
71
- activesupport (>= 3.0)
72
- sprockets (~> 2.8)
73
- thor (0.18.1)
74
- thread_safe (0.1.3)
75
- atomic
76
- tilt (1.4.1)
77
- treetop (1.4.15)
78
- polyglot
79
- polyglot (>= 0.3.1)
80
- tzinfo (0.3.38)
81
- wwtd (0.4.4)
82
-
83
- PLATFORMS
84
- ruby
85
-
86
- DEPENDENCIES
87
- bump
88
- ie_iframe_cookies!
89
- minitest (~> 4.0)
90
- rails (~> 4.0.1)
91
- rake
92
- wwtd (>= 0.3.2)
@@ -1,17 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
2
- name = "ie_iframe_cookies"
3
- require "#{name}/version"
4
-
5
- Gem::Specification.new name, IEIframeCookies::VERSION do |s|
6
- s.summary = "Rails: Enabled cookies inside IFrames for IE via p3p headers"
7
- s.authors = ["Michael Grosser"]
8
- s.email = "michael@grosser.it"
9
- s.homepage = "http://github.com/grosser/#{name}"
10
- s.files = `git ls-files`.split("\n")
11
- s.license = "MIT"
12
- s.add_development_dependency 'bump'
13
- s.add_development_dependency 'rails'
14
- s.add_development_dependency 'rake'
15
- s.add_development_dependency 'minitest', '~> 4.0'
16
- s.add_development_dependency 'wwtd', '>= 0.3.2'
17
- end
@@ -1,186 +0,0 @@
1
- require File.expand_path('../test_helper', __FILE__)
2
-
3
- class IETestController < ActionController::Base
4
- before_filter :normal_cookies_for_ie_in_iframes!, :only => :activate
5
-
6
- def activate
7
- render :text => 'OK'
8
- end
9
-
10
- def visit
11
- render :text => 'OK'
12
- end
13
-
14
- def with_etag
15
- if stale?(:etag => 'foo')
16
- render :text => 'OK'
17
- end
18
- end
19
-
20
- def with_modified
21
- if stale?(:last_modified => 1.minute.ago)
22
- render :text => 'OK'
23
- end
24
- end
25
- end
26
-
27
- class IEIFrameCookiesTest < ActionController::TestCase
28
- tests IETestController
29
-
30
- DEFAULT_ETAG = ActionPack::VERSION::MAJOR > 2 ? nil : '"e0aa021e21dddbd6d8cecec71e9cf564"'
31
-
32
- setup do
33
- @request = ActionController::TestRequest.new
34
- end
35
-
36
- def is_ok!
37
- assert_equal 'OK', @response.body
38
- assert_equal 200, @response.status.to_i
39
- end
40
-
41
- def is_not_modified!
42
- assert_equal 304, @response.status.to_i
43
- end
44
-
45
- def set_ie
46
- @request.env['HTTP_USER_AGENT'] = 'Mr. MSIE is coming...'
47
- end
48
-
49
- def set_tracked
50
- @request.cookies['using_iframes_in_ie'] = 'true'
51
- end
52
-
53
- def set_etag
54
- @request.env['HTTP_IF_NONE_MATCH'] = '"acbd18db4cc2f85cedef654fccc4a4d8"'
55
- end
56
-
57
- def set_modified(time)
58
- @request.env['HTTP_IF_MODIFIED_SINCE'] = time.rfc2822
59
- end
60
-
61
- test "it has a VERSION" do
62
- assert_match /^\d+\.\d+\.\d+$/, IEIframeCookies::VERSION
63
- end
64
-
65
- # adding tracking cookie
66
- test "it sets tracking cookie for IE users" do
67
- set_ie
68
- get :activate
69
- is_ok!
70
- assert_equal "true", cookies['using_iframes_in_ie'].to_s
71
- end
72
-
73
- test "it sets tracking cookie for IE11" do
74
- @request.env['HTTP_USER_AGENT'] = "Some Trident thingy"
75
- get :activate
76
- is_ok!
77
- assert_equal "true", cookies['using_iframes_in_ie'].to_s
78
- end
79
-
80
- test "does not set tracking cookie for nice users" do
81
- get :activate
82
- is_ok!
83
- assert_equal nil, cookies['using_iframes_in_ie']
84
- end
85
-
86
- # etag for get requests to trick rack::conditionalget
87
- test "it adds a always-fresh ETAG for tracked IE users on get, so rack thinks its fresh" do
88
- set_tracked
89
- set_ie
90
- get :visit
91
- is_ok!
92
- old = @response.headers['ETag']
93
-
94
- get :visit
95
- is_ok!
96
- assert_not_equal old, @response.headers['ETag']
97
- end
98
-
99
- test "it does not add an etag if the request is not get" do
100
- set_tracked
101
- set_ie
102
- post :visit
103
- is_ok!
104
- assert_equal DEFAULT_ETAG, @response.headers['ETag']
105
- end
106
-
107
- test "it does not add an etag if non ie" do
108
- set_tracked
109
- get :visit
110
- is_ok!
111
- assert_equal DEFAULT_ETAG, @response.headers['ETag']
112
- end
113
-
114
- test "it does not add an etag if not tracked" do
115
- set_ie
116
- get :visit
117
- is_ok!
118
- assert_equal DEFAULT_ETAG, @response.headers['ETag']
119
- end
120
-
121
- # returning P3P headers
122
- test "it adds P3P headers for tracked IE users" do
123
- set_tracked
124
- set_ie
125
- get :visit
126
- is_ok!
127
- assert_equal 'CP="ALL DSP COR CURa ADMa DEVa OUR IND COM NAV"', @response.headers['P3P']
128
- end
129
-
130
- test "it does not add P3P headers for un-tracked IE users" do
131
- set_ie
132
- get :visit
133
- is_ok!
134
- assert_equal nil, @response.headers['P3P']
135
- end
136
-
137
- test "it does not add P3P headers for tracked nice users" do
138
- set_tracked
139
- get :visit
140
- is_ok!
141
- assert_equal nil, @response.headers['P3P']
142
- end
143
-
144
- # disable ETags 304
145
- test "is not modified for tracked nice users" do
146
- set_etag
147
- set_tracked
148
- get :with_etag
149
- is_not_modified!
150
- end
151
-
152
- test "is not modified for un-tracked ie users" do
153
- set_etag
154
- set_tracked
155
- get :with_etag
156
- is_not_modified!
157
- end
158
-
159
- test "is modified for tracked ie users" do
160
- set_etag
161
- set_tracked
162
- set_ie
163
- get :with_etag
164
- is_ok!
165
- end
166
-
167
- test "is not modified via modified since" do
168
- set_modified(0.minutes.ago)
169
- get :with_modified
170
- is_not_modified!
171
- end
172
-
173
- test "is modified via modified since" do
174
- set_modified(2.minutes.ago)
175
- get :with_modified
176
- is_ok!
177
- end
178
-
179
- test "is modified via modified since for tracked ie users" do
180
- set_tracked
181
- set_ie
182
- set_modified(0.minutes.ago)
183
- get :with_modified
184
- is_ok!
185
- end
186
- end
data/test/test_helper.rb DELETED
@@ -1,53 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'active_support/all'
3
- require 'action_pack'
4
- require 'action_controller'
5
-
6
- if ActionPack::VERSION::MAJOR > 2
7
- require 'action_dispatch/testing/test_process'
8
- ActionController::TestCase::Behavior # autoloads
9
-
10
- ROUTES = ActionDispatch::Routing::RouteSet.new
11
- ROUTES.draw do
12
- match ':controller(/:action(/:id(.:format)))', :via => :any
13
- end
14
- ROUTES.finalize!
15
-
16
- # get routes working without having to mess in actual test
17
- ActionController::TestCase.setup do
18
- @routes = ROUTES
19
- end
20
-
21
- ActionController::TestRequest.class_eval do
22
- def cookie_jar
23
- cookies.instance_variable_set(:@set_cookies, {})
24
- def cookies.recycle!
25
- end
26
- cookies
27
- end
28
- end
29
-
30
- ActionController::Base.class_eval do
31
- def _routes
32
- ROUTES
33
- end
34
- end
35
- else
36
- require 'action_controller/test_process'
37
- ActionController::Routing::Routes.reload rescue nil
38
-
39
- # do not try to load helpers
40
- ActionController::Helpers::ClassMethods.class_eval do
41
- def inherited_with_helper(*args)
42
- inherited_without_helper(*args)
43
- end
44
- end
45
- end
46
-
47
- $LOAD_PATH << 'lib'
48
- require 'ie_iframe_cookies/version'
49
- require 'ie_iframe_cookies'
50
-
51
- # fake rails env for initialisation
52
- # when Rails is defined, backtrace_cleaner is used, when assert fails
53
- RAILS_ENV = 'development'