clearance 0.12.0 → 0.13.0
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.
Potentially problematic release.
This version of clearance might be problematic. Click here for more details.
- data/Appraisals +2 -7
- data/CHANGELOG.md +9 -1
- data/CONTRIBUTING.md +38 -0
- data/Gemfile +2 -10
- data/Gemfile.lock +45 -49
- data/LICENSE +1 -1
- data/README.md +122 -13
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/app/views/sessions/_form.html.erb +13 -0
- data/app/views/sessions/new.html.erb +1 -13
- data/clearance.gemspec +7 -2
- data/features/engine/visitor_resets_password.feature +11 -23
- data/features/engine/visitor_signs_in.feature +6 -14
- data/features/engine/visitor_signs_out.feature +1 -1
- data/features/engine/visitor_signs_up.feature +6 -16
- data/features/integration.feature +0 -2
- data/features/step_definitions/engine/clearance_steps.rb +72 -62
- data/features/support/env.rb +2 -2
- data/gemfiles/3.0.9.gemfile +5 -10
- data/gemfiles/3.0.9.gemfile.lock +28 -33
- data/gemfiles/3.1.0.gemfile +13 -0
- data/gemfiles/3.1.0.gemfile.lock +187 -0
- data/lib/clearance.rb +1 -0
- data/lib/clearance/configuration.rb +2 -1
- data/lib/clearance/password_strategies.rb +5 -0
- data/lib/clearance/password_strategies/sha1.rb +46 -0
- data/lib/clearance/user.rb +10 -38
- data/lib/generators/clearance/features/features_generator.rb +0 -10
- data/spec/models/clearance_user_spec.rb +33 -0
- data/spec/models/sha1_spec.rb +43 -0
- data/spec/models/user_spec.rb +13 -21
- metadata +106 -85
- data/features/step_definitions/web_steps.rb +0 -211
- data/features/support/appraisal.rb +0 -18
- data/features/support/paths.rb +0 -22
- data/features/support/selectors.rb +0 -39
- data/gemfiles/3.1.0.rc4.gemfile +0 -23
- data/gemfiles/3.1.0.rc4.gemfile.lock +0 -216
@@ -1,18 +0,0 @@
|
|
1
|
-
BUNDLE_ENV_VARS = %w(RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE)
|
2
|
-
ORIGINAL_BUNDLE_VARS = Hash[ENV.select{ |key,value| BUNDLE_ENV_VARS.include?(key) }]
|
3
|
-
|
4
|
-
Before do
|
5
|
-
ENV['BUNDLE_GEMFILE'] = File.join(Dir.pwd, ENV['BUNDLE_GEMFILE'])
|
6
|
-
end
|
7
|
-
|
8
|
-
After do
|
9
|
-
ORIGINAL_BUNDLE_VARS.each_pair do |key, value|
|
10
|
-
ENV[key] = value
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
When /^I reset Bundler environment variable$/ do
|
15
|
-
BUNDLE_ENV_VARS.each do |key|
|
16
|
-
ENV[key] = nil
|
17
|
-
end
|
18
|
-
end
|
data/features/support/paths.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
module NavigationHelpers
|
2
|
-
def path_to(page_name)
|
3
|
-
case page_name
|
4
|
-
|
5
|
-
when /the sign up page/i
|
6
|
-
sign_up_path
|
7
|
-
when /the sign in page/i
|
8
|
-
sign_in_path
|
9
|
-
when /the password reset request page/i
|
10
|
-
new_password_path
|
11
|
-
when /the home ?page/i
|
12
|
-
root_path
|
13
|
-
|
14
|
-
# Add more page name => path mappings here
|
15
|
-
|
16
|
-
else
|
17
|
-
raise "Can't find mapping from \"#{page_name}\" to a path."
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
World(NavigationHelpers)
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module HtmlSelectorsHelpers
|
2
|
-
# Maps a name to a selector. Used primarily by the
|
3
|
-
#
|
4
|
-
# When /^(.+) within (.+)$/ do |step, scope|
|
5
|
-
#
|
6
|
-
# step definitions in web_steps.rb
|
7
|
-
#
|
8
|
-
def selector_for(locator)
|
9
|
-
case locator
|
10
|
-
|
11
|
-
when /the page/
|
12
|
-
"html > body"
|
13
|
-
|
14
|
-
# Add more mappings here.
|
15
|
-
# Here is an example that pulls values out of the Regexp:
|
16
|
-
#
|
17
|
-
# when /the (notice|error|info) flash/
|
18
|
-
# ".flash.#{$1}"
|
19
|
-
|
20
|
-
# You can also return an array to use a different selector
|
21
|
-
# type, like:
|
22
|
-
#
|
23
|
-
# when /the header/
|
24
|
-
# [:xpath, "//header"]
|
25
|
-
|
26
|
-
# This allows you to provide a quoted selector as the scope
|
27
|
-
# for "within" steps as was previously the default for the
|
28
|
-
# web steps:
|
29
|
-
when /"(.+)"/
|
30
|
-
$1
|
31
|
-
|
32
|
-
else
|
33
|
-
raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
|
34
|
-
"Now, go and add a mapping in #{__FILE__}"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
World(HtmlSelectorsHelpers)
|
data/gemfiles/3.1.0.rc4.gemfile
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "http://rubygems.org"
|
4
|
-
|
5
|
-
gem "jquery-rails"
|
6
|
-
gem "uglifier"
|
7
|
-
gem "sqlite3"
|
8
|
-
gem "rails", "3.1.0.rc4"
|
9
|
-
gem "sass-rails"
|
10
|
-
gem "shoulda-matchers", :git=>"git://github.com/thoughtbot/shoulda-matchers.git"
|
11
|
-
gem "coffee-script"
|
12
|
-
gem "diesel", :git=>"git://github.com/thoughtbot/diesel.git"
|
13
|
-
gem "database_cleaner"
|
14
|
-
gem "rspec-rails", "~> 2.6.0"
|
15
|
-
gem "aruba", "~> 0.4.2"
|
16
|
-
gem "cucumber-rails", "1.0.0"
|
17
|
-
gem "mocha"
|
18
|
-
gem "turn"
|
19
|
-
gem "appraisal", :git=>"git://github.com/thoughtbot/appraisal.git"
|
20
|
-
gem "capybara", "1.0.0"
|
21
|
-
gem "factory_girl_rails"
|
22
|
-
gem "launchy"
|
23
|
-
|
@@ -1,216 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/thoughtbot/appraisal.git
|
3
|
-
revision: f8029181543b4bc4bdea03735a3b1e558fd66501
|
4
|
-
specs:
|
5
|
-
appraisal (0.3.5)
|
6
|
-
aruba (~> 0.4.2)
|
7
|
-
bundler
|
8
|
-
rake
|
9
|
-
|
10
|
-
GIT
|
11
|
-
remote: git://github.com/thoughtbot/diesel.git
|
12
|
-
revision: 9a7955eadd3e2f445ecf3d2d58edfc2a5e80a20b
|
13
|
-
specs:
|
14
|
-
diesel (0.1.4)
|
15
|
-
railties
|
16
|
-
|
17
|
-
GIT
|
18
|
-
remote: git://github.com/thoughtbot/shoulda-matchers.git
|
19
|
-
revision: 85d3e5ea000cf162ef672059ea5e5f77f3ca9f03
|
20
|
-
specs:
|
21
|
-
shoulda-matchers (1.0.0.beta3)
|
22
|
-
|
23
|
-
GEM
|
24
|
-
remote: http://rubygems.org/
|
25
|
-
specs:
|
26
|
-
actionmailer (3.1.0.rc4)
|
27
|
-
actionpack (= 3.1.0.rc4)
|
28
|
-
mail (~> 2.3.0)
|
29
|
-
actionpack (3.1.0.rc4)
|
30
|
-
activemodel (= 3.1.0.rc4)
|
31
|
-
activesupport (= 3.1.0.rc4)
|
32
|
-
builder (~> 3.0.0)
|
33
|
-
erubis (~> 2.7.0)
|
34
|
-
i18n (~> 0.6)
|
35
|
-
rack (~> 1.3.0)
|
36
|
-
rack-cache (~> 1.0.1)
|
37
|
-
rack-mount (~> 0.8.1)
|
38
|
-
rack-test (~> 0.6.0)
|
39
|
-
sprockets (~> 2.0.0.beta.10)
|
40
|
-
tzinfo (~> 0.3.27)
|
41
|
-
activemodel (3.1.0.rc4)
|
42
|
-
activesupport (= 3.1.0.rc4)
|
43
|
-
bcrypt-ruby (~> 2.1.4)
|
44
|
-
builder (~> 3.0.0)
|
45
|
-
i18n (~> 0.6)
|
46
|
-
activerecord (3.1.0.rc4)
|
47
|
-
activemodel (= 3.1.0.rc4)
|
48
|
-
activesupport (= 3.1.0.rc4)
|
49
|
-
arel (~> 2.1.1)
|
50
|
-
tzinfo (~> 0.3.27)
|
51
|
-
activeresource (3.1.0.rc4)
|
52
|
-
activemodel (= 3.1.0.rc4)
|
53
|
-
activesupport (= 3.1.0.rc4)
|
54
|
-
activesupport (3.1.0.rc4)
|
55
|
-
multi_json (~> 1.0)
|
56
|
-
ansi (1.2.5)
|
57
|
-
arel (2.1.1)
|
58
|
-
aruba (0.4.3)
|
59
|
-
bcat (>= 0.6.1)
|
60
|
-
childprocess (>= 0.1.9)
|
61
|
-
cucumber (>= 0.10.7)
|
62
|
-
rdiscount (>= 1.6.8)
|
63
|
-
rspec (>= 2.6.0)
|
64
|
-
bcat (0.6.1)
|
65
|
-
rack (~> 1.0)
|
66
|
-
bcrypt-ruby (2.1.4)
|
67
|
-
builder (3.0.0)
|
68
|
-
capybara (1.0.0)
|
69
|
-
mime-types (>= 1.16)
|
70
|
-
nokogiri (>= 1.3.3)
|
71
|
-
rack (>= 1.0.0)
|
72
|
-
rack-test (>= 0.5.4)
|
73
|
-
selenium-webdriver (~> 0.2.0)
|
74
|
-
xpath (~> 0.1.4)
|
75
|
-
childprocess (0.1.9)
|
76
|
-
ffi (~> 1.0.6)
|
77
|
-
coffee-script (2.2.0)
|
78
|
-
coffee-script-source
|
79
|
-
execjs
|
80
|
-
coffee-script-source (1.1.1)
|
81
|
-
configuration (1.2.0)
|
82
|
-
cucumber (1.0.0)
|
83
|
-
builder (>= 2.1.2)
|
84
|
-
diff-lcs (>= 1.1.2)
|
85
|
-
gherkin (~> 2.4.1)
|
86
|
-
json (>= 1.4.6)
|
87
|
-
term-ansicolor (>= 1.0.5)
|
88
|
-
cucumber-rails (1.0.0)
|
89
|
-
capybara (>= 1.0.0)
|
90
|
-
cucumber (~> 1.0.0)
|
91
|
-
nokogiri (>= 1.4.4)
|
92
|
-
rack-test (>= 0.5.7)
|
93
|
-
database_cleaner (0.6.7)
|
94
|
-
diff-lcs (1.1.2)
|
95
|
-
erubis (2.7.0)
|
96
|
-
execjs (1.1.3)
|
97
|
-
multi_json (~> 1.0)
|
98
|
-
factory_girl (1.3.3)
|
99
|
-
factory_girl_rails (1.0.1)
|
100
|
-
factory_girl (~> 1.3)
|
101
|
-
railties (>= 3.0.0)
|
102
|
-
ffi (1.0.9)
|
103
|
-
gherkin (2.4.1)
|
104
|
-
json (>= 1.4.6)
|
105
|
-
hike (1.1.0)
|
106
|
-
i18n (0.6.0)
|
107
|
-
jquery-rails (1.0.11)
|
108
|
-
railties (~> 3.0)
|
109
|
-
thor (~> 0.14)
|
110
|
-
json (1.5.3)
|
111
|
-
json_pure (1.5.2)
|
112
|
-
launchy (0.4.0)
|
113
|
-
configuration (>= 0.0.5)
|
114
|
-
rake (>= 0.8.1)
|
115
|
-
mail (2.3.0)
|
116
|
-
i18n (>= 0.4.0)
|
117
|
-
mime-types (~> 1.16)
|
118
|
-
treetop (~> 1.4.8)
|
119
|
-
mime-types (1.16)
|
120
|
-
mocha (0.9.12)
|
121
|
-
multi_json (1.0.3)
|
122
|
-
nokogiri (1.4.5)
|
123
|
-
polyglot (0.3.1)
|
124
|
-
rack (1.3.0)
|
125
|
-
rack-cache (1.0.2)
|
126
|
-
rack (>= 0.4)
|
127
|
-
rack-mount (0.8.1)
|
128
|
-
rack (>= 1.0.0)
|
129
|
-
rack-ssl (1.3.2)
|
130
|
-
rack
|
131
|
-
rack-test (0.6.0)
|
132
|
-
rack (>= 1.0)
|
133
|
-
rails (3.1.0.rc4)
|
134
|
-
actionmailer (= 3.1.0.rc4)
|
135
|
-
actionpack (= 3.1.0.rc4)
|
136
|
-
activerecord (= 3.1.0.rc4)
|
137
|
-
activeresource (= 3.1.0.rc4)
|
138
|
-
activesupport (= 3.1.0.rc4)
|
139
|
-
bundler (~> 1.0)
|
140
|
-
railties (= 3.1.0.rc4)
|
141
|
-
railties (3.1.0.rc4)
|
142
|
-
actionpack (= 3.1.0.rc4)
|
143
|
-
activesupport (= 3.1.0.rc4)
|
144
|
-
rack-ssl (~> 1.3.2)
|
145
|
-
rake (>= 0.8.7)
|
146
|
-
rdoc (~> 3.4)
|
147
|
-
thor (~> 0.14.6)
|
148
|
-
rake (0.9.2)
|
149
|
-
rdiscount (1.6.8)
|
150
|
-
rdoc (3.6.1)
|
151
|
-
rspec (2.6.0)
|
152
|
-
rspec-core (~> 2.6.0)
|
153
|
-
rspec-expectations (~> 2.6.0)
|
154
|
-
rspec-mocks (~> 2.6.0)
|
155
|
-
rspec-core (2.6.4)
|
156
|
-
rspec-expectations (2.6.0)
|
157
|
-
diff-lcs (~> 1.1.2)
|
158
|
-
rspec-mocks (2.6.0)
|
159
|
-
rspec-rails (2.6.1)
|
160
|
-
actionpack (~> 3.0)
|
161
|
-
activesupport (~> 3.0)
|
162
|
-
railties (~> 3.0)
|
163
|
-
rspec (~> 2.6.0)
|
164
|
-
rubyzip (0.9.4)
|
165
|
-
sass (3.1.2)
|
166
|
-
sass-rails (3.1.0.rc.2)
|
167
|
-
actionpack (~> 3.1.0.rc1)
|
168
|
-
railties (~> 3.1.0.rc1)
|
169
|
-
sass (>= 3.1.2)
|
170
|
-
sprockets (>= 2.0.0.beta.9)
|
171
|
-
selenium-webdriver (0.2.1)
|
172
|
-
childprocess (>= 0.1.7)
|
173
|
-
ffi (>= 1.0.7)
|
174
|
-
json_pure
|
175
|
-
rubyzip
|
176
|
-
sprockets (2.0.0.beta.10)
|
177
|
-
hike (~> 1.0)
|
178
|
-
rack (~> 1.0)
|
179
|
-
tilt (!= 1.3.0, ~> 1.1)
|
180
|
-
sqlite3 (1.3.3)
|
181
|
-
term-ansicolor (1.0.5)
|
182
|
-
thor (0.14.6)
|
183
|
-
tilt (1.3.2)
|
184
|
-
treetop (1.4.9)
|
185
|
-
polyglot (>= 0.3.1)
|
186
|
-
turn (0.8.2)
|
187
|
-
ansi (>= 1.2.2)
|
188
|
-
tzinfo (0.3.28)
|
189
|
-
uglifier (0.5.4)
|
190
|
-
execjs (>= 0.3.0)
|
191
|
-
multi_json (>= 1.0.2)
|
192
|
-
xpath (0.1.4)
|
193
|
-
nokogiri (~> 1.3)
|
194
|
-
|
195
|
-
PLATFORMS
|
196
|
-
ruby
|
197
|
-
|
198
|
-
DEPENDENCIES
|
199
|
-
appraisal!
|
200
|
-
aruba (~> 0.4.2)
|
201
|
-
capybara (= 1.0.0)
|
202
|
-
coffee-script
|
203
|
-
cucumber-rails (= 1.0.0)
|
204
|
-
database_cleaner
|
205
|
-
diesel!
|
206
|
-
factory_girl_rails
|
207
|
-
jquery-rails
|
208
|
-
launchy
|
209
|
-
mocha
|
210
|
-
rails (= 3.1.0.rc4)
|
211
|
-
rspec-rails (~> 2.6.0)
|
212
|
-
sass-rails
|
213
|
-
shoulda-matchers!
|
214
|
-
sqlite3
|
215
|
-
turn
|
216
|
-
uglifier
|