letmein 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +48 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/letmein.gemspec +5 -5
- data/lib/letmein.rb +8 -4
- data/test/letmein_test.rb +1 -1
- metadata +5 -5
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.5)
|
6
|
+
actionpack (= 3.0.5)
|
7
|
+
mail (~> 2.2.15)
|
8
|
+
actionpack (3.0.5)
|
9
|
+
activemodel (= 3.0.5)
|
10
|
+
activesupport (= 3.0.5)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.13)
|
16
|
+
rack-test (~> 0.5.7)
|
17
|
+
tzinfo (~> 0.3.23)
|
4
18
|
activemodel (3.0.5)
|
5
19
|
activesupport (= 3.0.5)
|
6
20
|
builder (~> 2.1.2)
|
@@ -10,26 +24,59 @@ GEM
|
|
10
24
|
activesupport (= 3.0.5)
|
11
25
|
arel (~> 2.0.2)
|
12
26
|
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.5)
|
28
|
+
activemodel (= 3.0.5)
|
29
|
+
activesupport (= 3.0.5)
|
13
30
|
activesupport (3.0.5)
|
14
31
|
arel (2.0.9)
|
15
32
|
bcrypt-ruby (2.1.4)
|
16
33
|
builder (2.1.2)
|
34
|
+
erubis (2.6.6)
|
35
|
+
abstract (>= 1.0.0)
|
17
36
|
git (1.2.5)
|
18
37
|
i18n (0.5.0)
|
19
38
|
jeweler (1.5.2)
|
20
39
|
bundler (~> 1.0.0)
|
21
40
|
git (>= 1.2.5)
|
22
41
|
rake
|
42
|
+
mail (2.2.15)
|
43
|
+
activesupport (>= 2.3.6)
|
44
|
+
i18n (>= 0.4.0)
|
45
|
+
mime-types (~> 1.16)
|
46
|
+
treetop (~> 1.4.8)
|
47
|
+
mime-types (1.16)
|
48
|
+
polyglot (0.3.1)
|
49
|
+
rack (1.2.2)
|
50
|
+
rack-mount (0.6.13)
|
51
|
+
rack (>= 1.0.0)
|
52
|
+
rack-test (0.5.7)
|
53
|
+
rack (>= 1.0)
|
54
|
+
rails (3.0.5)
|
55
|
+
actionmailer (= 3.0.5)
|
56
|
+
actionpack (= 3.0.5)
|
57
|
+
activerecord (= 3.0.5)
|
58
|
+
activeresource (= 3.0.5)
|
59
|
+
activesupport (= 3.0.5)
|
60
|
+
bundler (~> 1.0)
|
61
|
+
railties (= 3.0.5)
|
62
|
+
railties (3.0.5)
|
63
|
+
actionpack (= 3.0.5)
|
64
|
+
activesupport (= 3.0.5)
|
65
|
+
rake (>= 0.8.7)
|
66
|
+
thor (~> 0.14.4)
|
23
67
|
rake (0.8.7)
|
24
68
|
sqlite3 (1.3.3)
|
69
|
+
thor (0.14.6)
|
70
|
+
treetop (1.4.9)
|
71
|
+
polyglot (>= 0.3.1)
|
25
72
|
tzinfo (0.3.25)
|
26
73
|
|
27
74
|
PLATFORMS
|
28
75
|
ruby
|
29
76
|
|
30
77
|
DEPENDENCIES
|
31
|
-
activerecord (>= 3.0.0)
|
32
78
|
bcrypt-ruby
|
33
79
|
bundler (~> 1.0.0)
|
34
80
|
jeweler (~> 1.5.2)
|
81
|
+
rails (>= 3.0.0)
|
35
82
|
sqlite3
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Assuming the model you want to authenticate has fields: *email*, *password_hash*
|
|
11
11
|
letmein
|
12
12
|
end
|
13
13
|
|
14
|
-
If you want to use *username* instead of *email* and if maybe you prefer naming
|
14
|
+
If you want to use *username* instead of *email* and if maybe you prefer naming from password and salt columns to something else do this:
|
15
15
|
|
16
16
|
class User < ActiveRecord::Base
|
17
17
|
letmein :username, :encrypted_password, :salt
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/letmein.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{letmein}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-26}
|
13
13
|
s.description = %q{minimalistic authentication}
|
14
14
|
s.email = %q{oleg@khabarov.ca}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -41,18 +41,18 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.specification_version = 3
|
42
42
|
|
43
43
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
-
s.add_runtime_dependency(%q<
|
44
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
45
45
|
s.add_runtime_dependency(%q<bcrypt-ruby>, [">= 0"])
|
46
46
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
47
47
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
48
48
|
else
|
49
|
-
s.add_dependency(%q<
|
49
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
50
50
|
s.add_dependency(%q<bcrypt-ruby>, [">= 0"])
|
51
51
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
52
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
53
53
|
end
|
54
54
|
else
|
55
|
-
s.add_dependency(%q<
|
55
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
56
56
|
s.add_dependency(%q<bcrypt-ruby>, [">= 0"])
|
57
57
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
58
58
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
data/lib/letmein.rb
CHANGED
@@ -3,6 +3,14 @@ require 'bcrypt'
|
|
3
3
|
|
4
4
|
module LetMeIn
|
5
5
|
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
config.after_initialize do
|
8
|
+
# Rails loads models on demand. Configuration doesn't set properly unless assosiated model
|
9
|
+
# is already loaded. This will force it.
|
10
|
+
Dir[Rails.root + 'app/models/**/*.rb'].each{|path| require path }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
class Error < StandardError
|
7
15
|
end
|
8
16
|
|
@@ -110,7 +118,3 @@ module LetMeIn
|
|
110
118
|
end
|
111
119
|
|
112
120
|
ActiveRecord::Base.send :include, LetMeIn::Model
|
113
|
-
|
114
|
-
# Rails loads models on demand. Configuration doesn't set properly unless assosiated model
|
115
|
-
# is already loaded. This will force it.
|
116
|
-
Dir[Rails.root + 'app/models/**/*.rb'].each{|path| require path }
|
data/test/letmein_test.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Oleg Khabarov
|
@@ -14,11 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-03-
|
17
|
+
date: 2011-03-26 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
21
|
+
name: rails
|
22
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
hash:
|
111
|
+
hash: -4232238799848481364
|
112
112
|
segments:
|
113
113
|
- 0
|
114
114
|
version: "0"
|