Skip to content
Browse files

fix deprecation notices

  • Loading branch information...
1 parent 85b2a6b commit 8fc0870c62e61c6b495f1f040d3970c67ebea9f1 @binarylogic committed May 23, 2010
View
3 Rakefile
@@ -9,10 +9,9 @@ begin
gem.email = "bjohnson@binarylogic.com"
gem.homepage = "http://github.com/binarylogic/authlogic"
gem.authors = ["Ben Johnson of Binary Logic"]
- gem.rubyforge_project = "authlogic"
gem.add_dependency "activesupport"
end
- Jeweler::RubyforgeTasks.new
+ Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
View
2 lib/authlogic/acts_as_authentic/password.rb
@@ -182,7 +182,7 @@ def self.included(klass)
klass.define_callbacks *METHODS
# If Rails 3, support the new callback syntax
- if klass.metaclass.method_defined?(:set_callback)
@zilkey
zilkey added a note May 26, 2010

You broke backwards compatibility with 2.3.5 - was that intentional? Do you have any docs on what versions work with different versions of rails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ if klass.singleton_class.method_defined?(:set_callback)
METHODS.each do |method|
klass.class_eval <<-"end_eval", __FILE__, __LINE__
def self.#{method}(*methods, &block)
View
2 lib/authlogic/controller_adapters/rails_adapter.rb
@@ -15,7 +15,7 @@ def cookies
def cookie_domain
@cookie_domain_key ||= Rails::VERSION::STRING >= '2.3' ? :domain : :session_domain
- ActionController::Base.session_options[@cookie_domain_key]
+ controller.request.session_options[@cookie_domain_key]
end
def request_content_type
View
2 lib/authlogic/session/callbacks.rb
@@ -66,7 +66,7 @@ def self.included(base) #:nodoc:
base.define_callbacks *METHODS
# If Rails 3, support the new callback syntax
- if base.metaclass.method_defined?(:set_callback)
+ if base.singleton_class.method_defined?(:set_callback)

This broke my rails 2.3.4 project, FWIW (fix: downgrade to 2.1.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
METHODS.each do |method|
base.class_eval <<-"end_eval", __FILE__, __LINE__
def self.#{method}(*methods, &block)
View
4 test/acts_as_authentic_test/email_test.rb
@@ -74,6 +74,10 @@ def test_validates_format_of_email_field
u.valid?
assert u.errors[:email].size == 0
+ u.email = "damien+test1...etc..@mydomain.com"
+ u.valid?
+ assert u.errors[:email].size == 0
+
u.email = "dakota.dux+1@gmail.com"
u.valid?
assert u.errors[:email].size == 0

0 comments on commit 8fc0870

Please sign in to comment.
Something went wrong with that request. Please try again.