deadbolt 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/{LICENSE.txt → LICENSE} +0 -0
- data/Manifest +3 -2
- data/README.rdoc +3 -3
- data/Rakefile +1 -1
- data/deadbolt.gemspec +4 -4
- metadata +9 -9
- data/README.md +0 -42
data/CHANGELOG
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v0.1.2 Updated README
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/Manifest
CHANGED
data/README.rdoc
CHANGED
@@ -15,13 +15,13 @@ Using deadbolt is really easy. Just require it in your gemfile (<tt>gem 'deadbol
|
|
15
15
|
|
16
16
|
That's it!
|
17
17
|
|
18
|
-
=
|
18
|
+
= Usage
|
19
19
|
Deadbolt assumes that:
|
20
20
|
|
21
21
|
* You want users to confirm their password.
|
22
22
|
* Your users are identified by their email address.
|
23
23
|
|
24
|
-
It
|
24
|
+
It <b>does not</b> assume that you want to validate the uniqueness of each user's email address. If do you want to, simply add the line <tt>validates_uniqueness_of :email</tt> to your model. You can add whatever other keys and validations you want to your model.
|
25
25
|
|
26
26
|
To check that a user successfully logged in, use <tt>User.authenticate(email, password)</tt>. Assuming that the email and password match up, this will return the full user object, including any custom data you've defined. If the email and password do not match up, it will return <tt>nil</tt>.
|
27
27
|
|
@@ -37,4 +37,4 @@ Written by J-P Teti.
|
|
37
37
|
Special thanks to John Nunemaker for creating MongoMapper and to everyone who has contributed to that project.
|
38
38
|
|
39
39
|
= License
|
40
|
-
Licensed under the MIT License, which is found in the file LICENSE.
|
40
|
+
Licensed under the MIT License, which is found in the file LICENSE. In short: do whatever you feel like with this code.
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('deadbolt', '0.1.
|
5
|
+
Echoe.new('deadbolt', '0.1.2') do |g|
|
6
6
|
g.description = 'Very basic user model as a MongoMapper plugin'
|
7
7
|
g.url = 'http://github.com/roboteti/deadbolt'
|
8
8
|
g.author = 'J-P Teti'
|
data/deadbolt.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{deadbolt}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["J-P Teti"]
|
9
9
|
s.date = %q{2011-04-27}
|
10
10
|
s.description = %q{Very basic user model as a MongoMapper plugin}
|
11
11
|
s.email = %q{roboteti@gmail.com}
|
12
|
-
s.extra_rdoc_files = ["
|
13
|
-
s.files = ["Gemfile", "Gemfile.lock", "LICENSE
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "lib/deadbolt.rb"]
|
13
|
+
s.files = ["CHANGELOG", "Gemfile", "Gemfile.lock", "LICENSE", "Manifest", "README.rdoc", "Rakefile", "deadbolt.gemspec", "lib/deadbolt.rb"]
|
14
14
|
s.homepage = %q{http://github.com/roboteti/deadbolt}
|
15
|
-
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Deadbolt", "--main", "README.
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Deadbolt", "--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{deadbolt}
|
18
18
|
s.rubygems_version = %q{1.7.2}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deadbolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- J-P Teti
|
@@ -80,20 +80,20 @@ executables: []
|
|
80
80
|
extensions: []
|
81
81
|
|
82
82
|
extra_rdoc_files:
|
83
|
-
-
|
84
|
-
-
|
83
|
+
- CHANGELOG
|
84
|
+
- LICENSE
|
85
85
|
- README.rdoc
|
86
86
|
- lib/deadbolt.rb
|
87
87
|
files:
|
88
|
+
- CHANGELOG
|
88
89
|
- Gemfile
|
89
90
|
- Gemfile.lock
|
90
|
-
- LICENSE
|
91
|
+
- LICENSE
|
91
92
|
- Manifest
|
92
|
-
- README.md
|
93
93
|
- README.rdoc
|
94
94
|
- Rakefile
|
95
|
-
- lib/deadbolt.rb
|
96
95
|
- deadbolt.gemspec
|
96
|
+
- lib/deadbolt.rb
|
97
97
|
homepage: http://github.com/roboteti/deadbolt
|
98
98
|
licenses: []
|
99
99
|
|
@@ -104,7 +104,7 @@ rdoc_options:
|
|
104
104
|
- --title
|
105
105
|
- Deadbolt
|
106
106
|
- --main
|
107
|
-
- README.
|
107
|
+
- README.rdoc
|
108
108
|
require_paths:
|
109
109
|
- lib
|
110
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
data/README.md
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
deadbolt
|
2
|
-
===================================================
|
3
|
-
|
4
|
-
Deadbolt is a plugin for MongoMapper that lets you easily create super simple (and secure) user models.
|
5
|
-
|
6
|
-
Usage
|
7
|
-
---------------------------
|
8
|
-
|
9
|
-
Using deadbolt is really easy. Just require it in your gemfile (gem 'deadbolt'). Then write your user model like this:
|
10
|
-
|
11
|
-
require 'bcrypt'
|
12
|
-
|
13
|
-
class User
|
14
|
-
include MongoMapper::Document
|
15
|
-
plugin Deadbolt
|
16
|
-
end
|
17
|
-
|
18
|
-
That's all you have to do.
|
19
|
-
|
20
|
-
Assumptions
|
21
|
-
---------------------------
|
22
|
-
Deadbolt assumes that:
|
23
|
-
|
24
|
-
* You want users to confirm their password.
|
25
|
-
* Your users are identified by their email address.
|
26
|
-
|
27
|
-
It **does not** assume that you want to validate the uniqueness of each user's email address. If do you want to, simply add the line `validates_uniqueness_of :email` to your model. You can add whatever other keys and validations you want to your model.
|
28
|
-
|
29
|
-
To check that a user successfully logged in, use `User.authenticate(email, password)`. Assuming that the email and password match up, this will return the full user object, including any custom data you've defined. If the email and password do not match up, it will return `nil`.
|
30
|
-
|
31
|
-
Contributing
|
32
|
-
---------------------------
|
33
|
-
|
34
|
-
1. Fork the project.
|
35
|
-
2. Make whatever changes you plan on making.
|
36
|
-
3. Submit a pull request that accurately describes what you've added or changed and why. NOTE: This does not mean to say *how* you did it. I can read the code.
|
37
|
-
|
38
|
-
Credits
|
39
|
-
---------------------------
|
40
|
-
Original code by J-P Teti.
|
41
|
-
|
42
|
-
Special thanks to John Nunemaker for creating MongoMapper and to everyone who has contributed to that project.
|