authentasaurus 0.6.14 → 0.6.16pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,13 @@ module ActiveRecord::Authenticatable
39
39
  # Accessors
40
40
  attr_accessor :password_confirmation, :new_password_confirmation
41
41
 
42
+ # default data
43
+ class << self
44
+ attr_accessor :default_data
45
+ end
46
+
47
+ @default_data = {}
48
+
42
49
  # dont delete admin
43
50
  before_destroy :dont_delete_admin
44
51
 
@@ -25,10 +25,13 @@ module ActiveResource::ActsAsAuthenticatable
25
25
  last_update_datetime = (last_update.kind_of?(String)) ? (DateTime.parse(last_update)) : (last_update)
26
26
 
27
27
  if local_user.updated_at < last_update_datetime
28
- local_user.update_attributes user.attributes
28
+
29
+ local_user.update_attributes user.attributes
29
30
  end
30
31
  else
31
- local_user.attributes.merge(self.sync_to.try(:DEFAULT_DATA) || {})
32
+ local_user.password = password
33
+ local_user.hashed_password = user.hashed_password
34
+ local_user.password_seed = user.password_seed
32
35
  local_user.save
33
36
  end
34
37
  end
@@ -47,7 +50,6 @@ module ActiveResource::ActsAsAuthenticatable
47
50
  unless local_user.new_record?
48
51
  local_user.update_attributes user.attributes
49
52
  else
50
- local_user.attributes.merge(self.sync_to.try(:DEFAULT_DATA) || {})
51
53
  local_user.save
52
54
  end
53
55
  else
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentasaurus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 143217990
5
+ prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 14
10
- version: 0.6.14
9
+ - 16pre
10
+ version: 0.6.16pre
11
11
  platform: ruby
12
12
  authors:
13
13
  - Omar Mekky
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-08-23 00:00:00 +02:00
21
+ date: 2010-08-25 00:00:00 +02:00
22
22
  default_executable:
23
23
  dependencies: []
24
24