authlogic 2.0.14 → 2.1.0

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.

@@ -0,0 +1,9 @@
1
+ .DS_Store
2
+ .swp
3
+ *.log
4
+ *.sqlite3
5
+ pkg/*
6
+ coverage/*
7
+ doc/*
8
+ benchmarks/*
9
+
@@ -1,6 +1,11 @@
1
+ == 2.1.0 released 2009-6-27
2
+
3
+ * Fixed bug when using act_like_restful_authentication and setting passwords, needed to add a 2nd parameter to tell if to check against the database or not.
4
+ * Don't save record if they are read only.
5
+
1
6
  == 2.0.14 released 2009-6-13
2
7
 
3
- * Fixed issue with using brute force protection AND generalize_credentials_error_messages. Brute force protection was looking to see if there were password errors, which generalize_credentials_error_messages was obfuscating. This is all fixed now though thanks to a handy article on Microsoft (http://support.microsoft.com/kb/168702), method #2, it works every time.
8
+ * Fixed issue with using brute force protection AND generalize_credentials_error_messages. Brute force protection was looking to see if there were password errors, which generalize_credentials_error_messages was obfuscating.
4
9
  * Added db_setup? method to avoid errors during rake tasks where the db might not be set up. Ex: migrations
5
10
  * Stop using errors.on(key) since that is now deprecated in Rails. Use errors[key] instead.
6
11
  * Use valid_password? for the method name to validate a password instead of valid_#{password_field}?.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007 Ben Johnson of Binary Logic (binarylogic.com)
1
+ Copyright (c) 2009 Ben Johnson of Binary Logic
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -49,7 +49,7 @@ Authlogic is very flexible, it has a strong public API and a plethora of hooks t
49
49
 
50
50
  == Helpful links
51
51
 
52
- * <b>Documentation:</b> http://authlogic.rubyforge.org
52
+ * <b>Documentation:</b> http://rdoc.info/projects/binarylogic/authlogic
53
53
  * <b>Repository:</b> http://github.com/binarylogic/authlogic/tree/master
54
54
  * <b>Railscasts Screencast:</b> http://railscasts.com/episodes/160-authlogic
55
55
  * <b>Live example with OpenID "add on":</b> http://authlogicexample.binarylogic.com
@@ -67,6 +67,7 @@ If you find a bug or a problem please post it on lighthouse. If you need help wi
67
67
  * <b>Authlogic OpenID addon:</b> http://github.com/binarylogic/authlogic_openid
68
68
  * <b>Authlogic LDAP addon:</b> http://github.com/binarylogic/authlogic_ldap
69
69
  * <b>Authlogic Facebook Connect:</b> http://github.com/kalasjocke/authlogic_facebook_connect
70
+ * <b>Authlogic OAuth (Twitter):</b> http://github.com/jrallison/authlogic_oauth
70
71
 
71
72
  If you create one of your own, please let me know about it so I can add it to this list. Or just fork the project, add your link, and send me a pull request.
72
73
 
@@ -198,12 +199,15 @@ Or how about persisting the session...
198
199
 
199
200
  Install the gem / plugin (recommended)
200
201
 
202
+ From rubyforge:
203
+
201
204
  $ sudo gem install authlogic
202
205
 
203
- Now add the gem dependency in your config:
206
+ OR from github:
207
+
208
+ $ sudo gem install binarylogic-authlogic
204
209
 
205
- # config/environment.rb
206
- config.gem "authlogic"
210
+ Now just add the gem dependency in your projects configuration.
207
211
 
208
212
  Or you install this as a plugin (for older versions of rails)
209
213
 
data/Rakefile CHANGED
@@ -1,20 +1,49 @@
1
- ENV['RDOCOPT'] = "-S -f html -T hanna"
1
+ require 'rubygems'
2
+ require 'rake'
2
3
 
3
- require "rubygems"
4
- require "hoe"
5
- require File.dirname(__FILE__) << "/lib/authlogic/version"
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.rubyforge_project = "authlogic"
13
+ gem.add_dependency "activesupport"
14
+ end
15
+ rescue LoadError
16
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
+ end
6
18
 
7
- Hoe.new("Authlogic", Authlogic::Version::STRING) do |p|
8
- p.name = "authlogic"
9
- p.author = "Ben Johnson of Binary Logic"
10
- p.email = 'bjohnson@binarylogic.com'
11
- p.summary = "A clean, simple, and unobtrusive ruby authentication solution."
12
- p.description = "A clean, simple, and unobtrusive ruby authentication solution."
13
- p.url = "http://github.com/binarylogic/authlogic"
14
- p.history_file = "CHANGELOG.rdoc"
15
- p.readme_file = "README.rdoc"
16
- p.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc"]
17
- p.remote_rdoc_dir = ''
18
- p.test_globs = ["test/*/test_*.rb", "test/*_test.rb", "test/*/*_test.rb"]
19
- p.extra_deps = %w(activesupport)
20
- end
19
+ require 'rake/testtask'
20
+ Rake::TestTask.new(:test) do |test|
21
+ test.libs << 'lib' << 'test'
22
+ test.pattern = 'test/**/*_test.rb'
23
+ test.verbose = true
24
+ end
25
+
26
+ begin
27
+ require 'rcov/rcovtask'
28
+ Rcov::RcovTask.new do |test|
29
+ test.libs << 'test'
30
+ test.pattern = 'test/**/*_test.rb'
31
+ test.verbose = true
32
+ end
33
+ rescue LoadError
34
+ task :rcov do
35
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
36
+ end
37
+ end
38
+
39
+ task :default => :test
40
+
41
+ begin
42
+ require 'rake/contrib/sshpublisher'
43
+ namespace :rubyforge do
44
+ desc "Release gem to RubyForge"
45
+ task :release => ["rubyforge:release:gem"]
46
+ end
47
+ rescue LoadError
48
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
49
+ end
@@ -0,0 +1,4 @@
1
+ ---
2
+ :patch: 0
3
+ :major: 2
4
+ :minor: 1
@@ -0,0 +1,205 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{authlogic}
5
+ s.version = "2.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Ben Johnson of Binary Logic"]
9
+ s.date = %q{2009-06-27}
10
+ s.email = %q{bjohnson@binarylogic.com}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README.rdoc"
14
+ ]
15
+ s.files = [
16
+ ".gitignore",
17
+ "CHANGELOG.rdoc",
18
+ "LICENSE",
19
+ "README.rdoc",
20
+ "Rakefile",
21
+ "VERSION.yml",
22
+ "authlogic.gemspec",
23
+ "generators/session/session_generator.rb",
24
+ "generators/session/templates/session.rb",
25
+ "init.rb",
26
+ "lib/authlogic.rb",
27
+ "lib/authlogic/acts_as_authentic/base.rb",
28
+ "lib/authlogic/acts_as_authentic/email.rb",
29
+ "lib/authlogic/acts_as_authentic/logged_in_status.rb",
30
+ "lib/authlogic/acts_as_authentic/login.rb",
31
+ "lib/authlogic/acts_as_authentic/magic_columns.rb",
32
+ "lib/authlogic/acts_as_authentic/password.rb",
33
+ "lib/authlogic/acts_as_authentic/perishable_token.rb",
34
+ "lib/authlogic/acts_as_authentic/persistence_token.rb",
35
+ "lib/authlogic/acts_as_authentic/restful_authentication.rb",
36
+ "lib/authlogic/acts_as_authentic/session_maintenance.rb",
37
+ "lib/authlogic/acts_as_authentic/single_access_token.rb",
38
+ "lib/authlogic/acts_as_authentic/validations_scope.rb",
39
+ "lib/authlogic/authenticates_many/association.rb",
40
+ "lib/authlogic/authenticates_many/base.rb",
41
+ "lib/authlogic/controller_adapters/abstract_adapter.rb",
42
+ "lib/authlogic/controller_adapters/merb_adapter.rb",
43
+ "lib/authlogic/controller_adapters/rails_adapter.rb",
44
+ "lib/authlogic/crypto_providers/aes256.rb",
45
+ "lib/authlogic/crypto_providers/bcrypt.rb",
46
+ "lib/authlogic/crypto_providers/md5.rb",
47
+ "lib/authlogic/crypto_providers/sha1.rb",
48
+ "lib/authlogic/crypto_providers/sha512.rb",
49
+ "lib/authlogic/i18n.rb",
50
+ "lib/authlogic/random.rb",
51
+ "lib/authlogic/regex.rb",
52
+ "lib/authlogic/session/activation.rb",
53
+ "lib/authlogic/session/active_record_trickery.rb",
54
+ "lib/authlogic/session/base.rb",
55
+ "lib/authlogic/session/brute_force_protection.rb",
56
+ "lib/authlogic/session/callbacks.rb",
57
+ "lib/authlogic/session/cookies.rb",
58
+ "lib/authlogic/session/existence.rb",
59
+ "lib/authlogic/session/foundation.rb",
60
+ "lib/authlogic/session/http_auth.rb",
61
+ "lib/authlogic/session/id.rb",
62
+ "lib/authlogic/session/klass.rb",
63
+ "lib/authlogic/session/magic_columns.rb",
64
+ "lib/authlogic/session/magic_states.rb",
65
+ "lib/authlogic/session/params.rb",
66
+ "lib/authlogic/session/password.rb",
67
+ "lib/authlogic/session/perishable_token.rb",
68
+ "lib/authlogic/session/persistence.rb",
69
+ "lib/authlogic/session/priority_record.rb",
70
+ "lib/authlogic/session/scopes.rb",
71
+ "lib/authlogic/session/session.rb",
72
+ "lib/authlogic/session/timeout.rb",
73
+ "lib/authlogic/session/unauthorized_record.rb",
74
+ "lib/authlogic/session/validation.rb",
75
+ "lib/authlogic/test_case.rb",
76
+ "lib/authlogic/test_case/mock_controller.rb",
77
+ "lib/authlogic/test_case/mock_cookie_jar.rb",
78
+ "lib/authlogic/test_case/mock_logger.rb",
79
+ "lib/authlogic/test_case/mock_request.rb",
80
+ "lib/authlogic/test_case/rails_request_adapter.rb",
81
+ "rails/init.rb",
82
+ "shoulda_macros/authlogic.rb",
83
+ "test/acts_as_authentic_test/base_test.rb",
84
+ "test/acts_as_authentic_test/email_test.rb",
85
+ "test/acts_as_authentic_test/logged_in_status_test.rb",
86
+ "test/acts_as_authentic_test/login_test.rb",
87
+ "test/acts_as_authentic_test/magic_columns_test.rb",
88
+ "test/acts_as_authentic_test/password_test.rb",
89
+ "test/acts_as_authentic_test/perishable_token_test.rb",
90
+ "test/acts_as_authentic_test/persistence_token_test.rb",
91
+ "test/acts_as_authentic_test/restful_authentication_test.rb",
92
+ "test/acts_as_authentic_test/session_maintenance_test.rb",
93
+ "test/acts_as_authentic_test/single_access_test.rb",
94
+ "test/authenticates_many_test.rb",
95
+ "test/crypto_provider_test/aes256_test.rb",
96
+ "test/crypto_provider_test/bcrypt_test.rb",
97
+ "test/crypto_provider_test/sha1_test.rb",
98
+ "test/crypto_provider_test/sha512_test.rb",
99
+ "test/fixtures/companies.yml",
100
+ "test/fixtures/employees.yml",
101
+ "test/fixtures/projects.yml",
102
+ "test/fixtures/users.yml",
103
+ "test/libs/affiliate.rb",
104
+ "test/libs/company.rb",
105
+ "test/libs/employee.rb",
106
+ "test/libs/employee_session.rb",
107
+ "test/libs/ldaper.rb",
108
+ "test/libs/ordered_hash.rb",
109
+ "test/libs/project.rb",
110
+ "test/libs/user.rb",
111
+ "test/libs/user_session.rb",
112
+ "test/random_test.rb",
113
+ "test/session_test/activation_test.rb",
114
+ "test/session_test/active_record_trickery_test.rb",
115
+ "test/session_test/brute_force_protection_test.rb",
116
+ "test/session_test/callbacks_test.rb",
117
+ "test/session_test/cookies_test.rb",
118
+ "test/session_test/credentials_test.rb",
119
+ "test/session_test/existence_test.rb",
120
+ "test/session_test/http_auth_test.rb",
121
+ "test/session_test/id_test.rb",
122
+ "test/session_test/klass_test.rb",
123
+ "test/session_test/magic_columns_test.rb",
124
+ "test/session_test/magic_states_test.rb",
125
+ "test/session_test/params_test.rb",
126
+ "test/session_test/password_test.rb",
127
+ "test/session_test/perishability_test.rb",
128
+ "test/session_test/persistence_test.rb",
129
+ "test/session_test/scopes_test.rb",
130
+ "test/session_test/session_test.rb",
131
+ "test/session_test/timeout_test.rb",
132
+ "test/session_test/unauthorized_record_test.rb",
133
+ "test/session_test/validation_test.rb",
134
+ "test/test_helper.rb"
135
+ ]
136
+ s.homepage = %q{http://github.com/binarylogic/authlogic}
137
+ s.rdoc_options = ["--charset=UTF-8"]
138
+ s.require_paths = ["lib"]
139
+ s.rubyforge_project = %q{authlogic}
140
+ s.rubygems_version = %q{1.3.4}
141
+ s.summary = %q{A clean, simple, and unobtrusive ruby authentication solution.}
142
+ s.test_files = [
143
+ "test/acts_as_authentic_test/base_test.rb",
144
+ "test/acts_as_authentic_test/email_test.rb",
145
+ "test/acts_as_authentic_test/logged_in_status_test.rb",
146
+ "test/acts_as_authentic_test/login_test.rb",
147
+ "test/acts_as_authentic_test/magic_columns_test.rb",
148
+ "test/acts_as_authentic_test/password_test.rb",
149
+ "test/acts_as_authentic_test/perishable_token_test.rb",
150
+ "test/acts_as_authentic_test/persistence_token_test.rb",
151
+ "test/acts_as_authentic_test/restful_authentication_test.rb",
152
+ "test/acts_as_authentic_test/session_maintenance_test.rb",
153
+ "test/acts_as_authentic_test/single_access_test.rb",
154
+ "test/authenticates_many_test.rb",
155
+ "test/crypto_provider_test/aes256_test.rb",
156
+ "test/crypto_provider_test/bcrypt_test.rb",
157
+ "test/crypto_provider_test/sha1_test.rb",
158
+ "test/crypto_provider_test/sha512_test.rb",
159
+ "test/libs/affiliate.rb",
160
+ "test/libs/company.rb",
161
+ "test/libs/employee.rb",
162
+ "test/libs/employee_session.rb",
163
+ "test/libs/ldaper.rb",
164
+ "test/libs/ordered_hash.rb",
165
+ "test/libs/project.rb",
166
+ "test/libs/user.rb",
167
+ "test/libs/user_session.rb",
168
+ "test/random_test.rb",
169
+ "test/session_test/activation_test.rb",
170
+ "test/session_test/active_record_trickery_test.rb",
171
+ "test/session_test/brute_force_protection_test.rb",
172
+ "test/session_test/callbacks_test.rb",
173
+ "test/session_test/cookies_test.rb",
174
+ "test/session_test/credentials_test.rb",
175
+ "test/session_test/existence_test.rb",
176
+ "test/session_test/http_auth_test.rb",
177
+ "test/session_test/id_test.rb",
178
+ "test/session_test/klass_test.rb",
179
+ "test/session_test/magic_columns_test.rb",
180
+ "test/session_test/magic_states_test.rb",
181
+ "test/session_test/params_test.rb",
182
+ "test/session_test/password_test.rb",
183
+ "test/session_test/perishability_test.rb",
184
+ "test/session_test/persistence_test.rb",
185
+ "test/session_test/scopes_test.rb",
186
+ "test/session_test/session_test.rb",
187
+ "test/session_test/timeout_test.rb",
188
+ "test/session_test/unauthorized_record_test.rb",
189
+ "test/session_test/validation_test.rb",
190
+ "test/test_helper.rb"
191
+ ]
192
+
193
+ if s.respond_to? :specification_version then
194
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
195
+ s.specification_version = 3
196
+
197
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
198
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
199
+ else
200
+ s.add_dependency(%q<activesupport>, [">= 0"])
201
+ end
202
+ else
203
+ s.add_dependency(%q<activesupport>, [">= 0"])
204
+ end
205
+ end
@@ -1,6 +1,5 @@
1
1
  require "active_support"
2
2
 
3
- require File.dirname(__FILE__) + "/authlogic/version"
4
3
  require File.dirname(__FILE__) + "/authlogic/i18n"
5
4
  require File.dirname(__FILE__) + "/authlogic/random"
6
5
  require File.dirname(__FILE__) + "/authlogic/regex"
@@ -226,7 +226,7 @@ module Authlogic
226
226
  before_password_set
227
227
  @password = pass
228
228
  send("#{password_salt_field}=", Authlogic::Random.friendly_token) if password_salt_field
229
- send("#{crypted_password_field}=", crypto_provider.encrypt(*encrypt_arguments(@password, act_like_restful_authentication? ? :restful_authentication : nil)))
229
+ send("#{crypted_password_field}=", crypto_provider.encrypt(*encrypt_arguments(@password, false, act_like_restful_authentication? ? :restful_authentication : nil)))
230
230
  @password_changed = true
231
231
  after_password_set
232
232
  end
@@ -74,6 +74,11 @@ module Authlogic
74
74
 
75
75
  find(:first, :conditions => [conditions_sql, *conditions_subs])
76
76
  end
77
+
78
+ # This method will raise ActiveRecord::NotFound if no record is found.
79
+ def find_using_perishable_token!(token, age = perishable_token_valid_for)
80
+ find_using_perishable_token(token, age) || raise(ActiveRecord::RecordNotFound)
81
+ end
77
82
  end
78
83
 
79
84
  # Instance level methods for the perishable token.
@@ -97,4 +102,4 @@ module Authlogic
97
102
  end
98
103
  end
99
104
  end
100
- end
105
+ end
@@ -80,7 +80,7 @@ module Authlogic
80
80
 
81
81
  def save_record(alternate_record = nil)
82
82
  r = alternate_record || record
83
- r.save_without_session_maintenance(false) if r && r.changed?
83
+ r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly?
84
84
  end
85
85
  end
86
86
  end
@@ -80,5 +80,11 @@ module ActsAsAuthenticTest
80
80
  assert_equal ben, User.find_using_perishable_token(ben.perishable_token, 20.minutes)
81
81
  User.perishable_token_valid_for = 10.minutes
82
82
  end
83
+
84
+ def test_find_perishable_token_with_bang
85
+ assert_raises ActiveRecord::RecordNotFound do
86
+ User.find_using_perishable_token!('some_bad_value')
87
+ end
88
+ end
83
89
  end
84
- end
90
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson of Binary Logic
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-13 00:00:00 -04:00
12
+ date: 2009-06-27 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,32 +22,23 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
- - !ruby/object:Gem::Dependency
26
- name: hoe
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.0.0
34
- version:
35
- description: A clean, simple, and unobtrusive ruby authentication solution.
25
+ description:
36
26
  email: bjohnson@binarylogic.com
37
27
  executables: []
38
28
 
39
29
  extensions: []
40
30
 
41
31
  extra_rdoc_files:
42
- - Manifest.txt
43
- - CHANGELOG.rdoc
32
+ - LICENSE
44
33
  - README.rdoc
45
34
  files:
35
+ - .gitignore
46
36
  - CHANGELOG.rdoc
47
- - MIT-LICENSE
48
- - Manifest.txt
37
+ - LICENSE
49
38
  - README.rdoc
50
39
  - Rakefile
40
+ - VERSION.yml
41
+ - authlogic.gemspec
51
42
  - generators/session/session_generator.rb
52
43
  - generators/session/templates/session.rb
53
44
  - init.rb
@@ -106,7 +97,6 @@ files:
106
97
  - lib/authlogic/test_case/mock_logger.rb
107
98
  - lib/authlogic/test_case/mock_request.rb
108
99
  - lib/authlogic/test_case/rails_request_adapter.rb
109
- - lib/authlogic/version.rb
110
100
  - rails/init.rb
111
101
  - shoulda_macros/authlogic.rb
112
102
  - test/acts_as_authentic_test/base_test.rb
@@ -167,8 +157,7 @@ licenses: []
167
157
 
168
158
  post_install_message:
169
159
  rdoc_options:
170
- - --main
171
- - README.rdoc
160
+ - --charset=UTF-8
172
161
  require_paths:
173
162
  - lib
174
163
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -191,8 +180,6 @@ signing_key:
191
180
  specification_version: 3
192
181
  summary: A clean, simple, and unobtrusive ruby authentication solution.
193
182
  test_files:
194
- - test/authenticates_many_test.rb
195
- - test/random_test.rb
196
183
  - test/acts_as_authentic_test/base_test.rb
197
184
  - test/acts_as_authentic_test/email_test.rb
198
185
  - test/acts_as_authentic_test/logged_in_status_test.rb
@@ -204,10 +191,21 @@ test_files:
204
191
  - test/acts_as_authentic_test/restful_authentication_test.rb
205
192
  - test/acts_as_authentic_test/session_maintenance_test.rb
206
193
  - test/acts_as_authentic_test/single_access_test.rb
194
+ - test/authenticates_many_test.rb
207
195
  - test/crypto_provider_test/aes256_test.rb
208
196
  - test/crypto_provider_test/bcrypt_test.rb
209
197
  - test/crypto_provider_test/sha1_test.rb
210
198
  - test/crypto_provider_test/sha512_test.rb
199
+ - test/libs/affiliate.rb
200
+ - test/libs/company.rb
201
+ - test/libs/employee.rb
202
+ - test/libs/employee_session.rb
203
+ - test/libs/ldaper.rb
204
+ - test/libs/ordered_hash.rb
205
+ - test/libs/project.rb
206
+ - test/libs/user.rb
207
+ - test/libs/user_session.rb
208
+ - test/random_test.rb
211
209
  - test/session_test/activation_test.rb
212
210
  - test/session_test/active_record_trickery_test.rb
213
211
  - test/session_test/brute_force_protection_test.rb
@@ -229,3 +227,4 @@ test_files:
229
227
  - test/session_test/timeout_test.rb
230
228
  - test/session_test/unauthorized_record_test.rb
231
229
  - test/session_test/validation_test.rb
230
+ - test/test_helper.rb
@@ -1,118 +0,0 @@
1
- CHANGELOG.rdoc
2
- MIT-LICENSE
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- generators/session/session_generator.rb
7
- generators/session/templates/session.rb
8
- init.rb
9
- lib/authlogic.rb
10
- lib/authlogic/acts_as_authentic/base.rb
11
- lib/authlogic/acts_as_authentic/email.rb
12
- lib/authlogic/acts_as_authentic/logged_in_status.rb
13
- lib/authlogic/acts_as_authentic/login.rb
14
- lib/authlogic/acts_as_authentic/magic_columns.rb
15
- lib/authlogic/acts_as_authentic/password.rb
16
- lib/authlogic/acts_as_authentic/perishable_token.rb
17
- lib/authlogic/acts_as_authentic/persistence_token.rb
18
- lib/authlogic/acts_as_authentic/restful_authentication.rb
19
- lib/authlogic/acts_as_authentic/session_maintenance.rb
20
- lib/authlogic/acts_as_authentic/single_access_token.rb
21
- lib/authlogic/acts_as_authentic/validations_scope.rb
22
- lib/authlogic/authenticates_many/association.rb
23
- lib/authlogic/authenticates_many/base.rb
24
- lib/authlogic/controller_adapters/abstract_adapter.rb
25
- lib/authlogic/controller_adapters/merb_adapter.rb
26
- lib/authlogic/controller_adapters/rails_adapter.rb
27
- lib/authlogic/crypto_providers/aes256.rb
28
- lib/authlogic/crypto_providers/bcrypt.rb
29
- lib/authlogic/crypto_providers/md5.rb
30
- lib/authlogic/crypto_providers/sha1.rb
31
- lib/authlogic/crypto_providers/sha512.rb
32
- lib/authlogic/i18n.rb
33
- lib/authlogic/random.rb
34
- lib/authlogic/regex.rb
35
- lib/authlogic/session/activation.rb
36
- lib/authlogic/session/active_record_trickery.rb
37
- lib/authlogic/session/base.rb
38
- lib/authlogic/session/brute_force_protection.rb
39
- lib/authlogic/session/callbacks.rb
40
- lib/authlogic/session/cookies.rb
41
- lib/authlogic/session/existence.rb
42
- lib/authlogic/session/foundation.rb
43
- lib/authlogic/session/http_auth.rb
44
- lib/authlogic/session/id.rb
45
- lib/authlogic/session/klass.rb
46
- lib/authlogic/session/magic_columns.rb
47
- lib/authlogic/session/magic_states.rb
48
- lib/authlogic/session/params.rb
49
- lib/authlogic/session/password.rb
50
- lib/authlogic/session/perishable_token.rb
51
- lib/authlogic/session/persistence.rb
52
- lib/authlogic/session/priority_record.rb
53
- lib/authlogic/session/scopes.rb
54
- lib/authlogic/session/session.rb
55
- lib/authlogic/session/timeout.rb
56
- lib/authlogic/session/unauthorized_record.rb
57
- lib/authlogic/session/validation.rb
58
- lib/authlogic/test_case.rb
59
- lib/authlogic/test_case/mock_controller.rb
60
- lib/authlogic/test_case/mock_cookie_jar.rb
61
- lib/authlogic/test_case/mock_logger.rb
62
- lib/authlogic/test_case/mock_request.rb
63
- lib/authlogic/test_case/rails_request_adapter.rb
64
- lib/authlogic/version.rb
65
- rails/init.rb
66
- shoulda_macros/authlogic.rb
67
- test/acts_as_authentic_test/base_test.rb
68
- test/acts_as_authentic_test/email_test.rb
69
- test/acts_as_authentic_test/logged_in_status_test.rb
70
- test/acts_as_authentic_test/login_test.rb
71
- test/acts_as_authentic_test/magic_columns_test.rb
72
- test/acts_as_authentic_test/password_test.rb
73
- test/acts_as_authentic_test/perishable_token_test.rb
74
- test/acts_as_authentic_test/persistence_token_test.rb
75
- test/acts_as_authentic_test/restful_authentication_test.rb
76
- test/acts_as_authentic_test/session_maintenance_test.rb
77
- test/acts_as_authentic_test/single_access_test.rb
78
- test/authenticates_many_test.rb
79
- test/crypto_provider_test/aes256_test.rb
80
- test/crypto_provider_test/bcrypt_test.rb
81
- test/crypto_provider_test/sha1_test.rb
82
- test/crypto_provider_test/sha512_test.rb
83
- test/fixtures/companies.yml
84
- test/fixtures/employees.yml
85
- test/fixtures/projects.yml
86
- test/fixtures/users.yml
87
- test/libs/affiliate.rb
88
- test/libs/company.rb
89
- test/libs/employee.rb
90
- test/libs/employee_session.rb
91
- test/libs/ldaper.rb
92
- test/libs/ordered_hash.rb
93
- test/libs/project.rb
94
- test/libs/user.rb
95
- test/libs/user_session.rb
96
- test/random_test.rb
97
- test/session_test/activation_test.rb
98
- test/session_test/active_record_trickery_test.rb
99
- test/session_test/brute_force_protection_test.rb
100
- test/session_test/callbacks_test.rb
101
- test/session_test/cookies_test.rb
102
- test/session_test/credentials_test.rb
103
- test/session_test/existence_test.rb
104
- test/session_test/http_auth_test.rb
105
- test/session_test/id_test.rb
106
- test/session_test/klass_test.rb
107
- test/session_test/magic_columns_test.rb
108
- test/session_test/magic_states_test.rb
109
- test/session_test/params_test.rb
110
- test/session_test/password_test.rb
111
- test/session_test/perishability_test.rb
112
- test/session_test/persistence_test.rb
113
- test/session_test/scopes_test.rb
114
- test/session_test/session_test.rb
115
- test/session_test/timeout_test.rb
116
- test/session_test/unauthorized_record_test.rb
117
- test/session_test/validation_test.rb
118
- test/test_helper.rb
@@ -1,51 +0,0 @@
1
- module Authlogic # :nodoc:
2
- # A class for describing the current version of a library. The version
3
- # consists of three parts: the +major+ number, the +minor+ number, and the
4
- # +tiny+ (or +patch+) number.
5
- class Version
6
- include Comparable
7
-
8
- # A convenience method for instantiating a new Version instance with the
9
- # given +major+, +minor+, and +tiny+ components.
10
- def self.[](major, minor, tiny)
11
- new(major, minor, tiny)
12
- end
13
-
14
- attr_reader :major, :minor, :tiny
15
-
16
- # Create a new Version object with the given components.
17
- def initialize(major, minor, tiny)
18
- @major, @minor, @tiny = major, minor, tiny
19
- end
20
-
21
- # Compare this version to the given +version+ object.
22
- def <=>(version)
23
- to_i <=> version.to_i
24
- end
25
-
26
- # Converts this version object to a string, where each of the three
27
- # version components are joined by the '.' character. E.g., 2.0.0.
28
- def to_s
29
- @to_s ||= [@major, @minor, @tiny].join(".")
30
- end
31
-
32
- # Converts this version to a canonical integer that may be compared
33
- # against other version objects.
34
- def to_i
35
- @to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
36
- end
37
-
38
- def to_a
39
- [@major, @minor, @tiny]
40
- end
41
-
42
- MAJOR = 2
43
- MINOR = 0
44
- TINY = 14
45
-
46
- # The current version as a Version instance
47
- CURRENT = new(MAJOR, MINOR, TINY)
48
- # The current version as a String
49
- STRING = CURRENT.to_s
50
- end
51
- end