password_resetter 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +75 -0
- data/lib/password_resetter/version.rb +1 -1
- metadata +21 -5
- data/README.rdoc +0 -3
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
## PasswordResetter
|
2
|
+
|
3
|
+
PasswordResetter is a simple gem used to give Users the ability to reset their password within your Rails application.
|
4
|
+
|
5
|
+
#### The gem assumes to following about your Rails application:
|
6
|
+
|
7
|
+
* There exists a User model with an `:email` attribute.
|
8
|
+
* The application stores a logged in User with `session[:user_id]`
|
9
|
+
* You already have the [BCrypt gem](https://github.com/codahale/bcrypt-ruby)
|
10
|
+
|
11
|
+
## Getting Started
|
12
|
+
|
13
|
+
Get it.
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'password_resetter'
|
17
|
+
```
|
18
|
+
|
19
|
+
Install it.
|
20
|
+
|
21
|
+
```console
|
22
|
+
bundle install
|
23
|
+
```
|
24
|
+
|
25
|
+
Migrate it.
|
26
|
+
|
27
|
+
```console
|
28
|
+
rake password_resetter_engine:install:migrations
|
29
|
+
rake db:migrate
|
30
|
+
```
|
31
|
+
|
32
|
+
If you haven't already, set your action mailer host in config/environments.
|
33
|
+
Simply place the following lines at the bottom of the necessary environment files
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
# Action mailer for reset passwords
|
37
|
+
config.action_mailer.default_url_options = { :host => "localhost:3000" }
|
38
|
+
```
|
39
|
+
|
40
|
+
Lastly, throw the following link into the appropriate view file (i.e. views/sessions/new.html.erb)
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
<%= link_to "Forgot Password?", new_password_reset_path %>
|
44
|
+
```
|
45
|
+
|
46
|
+
## Visual Customization
|
47
|
+
|
48
|
+
To match the style of your own app, every element of the html.erb files comes tagged with a css id.
|
49
|
+
|
50
|
+
### New Password Reset Page
|
51
|
+
#### The page a User is directed when they click on the "Forgot Password?" link
|
52
|
+
|
53
|
+
Email input field is tagged with
|
54
|
+
```ruby
|
55
|
+
:class => "password-reset-input email"
|
56
|
+
```
|
57
|
+
|
58
|
+
Reset Password button:
|
59
|
+
```ruby
|
60
|
+
:class => "password-reset-button reset"
|
61
|
+
```
|
62
|
+
|
63
|
+
### Complete Password Reset Page
|
64
|
+
#### The page a User is directed when they follow the link emailed to them after initializing the reset process
|
65
|
+
|
66
|
+
Password and Password Confirmation fields tagged respectively with:
|
67
|
+
```ruby
|
68
|
+
:class => "password-reset-input password"
|
69
|
+
:class => "password-reset-input password_confirmation"
|
70
|
+
```
|
71
|
+
|
72
|
+
Update Password button:
|
73
|
+
```ruby
|
74
|
+
:class => "password-reset-buton update"
|
75
|
+
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: password_resetter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bcrypt-ruby
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: sqlite3
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +155,7 @@ dependencies:
|
|
139
155
|
- - ! '>='
|
140
156
|
- !ruby/object:Gem::Version
|
141
157
|
version: '0'
|
142
|
-
description:
|
158
|
+
description: Allowing Users to reset their password through email
|
143
159
|
email:
|
144
160
|
- efatsi@comcast.net
|
145
161
|
executables: []
|
@@ -163,7 +179,7 @@ files:
|
|
163
179
|
- lib/tasks/password_resetter_tasks.rake
|
164
180
|
- MIT-LICENSE
|
165
181
|
- Rakefile
|
166
|
-
- README.
|
182
|
+
- README.md
|
167
183
|
- spec/dummy/app/assets/javascripts/application.js
|
168
184
|
- spec/dummy/app/assets/stylesheets/application.css
|
169
185
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -209,7 +225,7 @@ files:
|
|
209
225
|
- spec/support/account_helper.rb
|
210
226
|
- spec/support/controller_login_helper.rb
|
211
227
|
- spec/support/making_helper.rb
|
212
|
-
homepage:
|
228
|
+
homepage: https://github.com/efatsi/password_resetter
|
213
229
|
licenses: []
|
214
230
|
post_install_message:
|
215
231
|
rdoc_options: []
|
@@ -232,7 +248,7 @@ rubyforge_project:
|
|
232
248
|
rubygems_version: 1.8.24
|
233
249
|
signing_key:
|
234
250
|
specification_version: 3
|
235
|
-
summary:
|
251
|
+
summary: Allowing Users to reset their password through email
|
236
252
|
test_files:
|
237
253
|
- spec/dummy/app/assets/javascripts/application.js
|
238
254
|
- spec/dummy/app/assets/stylesheets/application.css
|
data/README.rdoc
DELETED