ie_iframe_cookies 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - ree
3
+ - 1.9.2
4
+ - 1.9.3
data/Appraisals ADDED
@@ -0,0 +1,5 @@
1
+ %w[2.3.14 3.1.8 3.2.9].each do |version|
2
+ appraise "rails-#{version}" do
3
+ gem "rails", "~> #{version}"
4
+ end
5
+ end
data/Gemfile CHANGED
@@ -1,7 +1,8 @@
1
1
  source :rubygems
2
2
  gemspec
3
3
 
4
- group :development do
5
- gem 'rails', ENV['RAILS']
6
- gem 'rake'
7
- end
4
+ gem 'appraisal'
5
+ gem 'bump'
6
+ gem 'rails'
7
+ gem 'rake'
8
+ gem 'test-unit', '>= 2.5.3'
data/Gemfile.lock CHANGED
@@ -1,94 +1,100 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ie_iframe_cookies (0.1.3)
4
+ ie_iframe_cookies (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- actionmailer (3.1.2)
10
- actionpack (= 3.1.2)
11
- mail (~> 2.3.0)
12
- actionpack (3.1.2)
13
- activemodel (= 3.1.2)
14
- activesupport (= 3.1.2)
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
15
  builder (~> 3.0.0)
16
16
  erubis (~> 2.7.0)
17
- i18n (~> 0.6)
18
- rack (~> 1.3.5)
19
- rack-cache (~> 1.1)
20
- rack-mount (~> 0.8.2)
17
+ journey (~> 1.0.1)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.2)
21
20
  rack-test (~> 0.6.1)
22
- sprockets (~> 2.1.0)
23
- activemodel (3.1.2)
24
- activesupport (= 3.1.2)
21
+ sprockets (~> 2.1.3)
22
+ activemodel (3.2.5)
23
+ activesupport (= 3.2.5)
25
24
  builder (~> 3.0.0)
26
- i18n (~> 0.6)
27
- activerecord (3.1.2)
28
- activemodel (= 3.1.2)
29
- activesupport (= 3.1.2)
30
- arel (~> 2.2.1)
25
+ activerecord (3.2.5)
26
+ activemodel (= 3.2.5)
27
+ activesupport (= 3.2.5)
28
+ arel (~> 3.0.2)
31
29
  tzinfo (~> 0.3.29)
32
- activeresource (3.1.2)
33
- activemodel (= 3.1.2)
34
- activesupport (= 3.1.2)
35
- activesupport (3.1.2)
30
+ activeresource (3.2.5)
31
+ activemodel (= 3.2.5)
32
+ activesupport (= 3.2.5)
33
+ activesupport (3.2.5)
34
+ i18n (~> 0.6)
36
35
  multi_json (~> 1.0)
37
- arel (2.2.1)
36
+ appraisal (0.5.1)
37
+ bundler
38
+ rake
39
+ arel (3.0.2)
38
40
  builder (3.0.0)
41
+ bump (0.3.7)
39
42
  erubis (2.7.0)
40
43
  hike (1.2.1)
41
44
  i18n (0.6.0)
42
- json (1.6.1)
43
- mail (2.3.0)
45
+ journey (1.0.3)
46
+ json (1.7.3)
47
+ mail (2.4.4)
44
48
  i18n (>= 0.4.0)
45
49
  mime-types (~> 1.16)
46
50
  treetop (~> 1.4.8)
47
- mime-types (1.17.2)
48
- multi_json (1.0.3)
51
+ mime-types (1.18)
52
+ multi_json (1.3.6)
49
53
  polyglot (0.3.3)
50
- rack (1.3.5)
51
- rack-cache (1.1)
54
+ rack (1.4.1)
55
+ rack-cache (1.2)
52
56
  rack (>= 0.4)
53
- rack-mount (0.8.3)
54
- rack (>= 1.0.0)
55
57
  rack-ssl (1.3.2)
56
58
  rack
57
59
  rack-test (0.6.1)
58
60
  rack (>= 1.0)
59
- rails (3.1.2)
60
- actionmailer (= 3.1.2)
61
- actionpack (= 3.1.2)
62
- activerecord (= 3.1.2)
63
- activeresource (= 3.1.2)
64
- activesupport (= 3.1.2)
61
+ rails (3.2.5)
62
+ actionmailer (= 3.2.5)
63
+ actionpack (= 3.2.5)
64
+ activerecord (= 3.2.5)
65
+ activeresource (= 3.2.5)
66
+ activesupport (= 3.2.5)
65
67
  bundler (~> 1.0)
66
- railties (= 3.1.2)
67
- railties (3.1.2)
68
- actionpack (= 3.1.2)
69
- activesupport (= 3.1.2)
68
+ railties (= 3.2.5)
69
+ railties (3.2.5)
70
+ actionpack (= 3.2.5)
71
+ activesupport (= 3.2.5)
70
72
  rack-ssl (~> 1.3.2)
71
73
  rake (>= 0.8.7)
72
74
  rdoc (~> 3.4)
73
- thor (~> 0.14.6)
74
- rake (0.9.2)
75
- rdoc (3.11)
75
+ thor (>= 0.14.6, < 2.0)
76
+ rake (0.9.2.2)
77
+ rdoc (3.12)
76
78
  json (~> 1.4)
77
- sprockets (2.1.1)
79
+ sprockets (2.1.3)
78
80
  hike (~> 1.2)
79
81
  rack (~> 1.0)
80
82
  tilt (~> 1.1, != 1.3.0)
81
- thor (0.14.6)
83
+ test-unit (2.5.3)
84
+ thor (0.15.2)
82
85
  tilt (1.3.3)
83
86
  treetop (1.4.10)
84
87
  polyglot
85
88
  polyglot (>= 0.3.1)
86
- tzinfo (0.3.31)
89
+ tzinfo (0.3.33)
87
90
 
88
91
  PLATFORMS
89
92
  ruby
90
93
 
91
94
  DEPENDENCIES
95
+ appraisal
96
+ bump
92
97
  ie_iframe_cookies!
93
98
  rails
94
99
  rake
100
+ test-unit (>= 2.5.3)
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
+ require 'bump/tasks'
4
+ require 'appraisal'
3
5
 
4
6
  Rake::TestTask.new(:test) do |test|
5
7
  test.libs << 'lib'
@@ -8,25 +10,5 @@ Rake::TestTask.new(:test) do |test|
8
10
  end
9
11
 
10
12
  task :default do
11
- %w[2.3.13 3.0.12 3.1.4 3.2.2].each do |rails_version|
12
- sh "RAILS=#{rails_version} && (bundle || bundle install) && bundle exec rake test"
13
- end
14
- sh "git checkout Gemfile.lock"
15
- end
16
-
17
- # extracted from https://github.com/grosser/project_template
18
- rule /^version:bump:.*/ do |t|
19
- sh "git status | grep 'nothing to commit'" # ensure we are not dirty
20
- index = ['major', 'minor','patch'].index(t.name.split(':').last)
21
- file = 'lib/ie_iframe_cookies/version.rb'
22
-
23
- version_file = File.read(file)
24
- old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
25
- version_parts[index] = version_parts[index].to_i + 1
26
- version_parts[2] = 0 if index < 2 # remove patch for minor
27
- version_parts[1] = 0 if index < 1 # remove minor for major
28
- new_version = version_parts * '.'
29
- File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
30
-
31
- sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
13
+ sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
32
14
  end
data/Readme.md CHANGED
@@ -7,11 +7,8 @@ IFrames in IE only get the same cookies as normal pages when P3P headers are add
7
7
 
8
8
  Install
9
9
  =======
10
- sudo gem install ie_iframe_cookies
11
- Or
12
-
13
- rails plugin install git://github.com/grosser/ie_iframe_cookies.git
14
10
 
11
+ gem install ie_iframe_cookies
15
12
 
16
13
  Usage
17
14
  =====
@@ -20,6 +17,10 @@ To cookie-tag users as 'iframe-using', add this to all actions rendered inside I
20
17
 
21
18
  before_filter :normal_cookies_for_ie_in_iframes! # :only => [:foo, :bar]
22
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
+
23
24
  Authors
24
25
  =======
25
26
 
@@ -30,4 +31,5 @@ Authors
30
31
 
31
32
  [Michael Grosser](http://grosser.it)<br/>
32
33
  michael@grosser.it<br/>
33
- License: MIT
34
+ License: MIT<br/>
35
+ [![Build Status](https://travis-ci.org/grosser/ie_iframe_cookies.png)](https://travis-ci.org/grosser/ie_iframe_cookies)
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source :rubygems
4
+
5
+ gem "appraisal"
6
+ gem "bump"
7
+ gem "rake"
8
+ gem "test-unit", ">= 2.5.3"
9
+ gem "rails", "~> 2.3.14"
10
+
11
+ gemspec :path=>"../"
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: /Users/mgrosser/code/tools/ie_iframe_cookies
3
+ specs:
4
+ ie_iframe_cookies (0.1.3)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ actionmailer (2.3.14)
10
+ actionpack (= 2.3.14)
11
+ actionpack (2.3.14)
12
+ activesupport (= 2.3.14)
13
+ rack (~> 1.1.0)
14
+ activerecord (2.3.14)
15
+ activesupport (= 2.3.14)
16
+ activeresource (2.3.14)
17
+ activesupport (= 2.3.14)
18
+ activesupport (2.3.14)
19
+ appraisal (0.5.1)
20
+ bundler
21
+ rake
22
+ bump (0.3.7)
23
+ rack (1.1.3)
24
+ rails (2.3.14)
25
+ actionmailer (= 2.3.14)
26
+ actionpack (= 2.3.14)
27
+ activerecord (= 2.3.14)
28
+ activeresource (= 2.3.14)
29
+ activesupport (= 2.3.14)
30
+ rake (>= 0.8.3)
31
+ rake (10.0.3)
32
+ test-unit (2.5.3)
33
+
34
+ PLATFORMS
35
+ ruby
36
+
37
+ DEPENDENCIES
38
+ appraisal
39
+ bump
40
+ ie_iframe_cookies!
41
+ rails (~> 2.3.14)
42
+ rake
43
+ test-unit (>= 2.5.3)
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source :rubygems
4
+
5
+ gem "appraisal"
6
+ gem "bump"
7
+ gem "rake"
8
+ gem "test-unit", ">= 2.5.3"
9
+ gem "rails", "~> 3.1.8"
10
+
11
+ gemspec :path=>"../"
@@ -0,0 +1,102 @@
1
+ PATH
2
+ remote: /Users/mgrosser/code/tools/ie_iframe_cookies
3
+ specs:
4
+ ie_iframe_cookies (0.1.3)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ actionmailer (3.1.8)
10
+ actionpack (= 3.1.8)
11
+ mail (~> 2.3.3)
12
+ actionpack (3.1.8)
13
+ activemodel (= 3.1.8)
14
+ activesupport (= 3.1.8)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ i18n (~> 0.6)
18
+ rack (~> 1.3.6)
19
+ rack-cache (~> 1.2)
20
+ rack-mount (~> 0.8.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.0.4)
23
+ activemodel (3.1.8)
24
+ activesupport (= 3.1.8)
25
+ builder (~> 3.0.0)
26
+ i18n (~> 0.6)
27
+ activerecord (3.1.8)
28
+ activemodel (= 3.1.8)
29
+ activesupport (= 3.1.8)
30
+ arel (~> 2.2.3)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.1.8)
33
+ activemodel (= 3.1.8)
34
+ activesupport (= 3.1.8)
35
+ activesupport (3.1.8)
36
+ multi_json (>= 1.0, < 1.3)
37
+ appraisal (0.5.1)
38
+ bundler
39
+ rake
40
+ arel (2.2.3)
41
+ builder (3.0.4)
42
+ bump (0.3.7)
43
+ erubis (2.7.0)
44
+ hike (1.2.1)
45
+ i18n (0.6.1)
46
+ json (1.7.5)
47
+ mail (2.3.3)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.19)
52
+ multi_json (1.2.0)
53
+ polyglot (0.3.3)
54
+ rack (1.3.6)
55
+ rack-cache (1.2)
56
+ rack (>= 0.4)
57
+ rack-mount (0.8.3)
58
+ rack (>= 1.0.0)
59
+ rack-ssl (1.3.2)
60
+ rack
61
+ rack-test (0.6.2)
62
+ rack (>= 1.0)
63
+ rails (3.1.8)
64
+ actionmailer (= 3.1.8)
65
+ actionpack (= 3.1.8)
66
+ activerecord (= 3.1.8)
67
+ activeresource (= 3.1.8)
68
+ activesupport (= 3.1.8)
69
+ bundler (~> 1.0)
70
+ railties (= 3.1.8)
71
+ railties (3.1.8)
72
+ actionpack (= 3.1.8)
73
+ activesupport (= 3.1.8)
74
+ rack-ssl (~> 1.3.2)
75
+ rake (>= 0.8.7)
76
+ rdoc (~> 3.4)
77
+ thor (~> 0.14.6)
78
+ rake (10.0.3)
79
+ rdoc (3.12)
80
+ json (~> 1.4)
81
+ sprockets (2.0.4)
82
+ hike (~> 1.2)
83
+ rack (~> 1.0)
84
+ tilt (~> 1.1, != 1.3.0)
85
+ test-unit (2.5.3)
86
+ thor (0.14.6)
87
+ tilt (1.3.3)
88
+ treetop (1.4.12)
89
+ polyglot
90
+ polyglot (>= 0.3.1)
91
+ tzinfo (0.3.35)
92
+
93
+ PLATFORMS
94
+ ruby
95
+
96
+ DEPENDENCIES
97
+ appraisal
98
+ bump
99
+ ie_iframe_cookies!
100
+ rails (~> 3.1.8)
101
+ rake
102
+ test-unit (>= 2.5.3)
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source :rubygems
4
+
5
+ gem "appraisal"
6
+ gem "bump"
7
+ gem "rake"
8
+ gem "test-unit", ">= 2.5.3"
9
+ gem "rails", "~> 3.2.9"
10
+
11
+ gemspec :path=>"../"
@@ -0,0 +1,101 @@
1
+ PATH
2
+ remote: /Users/mgrosser/code/tools/ie_iframe_cookies
3
+ specs:
4
+ ie_iframe_cookies (0.1.3)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ actionmailer (3.2.9)
10
+ actionpack (= 3.2.9)
11
+ mail (~> 2.4.4)
12
+ actionpack (3.2.9)
13
+ activemodel (= 3.2.9)
14
+ activesupport (= 3.2.9)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ journey (~> 1.0.4)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.2)
20
+ rack-test (~> 0.6.1)
21
+ sprockets (~> 2.2.1)
22
+ activemodel (3.2.9)
23
+ activesupport (= 3.2.9)
24
+ builder (~> 3.0.0)
25
+ activerecord (3.2.9)
26
+ activemodel (= 3.2.9)
27
+ activesupport (= 3.2.9)
28
+ arel (~> 3.0.2)
29
+ tzinfo (~> 0.3.29)
30
+ activeresource (3.2.9)
31
+ activemodel (= 3.2.9)
32
+ activesupport (= 3.2.9)
33
+ activesupport (3.2.9)
34
+ i18n (~> 0.6)
35
+ multi_json (~> 1.0)
36
+ appraisal (0.5.1)
37
+ bundler
38
+ rake
39
+ arel (3.0.2)
40
+ builder (3.0.4)
41
+ bump (0.3.7)
42
+ erubis (2.7.0)
43
+ hike (1.2.1)
44
+ i18n (0.6.1)
45
+ journey (1.0.4)
46
+ json (1.7.5)
47
+ mail (2.4.4)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.19)
52
+ multi_json (1.5.0)
53
+ polyglot (0.3.3)
54
+ rack (1.4.1)
55
+ rack-cache (1.2)
56
+ rack (>= 0.4)
57
+ rack-ssl (1.3.2)
58
+ rack
59
+ rack-test (0.6.2)
60
+ rack (>= 1.0)
61
+ rails (3.2.9)
62
+ actionmailer (= 3.2.9)
63
+ actionpack (= 3.2.9)
64
+ activerecord (= 3.2.9)
65
+ activeresource (= 3.2.9)
66
+ activesupport (= 3.2.9)
67
+ bundler (~> 1.0)
68
+ railties (= 3.2.9)
69
+ railties (3.2.9)
70
+ actionpack (= 3.2.9)
71
+ activesupport (= 3.2.9)
72
+ rack-ssl (~> 1.3.2)
73
+ rake (>= 0.8.7)
74
+ rdoc (~> 3.4)
75
+ thor (>= 0.14.6, < 2.0)
76
+ rake (10.0.3)
77
+ rdoc (3.12)
78
+ json (~> 1.4)
79
+ sprockets (2.2.2)
80
+ hike (~> 1.2)
81
+ multi_json (~> 1.0)
82
+ rack (~> 1.0)
83
+ tilt (~> 1.1, != 1.3.0)
84
+ test-unit (2.5.3)
85
+ thor (0.16.0)
86
+ tilt (1.3.3)
87
+ treetop (1.4.12)
88
+ polyglot
89
+ polyglot (>= 0.3.1)
90
+ tzinfo (0.3.35)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ appraisal
97
+ bump
98
+ ie_iframe_cookies!
99
+ rails (~> 3.2.9)
100
+ rake
101
+ test-unit (>= 2.5.3)
@@ -1,3 +1,3 @@
1
1
  module IEIframeCookies
2
- VERSION = Version = "0.1.3"
2
+ VERSION = Version = "0.1.4"
3
3
  end
@@ -12,7 +12,12 @@ module ActionController
12
12
  end
13
13
 
14
14
  def normal_cookies_for_ie_in_iframes(options={})
15
- headers['P3P'] = 'CP="ALL DSP COR CURa ADMa DEVa OUR IND COM NAV"' if request.normal_cookies_for_ie_in_iframes? or options[:force]
15
+ if request.normal_cookies_for_ie_in_iframes? or options[:force]
16
+ headers['P3P'] = 'CP="ALL DSP COR CURa ADMa DEVa OUR IND COM NAV"'
17
+ if request.get? or request.head?
18
+ fresh_when :etag => rand(100_000_000) + 1, :last_modified => Time.now
19
+ end
20
+ end
16
21
  end
17
22
  end
18
23
  end
@@ -1,4 +1,4 @@
1
- require './test/test_helper'
1
+ require File.expand_path('../test_helper', __FILE__)
2
2
 
3
3
  class IETestController < ActionController::Base
4
4
  before_filter :normal_cookies_for_ie_in_iframes!, :only => :activate
@@ -25,10 +25,12 @@ class IETestController < ActionController::Base
25
25
  end
26
26
 
27
27
  class IEIFrameCookiesTest < ActionController::TestCase
28
- def setup
29
- @controller = IETestController.new
30
- @request = ActionController::TestRequest.new
31
- @response = ActionController::TestResponse.new
28
+ tests IETestController
29
+
30
+ DEFAULT_ETAG = ActionPack::VERSION::MAJOR > 2 ? nil : '"e0aa021e21dddbd6d8cecec71e9cf564"'
31
+
32
+ setup do
33
+ @request = ActionController::TestRequest.new
32
34
  end
33
35
 
34
36
  def is_ok!
@@ -74,6 +76,41 @@ class IEIFrameCookiesTest < ActionController::TestCase
74
76
  assert_equal nil, cookies['using_iframes_in_ie']
75
77
  end
76
78
 
79
+ # etag for get requests to trick rack::conditionalget
80
+ test "it adds a always-fresh ETAG for tracked IE users on get, so rack thinks its fresh" do
81
+ set_tracked
82
+ set_ie
83
+ get :visit
84
+ is_ok!
85
+ old = @response.headers['ETag']
86
+
87
+ get :visit
88
+ is_ok!
89
+ assert_not_equal old, @response.headers['ETag']
90
+ end
91
+
92
+ test "it does not add an etag if the request is not get" do
93
+ set_tracked
94
+ set_ie
95
+ post :visit
96
+ is_ok!
97
+ assert_equal DEFAULT_ETAG, @response.headers['ETag']
98
+ end
99
+
100
+ test "it does not add an etag if non ie" do
101
+ set_tracked
102
+ get :visit
103
+ is_ok!
104
+ assert_equal DEFAULT_ETAG, @response.headers['ETag']
105
+ end
106
+
107
+ test "it does not add an etag if not tracked" do
108
+ set_ie
109
+ get :visit
110
+ is_ok!
111
+ assert_equal DEFAULT_ETAG, @response.headers['ETag']
112
+ end
113
+
77
114
  # returning P3P headers
78
115
  test "it adds P3P headers for tracked IE users" do
79
116
  set_tracked
data/test/test_helper.rb CHANGED
@@ -1,8 +1,10 @@
1
1
  require 'action_pack'
2
2
  require 'action_controller'
3
+ require 'test/unit'
3
4
 
4
5
  if ActionPack::VERSION::MAJOR > 2
5
6
  require 'action_dispatch/testing/test_process'
7
+ ActionController::TestCase::Behavior # autoloads
6
8
 
7
9
  ROUTES = ActionDispatch::Routing::RouteSet.new
8
10
  ROUTES.draw do
@@ -10,40 +12,35 @@ if ActionPack::VERSION::MAJOR > 2
10
12
  end
11
13
  ROUTES.finalize!
12
14
 
13
- # funky patch to get @routes working, in 'setup' did not work
14
- module ActionController::TestCase::Behavior
15
- def process_with_routes(*args)
16
- @routes = ROUTES
17
- process_without_routes(*args)
18
- end
19
- alias_method_chain :process, :routes
20
- end
21
-
22
- class ActionController::Base
23
- self.view_paths = 'test/views'
24
-
25
- def self._routes
26
- ROUTES
27
- end
15
+ # get routes working without having to mess in actual test
16
+ ActionController::TestCase.setup do
17
+ @routes = ROUTES
28
18
  end
29
19
 
30
- class ActionController::TestRequest
20
+ ActionController::TestRequest.class_eval do
31
21
  def cookie_jar
22
+ cookies.instance_variable_set(:@set_cookies, {})
23
+ def cookies.recycle!
24
+ end
32
25
  cookies
33
26
  end
34
27
  end
35
28
  else
36
29
  require 'action_controller/test_process'
37
30
  ActionController::Routing::Routes.reload rescue nil
38
- end
39
31
 
40
- require 'test/unit'
32
+ # do not try to load helpers
33
+ ActionController::Helpers::ClassMethods.class_eval do
34
+ def inherited_with_helper(*args)
35
+ inherited_without_helper(*args)
36
+ end
37
+ end
38
+ end
41
39
 
42
40
  $LOAD_PATH << 'lib'
43
41
  require 'ie_iframe_cookies/version'
42
+ require 'ie_iframe_cookies'
44
43
 
45
44
  # fake rails env for initialisation
46
45
  # when Rails is defined, backtrace_cleaner is used, when assert fails
47
- RAILS_ENV='development'
48
-
49
- require "./init"
46
+ RAILS_ENV = 'development'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ie_iframe_cookies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
4
  prerelease:
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Grosser
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-28 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: michael@grosser.it
@@ -17,12 +17,19 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - .travis.yml
21
+ - Appraisals
20
22
  - Gemfile
21
23
  - Gemfile.lock
22
24
  - Rakefile
23
25
  - Readme.md
26
+ - gemfiles/rails_2.3.14.gemfile
27
+ - gemfiles/rails_2.3.14.gemfile.lock
28
+ - gemfiles/rails_3.1.8.gemfile
29
+ - gemfiles/rails_3.1.8.gemfile.lock
30
+ - gemfiles/rails_3.2.9.gemfile
31
+ - gemfiles/rails_3.2.9.gemfile.lock
24
32
  - ie_iframe_cookies.gemspec
25
- - init.rb
26
33
  - lib/ie_iframe_cookies.rb
27
34
  - lib/ie_iframe_cookies/version.rb
28
35
  - test/ie_iframe_cookies_test.rb
@@ -35,26 +42,26 @@ rdoc_options: []
35
42
  require_paths:
36
43
  - lib
37
44
  required_ruby_version: !ruby/object:Gem::Requirement
38
- none: false
39
45
  requirements:
40
46
  - - ! '>='
41
47
  - !ruby/object:Gem::Version
42
48
  version: '0'
43
49
  segments:
44
50
  - 0
45
- hash: -3924685781872135299
46
- required_rubygems_version: !ruby/object:Gem::Requirement
51
+ hash: 2082685623061134999
47
52
  none: false
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
54
  requirements:
49
55
  - - ! '>='
50
56
  - !ruby/object:Gem::Version
51
57
  version: '0'
52
58
  segments:
53
59
  - 0
54
- hash: -3924685781872135299
60
+ hash: 2082685623061134999
61
+ none: false
55
62
  requirements: []
56
63
  rubyforge_project:
57
- rubygems_version: 1.8.15
64
+ rubygems_version: 1.8.24
58
65
  signing_key:
59
66
  specification_version: 3
60
67
  summary: ! 'Rails: Enabled cookies inside IFrames for IE via p3p headers'
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'ie_iframe_cookies'