muck-users 3.1.4 → 3.1.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.4
1
+ 3.1.5
@@ -148,14 +148,26 @@ module MuckUsers
148
148
  return false if user.nil?
149
149
  self.id == user.id || user.admin?
150
150
  end
151
-
152
- def to_xml(options = {})
151
+
152
+ def add_exclude_fields(options = {})
153
+ options ||= {}
153
154
  options[:except] ||= []
154
- options[:except] << :email << :crypted_password << :salt << :remember_token << :remember_token_expires_at << :activation_code
155
+ options[:except] << :crypted_password << :salt << :remember_token << :remember_token_expires_at << :activation_code
155
156
  options[:except] << :activated_at << :password_reset_code << :enabled << :terms_of_service << :can_send_messages << :identity_url
156
- options[:except] << :tmp_password << :protected_profile << :public_profile
157
+ options[:except] << :tmp_password << :protected_profile << :public_profile << :disabled_at << :current_login_ip << :access_code_id
158
+ options[:except] << :failed_login_count << :last_login_ip
157
159
  options[:except] << :password_salt << :perishable_token << :persistence_token << :single_access_token
158
- super
160
+ options
161
+ end
162
+
163
+ def to_xml(options = {})
164
+ options = add_exclude_fields(options)
165
+ super(options)
166
+ end
167
+
168
+ def as_json(options = {})
169
+ options = add_exclude_fields(options)
170
+ super(options)
159
171
  end
160
172
 
161
173
  # Authlogic automatically executes the following methods
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-users}
8
- s.version = "3.1.4"
8
+ s.version = "3.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-12-23}
12
+ s.date = %q{2011-01-29}
13
13
  s.description = %q{Easily add user signup, login and other features to your application}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 4
10
- version: 3.1.4
9
+ - 5
10
+ version: 3.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-12-23 00:00:00 -07:00
19
+ date: 2011-01-29 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency