authlogic 2.1.7 → 2.1.8

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

Potentially problematic release.


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

data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source :rubygems
2
+
3
+ gem 'activesupport', '~> 2.3.0'
4
+ gem 'activerecord', '~> 2.3.0'
5
+
6
+ group :test do
7
+ gem 'bcrypt-ruby'
8
+ gem 'rake'
9
+ gem 'debugger'
10
+ gem 'sqlite3'
11
+ end
@@ -0,0 +1,28 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activerecord (2.3.14)
5
+ activesupport (= 2.3.14)
6
+ activesupport (2.3.14)
7
+ bcrypt-ruby (3.0.1)
8
+ columnize (0.3.6)
9
+ debugger (1.1.3)
10
+ columnize (>= 0.3.1)
11
+ debugger-linecache (~> 1.1.1)
12
+ debugger-ruby_core_source (~> 1.1.2)
13
+ debugger-linecache (1.1.1)
14
+ debugger-ruby_core_source (>= 1.1.1)
15
+ debugger-ruby_core_source (1.1.3)
16
+ rake (0.9.2.2)
17
+ sqlite3 (1.3.6)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ activerecord (~> 2.3.0)
24
+ activesupport (~> 2.3.0)
25
+ bcrypt-ruby
26
+ debugger
27
+ rake
28
+ sqlite3
@@ -1,5 +1,7 @@
1
1
  = Authlogic
2
2
 
3
+ ** This branch supports Rails 2 only! For Rails 3 go to the master branch **
4
+
3
5
  Authlogic is a clean, simple, and unobtrusive ruby authentication solution.
4
6
 
5
7
  A code example can replace a thousand words...
@@ -150,7 +152,7 @@ What if your user sessions controller could look just like your other controller
150
152
  def new
151
153
  @user_session = UserSession.new
152
154
  end
153
-
155
+
154
156
  def create
155
157
  @user_session = UserSession.new(params[:user_session])
156
158
  if @user_session.save
@@ -159,7 +161,7 @@ What if your user sessions controller could look just like your other controller
159
161
  render :action => :new
160
162
  end
161
163
  end
162
-
164
+
163
165
  def destroy
164
166
  current_user_session.destroy
165
167
  redirect_to new_user_session_url
@@ -183,13 +185,13 @@ Or how about persisting the session...
183
185
 
184
186
  class ApplicationController
185
187
  helper_method :current_user_session, :current_user
186
-
188
+
187
189
  private
188
190
  def current_user_session
189
191
  return @current_user_session if defined?(@current_user_session)
190
192
  @current_user_session = UserSession.find
191
193
  end
192
-
194
+
193
195
  def current_user
194
196
  return @current_user if defined?(@current_user)
195
197
  @current_user = current_user_session && current_user_session.user
@@ -198,21 +200,9 @@ Or how about persisting the session...
198
200
 
199
201
  == Install & Use
200
202
 
201
- Install the gem / plugin (recommended)
202
-
203
- From rubyforge:
204
-
205
- $ sudo gem install authlogic
206
-
207
- Or from github:
208
-
209
- $ sudo gem install binarylogic-authlogic
210
-
211
- Now just add the gem dependency in your projects configuration.
212
-
213
- Or you can install this as a plugin:
203
+ Add to your Gemfile
214
204
 
215
- script/plugin install git://github.com/binarylogic/authlogic.git
205
+ $ gem 'authlogic', '~> 2.1.0'
216
206
 
217
207
  == Detailed Setup Tutorial
218
208
 
data/Rakefile CHANGED
@@ -1,21 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "authlogic"
8
- gem.summary = "A clean, simple, and unobtrusive ruby authentication solution."
9
- gem.email = "bjohnson@binarylogic.com"
10
- gem.homepage = "http://github.com/binarylogic/authlogic"
11
- gem.authors = ["Ben Johnson of Binary Logic"]
12
- gem.add_dependency "activesupport"
13
- end
14
- Jeweler::GemcutterTasks.new
15
- rescue LoadError
16
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
- end
18
-
19
3
  require 'rake/testtask'
20
4
  Rake::TestTask.new(:test) do |test|
21
5
  test.libs << 'test'
@@ -36,6 +20,4 @@ rescue LoadError
36
20
  end
37
21
  end
38
22
 
39
- task :test => :check_dependencies
40
-
41
23
  task :default => :test
@@ -1,216 +1,21 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
- s.name = %q{authlogic}
8
- s.version = "2.1.7"
5
+ s.name = "authlogic"
6
+ s.version = "2.1.8"
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Ben Johnson"]
9
+ s.email = ["bjohnson@binarylogic.com"]
10
+ s.homepage = "http://github.com/binarylogic/authlogic"
11
+ s.summary = %q{A clean, simple, and unobtrusive ruby authentication solution.}
12
+ s.description = %q{A clean, simple, and unobtrusive ruby authentication solution.}
9
13
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ben Johnson of Binary Logic"]
12
- s.date = %q{2010-08-04}
13
- s.email = %q{bjohnson@binarylogic.com}
14
- s.extra_rdoc_files = [
15
- "LICENSE",
16
- "README.rdoc"
17
- ]
18
- s.files = [
19
- ".gitignore",
20
- "CHANGELOG.rdoc",
21
- "LICENSE",
22
- "README.rdoc",
23
- "Rakefile",
24
- "VERSION.yml",
25
- "authlogic.gemspec",
26
- "generators/session/session_generator.rb",
27
- "generators/session/templates/session.rb",
28
- "init.rb",
29
- "lib/authlogic.rb",
30
- "lib/authlogic/acts_as_authentic/base.rb",
31
- "lib/authlogic/acts_as_authentic/email.rb",
32
- "lib/authlogic/acts_as_authentic/logged_in_status.rb",
33
- "lib/authlogic/acts_as_authentic/login.rb",
34
- "lib/authlogic/acts_as_authentic/magic_columns.rb",
35
- "lib/authlogic/acts_as_authentic/password.rb",
36
- "lib/authlogic/acts_as_authentic/perishable_token.rb",
37
- "lib/authlogic/acts_as_authentic/persistence_token.rb",
38
- "lib/authlogic/acts_as_authentic/restful_authentication.rb",
39
- "lib/authlogic/acts_as_authentic/session_maintenance.rb",
40
- "lib/authlogic/acts_as_authentic/single_access_token.rb",
41
- "lib/authlogic/acts_as_authentic/validations_scope.rb",
42
- "lib/authlogic/authenticates_many/association.rb",
43
- "lib/authlogic/authenticates_many/base.rb",
44
- "lib/authlogic/controller_adapters/abstract_adapter.rb",
45
- "lib/authlogic/controller_adapters/merb_adapter.rb",
46
- "lib/authlogic/controller_adapters/rails_adapter.rb",
47
- "lib/authlogic/controller_adapters/sinatra_adapter.rb",
48
- "lib/authlogic/crypto_providers/aes256.rb",
49
- "lib/authlogic/crypto_providers/bcrypt.rb",
50
- "lib/authlogic/crypto_providers/md5.rb",
51
- "lib/authlogic/crypto_providers/sha1.rb",
52
- "lib/authlogic/crypto_providers/sha256.rb",
53
- "lib/authlogic/crypto_providers/sha512.rb",
54
- "lib/authlogic/crypto_providers/wordpress.rb",
55
- "lib/authlogic/i18n.rb",
56
- "lib/authlogic/i18n/translator.rb",
57
- "lib/authlogic/random.rb",
58
- "lib/authlogic/regex.rb",
59
- "lib/authlogic/session/activation.rb",
60
- "lib/authlogic/session/active_record_trickery.rb",
61
- "lib/authlogic/session/base.rb",
62
- "lib/authlogic/session/brute_force_protection.rb",
63
- "lib/authlogic/session/callbacks.rb",
64
- "lib/authlogic/session/cookies.rb",
65
- "lib/authlogic/session/existence.rb",
66
- "lib/authlogic/session/foundation.rb",
67
- "lib/authlogic/session/http_auth.rb",
68
- "lib/authlogic/session/id.rb",
69
- "lib/authlogic/session/klass.rb",
70
- "lib/authlogic/session/magic_columns.rb",
71
- "lib/authlogic/session/magic_states.rb",
72
- "lib/authlogic/session/params.rb",
73
- "lib/authlogic/session/password.rb",
74
- "lib/authlogic/session/perishable_token.rb",
75
- "lib/authlogic/session/persistence.rb",
76
- "lib/authlogic/session/priority_record.rb",
77
- "lib/authlogic/session/scopes.rb",
78
- "lib/authlogic/session/session.rb",
79
- "lib/authlogic/session/timeout.rb",
80
- "lib/authlogic/session/unauthorized_record.rb",
81
- "lib/authlogic/session/validation.rb",
82
- "lib/authlogic/test_case.rb",
83
- "lib/authlogic/test_case/mock_controller.rb",
84
- "lib/authlogic/test_case/mock_cookie_jar.rb",
85
- "lib/authlogic/test_case/mock_logger.rb",
86
- "lib/authlogic/test_case/mock_request.rb",
87
- "lib/authlogic/test_case/rails_request_adapter.rb",
88
- "rails/init.rb",
89
- "shoulda_macros/authlogic.rb",
90
- "test/acts_as_authentic_test/base_test.rb",
91
- "test/acts_as_authentic_test/email_test.rb",
92
- "test/acts_as_authentic_test/logged_in_status_test.rb",
93
- "test/acts_as_authentic_test/login_test.rb",
94
- "test/acts_as_authentic_test/magic_columns_test.rb",
95
- "test/acts_as_authentic_test/password_test.rb",
96
- "test/acts_as_authentic_test/perishable_token_test.rb",
97
- "test/acts_as_authentic_test/persistence_token_test.rb",
98
- "test/acts_as_authentic_test/restful_authentication_test.rb",
99
- "test/acts_as_authentic_test/session_maintenance_test.rb",
100
- "test/acts_as_authentic_test/single_access_test.rb",
101
- "test/authenticates_many_test.rb",
102
- "test/crypto_provider_test/aes256_test.rb",
103
- "test/crypto_provider_test/bcrypt_test.rb",
104
- "test/crypto_provider_test/sha1_test.rb",
105
- "test/crypto_provider_test/sha256_test.rb",
106
- "test/crypto_provider_test/sha512_test.rb",
107
- "test/fixtures/companies.yml",
108
- "test/fixtures/employees.yml",
109
- "test/fixtures/projects.yml",
110
- "test/fixtures/users.yml",
111
- "test/i18n_test.rb",
112
- "test/libs/affiliate.rb",
113
- "test/libs/company.rb",
114
- "test/libs/employee.rb",
115
- "test/libs/employee_session.rb",
116
- "test/libs/ldaper.rb",
117
- "test/libs/ordered_hash.rb",
118
- "test/libs/project.rb",
119
- "test/libs/user.rb",
120
- "test/libs/user_session.rb",
121
- "test/random_test.rb",
122
- "test/session_test/activation_test.rb",
123
- "test/session_test/active_record_trickery_test.rb",
124
- "test/session_test/brute_force_protection_test.rb",
125
- "test/session_test/callbacks_test.rb",
126
- "test/session_test/cookies_test.rb",
127
- "test/session_test/credentials_test.rb",
128
- "test/session_test/existence_test.rb",
129
- "test/session_test/http_auth_test.rb",
130
- "test/session_test/id_test.rb",
131
- "test/session_test/klass_test.rb",
132
- "test/session_test/magic_columns_test.rb",
133
- "test/session_test/magic_states_test.rb",
134
- "test/session_test/params_test.rb",
135
- "test/session_test/password_test.rb",
136
- "test/session_test/perishability_test.rb",
137
- "test/session_test/persistence_test.rb",
138
- "test/session_test/scopes_test.rb",
139
- "test/session_test/session_test.rb",
140
- "test/session_test/timeout_test.rb",
141
- "test/session_test/unauthorized_record_test.rb",
142
- "test/session_test/validation_test.rb",
143
- "test/test_helper.rb"
144
- ]
145
- s.homepage = %q{http://github.com/binarylogic/authlogic}
146
- s.rdoc_options = ["--charset=UTF-8"]
147
- s.require_paths = ["lib"]
148
- s.rubygems_version = %q{1.3.7}
149
- s.summary = %q{A clean, simple, and unobtrusive ruby authentication solution.}
150
- s.test_files = [
151
- "test/acts_as_authentic_test/base_test.rb",
152
- "test/acts_as_authentic_test/email_test.rb",
153
- "test/acts_as_authentic_test/logged_in_status_test.rb",
154
- "test/acts_as_authentic_test/login_test.rb",
155
- "test/acts_as_authentic_test/magic_columns_test.rb",
156
- "test/acts_as_authentic_test/password_test.rb",
157
- "test/acts_as_authentic_test/perishable_token_test.rb",
158
- "test/acts_as_authentic_test/persistence_token_test.rb",
159
- "test/acts_as_authentic_test/restful_authentication_test.rb",
160
- "test/acts_as_authentic_test/session_maintenance_test.rb",
161
- "test/acts_as_authentic_test/single_access_test.rb",
162
- "test/authenticates_many_test.rb",
163
- "test/crypto_provider_test/aes256_test.rb",
164
- "test/crypto_provider_test/bcrypt_test.rb",
165
- "test/crypto_provider_test/sha1_test.rb",
166
- "test/crypto_provider_test/sha256_test.rb",
167
- "test/crypto_provider_test/sha512_test.rb",
168
- "test/i18n_test.rb",
169
- "test/libs/affiliate.rb",
170
- "test/libs/company.rb",
171
- "test/libs/employee.rb",
172
- "test/libs/employee_session.rb",
173
- "test/libs/ldaper.rb",
174
- "test/libs/ordered_hash.rb",
175
- "test/libs/project.rb",
176
- "test/libs/user.rb",
177
- "test/libs/user_session.rb",
178
- "test/random_test.rb",
179
- "test/session_test/activation_test.rb",
180
- "test/session_test/active_record_trickery_test.rb",
181
- "test/session_test/brute_force_protection_test.rb",
182
- "test/session_test/callbacks_test.rb",
183
- "test/session_test/cookies_test.rb",
184
- "test/session_test/credentials_test.rb",
185
- "test/session_test/existence_test.rb",
186
- "test/session_test/http_auth_test.rb",
187
- "test/session_test/id_test.rb",
188
- "test/session_test/klass_test.rb",
189
- "test/session_test/magic_columns_test.rb",
190
- "test/session_test/magic_states_test.rb",
191
- "test/session_test/params_test.rb",
192
- "test/session_test/password_test.rb",
193
- "test/session_test/perishability_test.rb",
194
- "test/session_test/persistence_test.rb",
195
- "test/session_test/scopes_test.rb",
196
- "test/session_test/session_test.rb",
197
- "test/session_test/timeout_test.rb",
198
- "test/session_test/unauthorized_record_test.rb",
199
- "test/session_test/validation_test.rb",
200
- "test/test_helper.rb"
201
- ]
202
-
203
- if s.respond_to? :specification_version then
204
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
205
- s.specification_version = 3
206
-
207
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
208
- s.add_runtime_dependency(%q<activesupport>, [">= 0"])
209
- else
210
- s.add_dependency(%q<activesupport>, [">= 0"])
211
- end
212
- else
213
- s.add_dependency(%q<activesupport>, [">= 0"])
214
- end
215
- end
14
+ s.add_dependency 'activerecord', '~> 2.3.0'
15
+ s.add_dependency 'activesupport', '~> 2.3.0'
216
16
 
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
@@ -13,9 +13,9 @@ module Authlogic
13
13
  email_name_regex = '[A-Z0-9_\.%\+\-]+'
14
14
  domain_head_regex = '(?:[A-Z0-9\-]+\.)+'
15
15
  domain_tld_regex = '(?:[A-Z]{2,4}|museum|travel)'
16
- @email_regex = /^#{email_name_regex}@#{domain_head_regex}#{domain_tld_regex}$/i
16
+ @email_regex = /^#{email_name_regex}@#{domain_head_regex}#{domain_tld_regex}\z/i
17
17
  end
18
-
18
+
19
19
  # A simple regular expression that only allows for letters, numbers, spaces, and .-_@. Just a standard login / username
20
20
  # regular expression.
21
21
  def self.login
metadata CHANGED
@@ -1,42 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Ben Johnson of Binary Logic
8
+ - Ben Johnson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2010-08-04 00:00:00.000000000 Z
12
+ date: 2012-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activerecord
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.3.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.3.0
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: activesupport
16
32
  requirement: !ruby/object:Gem::Requirement
17
33
  none: false
18
34
  requirements:
19
- - - ! '>='
35
+ - - ~>
20
36
  - !ruby/object:Gem::Version
21
- version: '0'
37
+ version: 2.3.0
22
38
  type: :runtime
23
39
  prerelease: false
24
40
  version_requirements: !ruby/object:Gem::Requirement
25
41
  none: false
26
42
  requirements:
27
- - - ! '>='
43
+ - - ~>
28
44
  - !ruby/object:Gem::Version
29
- version: '0'
30
- description:
31
- email: bjohnson@binarylogic.com
45
+ version: 2.3.0
46
+ description: A clean, simple, and unobtrusive ruby authentication solution.
47
+ email:
48
+ - bjohnson@binarylogic.com
32
49
  executables: []
33
50
  extensions: []
34
- extra_rdoc_files:
35
- - LICENSE
36
- - README.rdoc
51
+ extra_rdoc_files: []
37
52
  files:
38
53
  - .gitignore
39
54
  - CHANGELOG.rdoc
55
+ - Gemfile
56
+ - Gemfile.lock
40
57
  - LICENSE
41
58
  - README.rdoc
42
59
  - Rakefile
@@ -163,8 +180,7 @@ files:
163
180
  homepage: http://github.com/binarylogic/authlogic
164
181
  licenses: []
165
182
  post_install_message:
166
- rdoc_options:
167
- - --charset=UTF-8
183
+ rdoc_options: []
168
184
  require_paths:
169
185
  - lib
170
186
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -203,6 +219,10 @@ test_files:
203
219
  - test/crypto_provider_test/sha1_test.rb
204
220
  - test/crypto_provider_test/sha256_test.rb
205
221
  - test/crypto_provider_test/sha512_test.rb
222
+ - test/fixtures/companies.yml
223
+ - test/fixtures/employees.yml
224
+ - test/fixtures/projects.yml
225
+ - test/fixtures/users.yml
206
226
  - test/i18n_test.rb
207
227
  - test/libs/affiliate.rb
208
228
  - test/libs/company.rb