Skip to content

Commit

Permalink
fix deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed May 23, 2010
1 parent 85b2a6b commit 8fc0870
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Rakefile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/acts_as_authentic/password.rb
Expand Up @@ -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)
if klass.singleton_class.method_defined?(:set_callback)
METHODS.each do |method|
klass.class_eval <<-"end_eval", __FILE__, __LINE__
def self.#{method}(*methods, &block)
Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/controller_adapters/rails_adapter.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/session/callbacks.rb
Expand Up @@ -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)
METHODS.each do |method|
base.class_eval <<-"end_eval", __FILE__, __LINE__
def self.#{method}(*methods, &block)
Expand Down
4 changes: 4 additions & 0 deletions test/acts_as_authentic_test/email_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 8fc0870

Please sign in to comment.