clearance 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of clearance might be problematic. Click here for more details.

@@ -2,12 +2,12 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.0.9"
5
+ gem "capybara", "~> 1.1.1"
6
+ gem "factory_girl_rails", "1.7.0"
6
7
  gem "shoulda-matchers", :git=>"git://github.com/thoughtbot/shoulda-matchers.git"
7
8
  gem "database_cleaner"
8
- gem "aruba", "~> 0.4.2"
9
- gem "capybara", "~> 1.1.1"
10
- gem "factory_girl_rails"
11
9
  gem "launchy"
10
+ gem "aruba", "~> 0.4.2"
11
+ gem "rails", "3.1.4"
12
12
 
13
13
  gemspec :path=>"../"
@@ -0,0 +1,186 @@
1
+ GIT
2
+ remote: git://github.com/thoughtbot/shoulda-matchers.git
3
+ revision: d85503f86ef224bca2b54fc6b9ad96866fe12f2d
4
+ specs:
5
+ shoulda-matchers (1.0.0)
6
+
7
+ PATH
8
+ remote: /Users/mjankowski/Development/opensource/clearance
9
+ specs:
10
+ clearance (0.16.1)
11
+ diesel (~> 0.1.5)
12
+ rails (>= 3.0)
13
+
14
+ GEM
15
+ remote: http://rubygems.org/
16
+ specs:
17
+ actionmailer (3.1.4)
18
+ actionpack (= 3.1.4)
19
+ mail (~> 2.3.0)
20
+ actionpack (3.1.4)
21
+ activemodel (= 3.1.4)
22
+ activesupport (= 3.1.4)
23
+ builder (~> 3.0.0)
24
+ erubis (~> 2.7.0)
25
+ i18n (~> 0.6)
26
+ rack (~> 1.3.6)
27
+ rack-cache (~> 1.1)
28
+ rack-mount (~> 0.8.2)
29
+ rack-test (~> 0.6.1)
30
+ sprockets (~> 2.0.3)
31
+ activemodel (3.1.4)
32
+ activesupport (= 3.1.4)
33
+ builder (~> 3.0.0)
34
+ i18n (~> 0.6)
35
+ activerecord (3.1.4)
36
+ activemodel (= 3.1.4)
37
+ activesupport (= 3.1.4)
38
+ arel (~> 2.2.3)
39
+ tzinfo (~> 0.3.29)
40
+ activeresource (3.1.4)
41
+ activemodel (= 3.1.4)
42
+ activesupport (= 3.1.4)
43
+ activesupport (3.1.4)
44
+ multi_json (~> 1.0)
45
+ addressable (2.2.7)
46
+ appraisal (0.3.8)
47
+ bundler
48
+ rake
49
+ arel (2.2.3)
50
+ aruba (0.4.11)
51
+ childprocess (>= 0.2.3)
52
+ cucumber (>= 1.1.1)
53
+ ffi (>= 1.0.11)
54
+ rspec (>= 2.7.0)
55
+ bourne (1.1.2)
56
+ mocha (= 0.10.5)
57
+ builder (3.0.0)
58
+ capybara (1.1.2)
59
+ mime-types (>= 1.16)
60
+ nokogiri (>= 1.3.3)
61
+ rack (>= 1.0.0)
62
+ rack-test (>= 0.5.4)
63
+ selenium-webdriver (~> 2.0)
64
+ xpath (~> 0.1.4)
65
+ childprocess (0.3.1)
66
+ ffi (~> 1.0.6)
67
+ cucumber (1.1.9)
68
+ builder (>= 2.1.2)
69
+ diff-lcs (>= 1.1.2)
70
+ gherkin (~> 2.9.0)
71
+ json (>= 1.4.6)
72
+ term-ansicolor (>= 1.0.6)
73
+ cucumber-rails (1.1.1)
74
+ capybara (>= 1.1.1)
75
+ cucumber (>= 1.1.0)
76
+ nokogiri (>= 1.5.0)
77
+ database_cleaner (0.7.2)
78
+ diesel (0.1.5)
79
+ railties
80
+ diff-lcs (1.1.3)
81
+ erubis (2.7.0)
82
+ factory_girl (2.6.4)
83
+ activesupport (>= 2.3.9)
84
+ factory_girl_rails (1.7.0)
85
+ factory_girl (~> 2.6.0)
86
+ railties (>= 3.0.0)
87
+ ffi (1.0.11)
88
+ gherkin (2.9.3)
89
+ json (>= 1.4.6)
90
+ hike (1.2.1)
91
+ i18n (0.6.0)
92
+ json (1.6.6)
93
+ launchy (2.1.0)
94
+ addressable (~> 2.2.6)
95
+ mail (2.3.3)
96
+ i18n (>= 0.4.0)
97
+ mime-types (~> 1.16)
98
+ treetop (~> 1.4.8)
99
+ metaclass (0.0.1)
100
+ mime-types (1.18)
101
+ mocha (0.10.5)
102
+ metaclass (~> 0.0.1)
103
+ multi_json (1.2.0)
104
+ nokogiri (1.5.2)
105
+ polyglot (0.3.3)
106
+ rack (1.3.6)
107
+ rack-cache (1.2)
108
+ rack (>= 0.4)
109
+ rack-mount (0.8.3)
110
+ rack (>= 1.0.0)
111
+ rack-ssl (1.3.2)
112
+ rack
113
+ rack-test (0.6.1)
114
+ rack (>= 1.0)
115
+ rails (3.1.4)
116
+ actionmailer (= 3.1.4)
117
+ actionpack (= 3.1.4)
118
+ activerecord (= 3.1.4)
119
+ activeresource (= 3.1.4)
120
+ activesupport (= 3.1.4)
121
+ bundler (~> 1.0)
122
+ railties (= 3.1.4)
123
+ railties (3.1.4)
124
+ actionpack (= 3.1.4)
125
+ activesupport (= 3.1.4)
126
+ rack-ssl (~> 1.3.2)
127
+ rake (>= 0.8.7)
128
+ rdoc (~> 3.4)
129
+ thor (~> 0.14.6)
130
+ rake (0.9.2.2)
131
+ rdoc (3.12)
132
+ json (~> 1.4)
133
+ rspec (2.9.0)
134
+ rspec-core (~> 2.9.0)
135
+ rspec-expectations (~> 2.9.0)
136
+ rspec-mocks (~> 2.9.0)
137
+ rspec-core (2.9.0)
138
+ rspec-expectations (2.9.1)
139
+ diff-lcs (~> 1.1.3)
140
+ rspec-mocks (2.9.0)
141
+ rspec-rails (2.9.0)
142
+ actionpack (>= 3.0)
143
+ activesupport (>= 3.0)
144
+ railties (>= 3.0)
145
+ rspec (~> 2.9.0)
146
+ rubyzip (0.9.6.1)
147
+ selenium-webdriver (2.20.0)
148
+ childprocess (>= 0.2.5)
149
+ ffi (~> 1.0)
150
+ multi_json (~> 1.0)
151
+ rubyzip
152
+ sprockets (2.0.3)
153
+ hike (~> 1.2)
154
+ rack (~> 1.0)
155
+ tilt (~> 1.1, != 1.3.0)
156
+ sqlite3 (1.3.5)
157
+ term-ansicolor (1.0.7)
158
+ thor (0.14.6)
159
+ tilt (1.3.3)
160
+ timecop (0.3.5)
161
+ treetop (1.4.10)
162
+ polyglot
163
+ polyglot (>= 0.3.1)
164
+ tzinfo (0.3.32)
165
+ xpath (0.1.4)
166
+ nokogiri (~> 1.3)
167
+
168
+ PLATFORMS
169
+ ruby
170
+
171
+ DEPENDENCIES
172
+ appraisal (~> 0.3.8)
173
+ aruba (~> 0.4.2)
174
+ bourne
175
+ bundler (~> 1.1.0)
176
+ capybara (~> 1.1.1)
177
+ clearance!
178
+ cucumber-rails (~> 1.1.1)
179
+ database_cleaner
180
+ factory_girl_rails (= 1.7.0)
181
+ launchy
182
+ rails (= 3.1.4)
183
+ rspec-rails (~> 2.9.0)
184
+ shoulda-matchers!
185
+ sqlite3
186
+ timecop
@@ -2,12 +2,12 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.1.0"
5
+ gem "capybara", "~> 1.1.1"
6
+ gem "factory_girl_rails", "1.7.0"
6
7
  gem "shoulda-matchers", :git=>"git://github.com/thoughtbot/shoulda-matchers.git"
7
8
  gem "database_cleaner"
8
- gem "aruba", "~> 0.4.2"
9
- gem "capybara", "~> 1.1.1"
10
- gem "factory_girl_rails"
11
9
  gem "launchy"
10
+ gem "aruba", "~> 0.4.2"
11
+ gem "rails", "3.2.3"
12
12
 
13
13
  gemspec :path=>"../"
@@ -0,0 +1,184 @@
1
+ GIT
2
+ remote: git://github.com/thoughtbot/shoulda-matchers.git
3
+ revision: 983dd549d9d1b5a0ab4adc827911ff3913a91dc5
4
+ specs:
5
+ shoulda-matchers (1.0.0)
6
+
7
+ PATH
8
+ remote: /Users/mjankowski/Development/opensource/clearance
9
+ specs:
10
+ clearance (0.16.1)
11
+ diesel (~> 0.1.5)
12
+ rails (>= 3.0)
13
+
14
+ GEM
15
+ remote: http://rubygems.org/
16
+ specs:
17
+ actionmailer (3.2.3)
18
+ actionpack (= 3.2.3)
19
+ mail (~> 2.4.4)
20
+ actionpack (3.2.3)
21
+ activemodel (= 3.2.3)
22
+ activesupport (= 3.2.3)
23
+ builder (~> 3.0.0)
24
+ erubis (~> 2.7.0)
25
+ journey (~> 1.0.1)
26
+ rack (~> 1.4.0)
27
+ rack-cache (~> 1.2)
28
+ rack-test (~> 0.6.1)
29
+ sprockets (~> 2.1.2)
30
+ activemodel (3.2.3)
31
+ activesupport (= 3.2.3)
32
+ builder (~> 3.0.0)
33
+ activerecord (3.2.3)
34
+ activemodel (= 3.2.3)
35
+ activesupport (= 3.2.3)
36
+ arel (~> 3.0.2)
37
+ tzinfo (~> 0.3.29)
38
+ activeresource (3.2.3)
39
+ activemodel (= 3.2.3)
40
+ activesupport (= 3.2.3)
41
+ activesupport (3.2.3)
42
+ i18n (~> 0.6)
43
+ multi_json (~> 1.0)
44
+ addressable (2.2.7)
45
+ appraisal (0.3.8)
46
+ bundler
47
+ rake
48
+ arel (3.0.2)
49
+ aruba (0.4.11)
50
+ childprocess (>= 0.2.3)
51
+ cucumber (>= 1.1.1)
52
+ ffi (>= 1.0.11)
53
+ rspec (>= 2.7.0)
54
+ bourne (1.1.2)
55
+ mocha (= 0.10.5)
56
+ builder (3.0.0)
57
+ capybara (1.1.2)
58
+ mime-types (>= 1.16)
59
+ nokogiri (>= 1.3.3)
60
+ rack (>= 1.0.0)
61
+ rack-test (>= 0.5.4)
62
+ selenium-webdriver (~> 2.0)
63
+ xpath (~> 0.1.4)
64
+ childprocess (0.3.1)
65
+ ffi (~> 1.0.6)
66
+ cucumber (1.1.9)
67
+ builder (>= 2.1.2)
68
+ diff-lcs (>= 1.1.2)
69
+ gherkin (~> 2.9.0)
70
+ json (>= 1.4.6)
71
+ term-ansicolor (>= 1.0.6)
72
+ cucumber-rails (1.1.1)
73
+ capybara (>= 1.1.1)
74
+ cucumber (>= 1.1.0)
75
+ nokogiri (>= 1.5.0)
76
+ database_cleaner (0.7.2)
77
+ diesel (0.1.5)
78
+ railties
79
+ diff-lcs (1.1.3)
80
+ erubis (2.7.0)
81
+ factory_girl (2.6.4)
82
+ activesupport (>= 2.3.9)
83
+ factory_girl_rails (1.7.0)
84
+ factory_girl (~> 2.6.0)
85
+ railties (>= 3.0.0)
86
+ ffi (1.0.11)
87
+ gherkin (2.9.3)
88
+ json (>= 1.4.6)
89
+ hike (1.2.1)
90
+ i18n (0.6.0)
91
+ journey (1.0.3)
92
+ json (1.6.6)
93
+ launchy (2.1.0)
94
+ addressable (~> 2.2.6)
95
+ mail (2.4.4)
96
+ i18n (>= 0.4.0)
97
+ mime-types (~> 1.16)
98
+ treetop (~> 1.4.8)
99
+ metaclass (0.0.1)
100
+ mime-types (1.18)
101
+ mocha (0.10.5)
102
+ metaclass (~> 0.0.1)
103
+ multi_json (1.2.0)
104
+ nokogiri (1.5.2)
105
+ polyglot (0.3.3)
106
+ rack (1.4.1)
107
+ rack-cache (1.2)
108
+ rack (>= 0.4)
109
+ rack-ssl (1.3.2)
110
+ rack
111
+ rack-test (0.6.1)
112
+ rack (>= 1.0)
113
+ rails (3.2.3)
114
+ actionmailer (= 3.2.3)
115
+ actionpack (= 3.2.3)
116
+ activerecord (= 3.2.3)
117
+ activeresource (= 3.2.3)
118
+ activesupport (= 3.2.3)
119
+ bundler (~> 1.0)
120
+ railties (= 3.2.3)
121
+ railties (3.2.3)
122
+ actionpack (= 3.2.3)
123
+ activesupport (= 3.2.3)
124
+ rack-ssl (~> 1.3.2)
125
+ rake (>= 0.8.7)
126
+ rdoc (~> 3.4)
127
+ thor (~> 0.14.6)
128
+ rake (0.9.2.2)
129
+ rdoc (3.12)
130
+ json (~> 1.4)
131
+ rspec (2.9.0)
132
+ rspec-core (~> 2.9.0)
133
+ rspec-expectations (~> 2.9.0)
134
+ rspec-mocks (~> 2.9.0)
135
+ rspec-core (2.9.0)
136
+ rspec-expectations (2.9.1)
137
+ diff-lcs (~> 1.1.3)
138
+ rspec-mocks (2.9.0)
139
+ rspec-rails (2.9.0)
140
+ actionpack (>= 3.0)
141
+ activesupport (>= 3.0)
142
+ railties (>= 3.0)
143
+ rspec (~> 2.9.0)
144
+ rubyzip (0.9.6.1)
145
+ selenium-webdriver (2.20.0)
146
+ childprocess (>= 0.2.5)
147
+ ffi (~> 1.0)
148
+ multi_json (~> 1.0)
149
+ rubyzip
150
+ sprockets (2.1.2)
151
+ hike (~> 1.2)
152
+ rack (~> 1.0)
153
+ tilt (~> 1.1, != 1.3.0)
154
+ sqlite3 (1.3.5)
155
+ term-ansicolor (1.0.7)
156
+ thor (0.14.6)
157
+ tilt (1.3.3)
158
+ timecop (0.3.5)
159
+ treetop (1.4.10)
160
+ polyglot
161
+ polyglot (>= 0.3.1)
162
+ tzinfo (0.3.32)
163
+ xpath (0.1.4)
164
+ nokogiri (~> 1.3)
165
+
166
+ PLATFORMS
167
+ ruby
168
+
169
+ DEPENDENCIES
170
+ appraisal (~> 0.3.8)
171
+ aruba (~> 0.4.2)
172
+ bourne
173
+ bundler (~> 1.1.0)
174
+ capybara (~> 1.1.1)
175
+ clearance!
176
+ cucumber-rails (~> 1.1.1)
177
+ database_cleaner
178
+ factory_girl_rails (= 1.7.0)
179
+ launchy
180
+ rails (= 3.2.3)
181
+ rspec-rails (~> 2.9.0)
182
+ shoulda-matchers!
183
+ sqlite3
184
+ timecop
@@ -49,7 +49,7 @@ module Clearance
49
49
  end
50
50
 
51
51
  def cookies
52
- @cookies ||= Rack::Request.new(@env).cookies
52
+ @cookies ||= @env['action_dispatch.cookies'] || Rack::Request.new(@env).cookies
53
53
  end
54
54
  end
55
55
  end
@@ -7,7 +7,7 @@ module Clearance
7
7
  end
8
8
 
9
9
  def sign_in
10
- sign_in_as Factory(:user)
10
+ sign_in_as FactoryGirl.create(:user)
11
11
  end
12
12
 
13
13
  def sign_out
@@ -0,0 +1,3 @@
1
+ module Clearance
2
+ VERSION = '0.16.1'
3
+ end
@@ -5,7 +5,7 @@ describe Clearance::Session do
5
5
  after { Timecop.return }
6
6
 
7
7
  it "finds a user from a cookie" do
8
- user = Factory(:user)
8
+ user = create(:user)
9
9
  env = env_with_remember_token(user.remember_token)
10
10
 
11
11
  session = Clearance::Session.new(env)
@@ -14,7 +14,7 @@ describe Clearance::Session do
14
14
  end
15
15
 
16
16
  it "returns nil for an unknown user" do
17
- user = Factory(:user)
17
+ user = create(:user)
18
18
  env = env_with_remember_token("bogus")
19
19
 
20
20
  session = Clearance::Session.new(env)
@@ -30,14 +30,14 @@ describe Clearance::Session do
30
30
  end
31
31
 
32
32
  it "signs in a given user" do
33
- user = Factory(:user)
33
+ user = create(:user)
34
34
  session = Clearance::Session.new(env_without_remember_token)
35
35
  session.sign_in user
36
36
  session.current_user.should == user
37
37
  end
38
38
 
39
39
  it "sets a remember token cookie with a default expiration of 1 year from now" do
40
- user = Factory(:user)
40
+ user = create(:user)
41
41
  headers = {}
42
42
  session = Clearance::Session.new(env_without_remember_token)
43
43
  session.sign_in user
@@ -48,7 +48,7 @@ describe Clearance::Session do
48
48
  it "sets a remember token cookie with a custom expiration" do
49
49
  custom_expiration = 1.day.from_now
50
50
  with_custom_expiration 1.day.from_now do
51
- user = Factory(:user)
51
+ user = create(:user)
52
52
  headers = {}
53
53
  session = Clearance::Session.new(env_without_remember_token)
54
54
  session.sign_in user
@@ -66,7 +66,7 @@ describe Clearance::Session do
66
66
  end
67
67
 
68
68
  it "signs out a user" do
69
- user = Factory(:user)
69
+ user = create(:user)
70
70
  old_remember_token = user.remember_token
71
71
  env = env_with_remember_token(old_remember_token)
72
72