Skip to content

Commit

Permalink
Ripped out merb-actionorm
Browse files Browse the repository at this point in the history
Reverts: ffff732093da6d300b4652616a8fa150ec758331
Reverts: 784ac7d71780d1a7cfb9152ba4cb0e18a990ab7a
Reverts: 41fed477beb9d987b6dcae8ea83228bde8018e62
Reverts: 7a029f022fecf98fddc50090f3a5ee4804522877
Reverts: 7dc1cc7a93f687fc4dd3f1e6b7feefcc31fe7594

The goal is to only use active_model compliant API
internally. This will render the separate gem useless.
  • Loading branch information
snusnu committed Sep 25, 2009
1 parent 45818ac commit 5d1a78d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion merb-auth-more/Rakefile
Expand Up @@ -23,7 +23,6 @@ spec = Gem::Specification.new do |s|
s.email = EMAIL
s.homepage = HOMEPAGE
s.add_dependency("merb-auth-core", ">= #{Merb::VERSION}")
s.add_dependency("merb-actionorm", ">= #{Merb::VERSION}")
s.require_path = 'lib'
s.files = %w(LICENSE README.textile Rakefile TODO) + Dir.glob("{lib,spec}/**/*")

Expand Down
4 changes: 1 addition & 3 deletions merb-auth-more/lib/merb-auth-more/mixins/salted_user.rb
@@ -1,8 +1,6 @@
require "digest/sha1"
require 'merb-actionorm'
require File.expand_path(File.dirname(__FILE__) / "..") / "strategies" / "abstract_password"


class Merb::Authentication
module Mixins
# This mixin provides basic salted user password encryption.
Expand Down Expand Up @@ -68,7 +66,7 @@ def password_required?

def encrypt_password
return if password.blank?
self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{Merb::Authentication::Strategies::Basic::Base.login_param}--") if ActionORM.for(self).new_record?
self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{Merb::Authentication::Strategies::Basic::Base.login_param}--") if new_record?
self.crypted_password = encrypt(password)
end

Expand Down

0 comments on commit 5d1a78d

Please sign in to comment.