Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

I have cleaned up main lib from deprecation warnings #211

Closed
wants to merge 1 commit into from

3 participants

@ixti

Hello,
Subj, unfortunately I still have one error on tests on my Debian GNU/Linux with ruby 1.9.2 (from package) and latest rubygems - I'll try again once I'll install RVM (but to be honest seems like the problem is not in my ruby version).

This is an error (don't look at 1.9.1 version, in fact it's 1.9.2):
1) Error:
test_scoping(AuthenticatesManyTest):
NoMethodError: private method warn' called for nil:NilClass
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/named_scope.rb:132:in
valid_scope_name?'
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/named_scope.rb:102:in scope'
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/associations/association_collection.rb:443:in
block in method_missing'
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/base.rb:1128:in with_scope'
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/associations/association_proxy.rb:203:in
with_scope'
/var/lib/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/associations/association_collection.rb:439:in method_missing'
/home/ixti/projects/authlogic/lib/authlogic/authenticates_many/base.rb:50:in
user_sessions'
test/authenticates_many_test.rb:10:in `test_scoping'

@jjb
jjb commented

hi-- i'm going to try to maintain the One True Rails 3 Fork :) please send your pull request to https://github.com/jjb/authlogic

@ixti

To be honest I have already removed my fork, so I can't send an original pull request. But as I'm going to start a new project with RoR3 I would like to help with your good will, so I'll prepare a new patch ASAP.

@jjb
jjb commented

thanks -- i just applied a different patch that i'm pretty sure covers all your changes. if you have further contributions, send them over! https://github.com/jjb/authlogic

@ixti

yup. right after i have sent a message i have saw your changes :))

@eric

Does this still work in Rails 2?

@ixti

2eric

to be honest i'm not sure. :)) i didn't tested it and lost my interest far ago :))
Try jjb's fork, he made great success (at least when I last time saw his repo): https://github.com/jjb/authlogic

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 12, 2010
  1. @ixti

    Fixed deprecations of RoR 3.0.1

    ixti authored
This page is out of date. Refresh to see the latest.
View
6 lib/authlogic/acts_as_authentic/logged_in_status.rb
@@ -32,8 +32,8 @@ def self.included(klass)
klass.class_eval do
include InstanceMethods
- named_scope :logged_in, lambda { {:conditions => ["last_request_at > ?", logged_in_timeout.seconds.ago]} }
- named_scope :logged_out, lambda { {:conditions => ["last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago]} }
+ scope :logged_in, lambda { {:conditions => ["last_request_at > ?", logged_in_timeout.seconds.ago]} }
+ scope :logged_out, lambda { {:conditions => ["last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago]} }
end
end
@@ -57,4 +57,4 @@ def logged_in_timeout
end
end
end
-end
+end
View
6 lib/authlogic/acts_as_authentic/password.rb
@@ -277,7 +277,7 @@ def reset_password
# Resets the password to a random friendly token and then saves the record.
def reset_password!
reset_password
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :randomize_password!, :reset_password!
@@ -314,7 +314,7 @@ def transition_password?(index, encryptor, crypted, check_against_database)
def transition_password(attempted_password)
self.password = attempted_password
- save(false)
+ save(:validate => false)
end
def require_password?
@@ -352,4 +352,4 @@ def transition_from_crypto_providers
end
end
end
-end
+end
View
2  lib/authlogic/acts_as_authentic/perishable_token.rb
@@ -91,7 +91,7 @@ def reset_perishable_token
# Same as reset_perishable_token, but then saves the record afterwards.
def reset_perishable_token!
reset_perishable_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
# A convenience method based on the disable_perishable_token_maintenance configuration option.
View
4 lib/authlogic/acts_as_authentic/persistence_token.rb
@@ -53,7 +53,7 @@ def reset_persistence_token
# Same as reset_persistence_token, but then saves the record.
def reset_persistence_token!
reset_persistence_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :forget!, :reset_persistence_token!
@@ -65,4 +65,4 @@ def reset_persistence_token?
end
end
end
-end
+end
View
2  lib/authlogic/authenticates_many/base.rb
@@ -52,4 +52,4 @@ def #{name}
::ActiveRecord::Base.extend(Base) if defined?(::ActiveRecord)
end
-end
+end
View
4 lib/authlogic/session/callbacks.rb
@@ -92,8 +92,8 @@ def persist
def save_record(alternate_record = nil)
r = alternate_record || record
- r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly?
+ r.save_without_session_maintenance(:validate => false) if r && r.changed? && !r.readonly?
end
end
end
-end
+end
Something went wrong with that request. Please try again.