muck-users 3.1.27 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -92,6 +92,7 @@ Create an initializer and add the following adjusting the settings to meet your
92
92
  config.require_access_code = false # Only let a user sign up if they have an access code
93
93
  config.let_users_delete_their_account = false # Turn on/off ability for users to delete their own account. It is not recommended that you let
94
94
  # users delete their own accounts since the delete can cascade through the system with unknown results.
95
+ config.send_access_code_request_confirm # Determines whether or not to send a confirmation email after a user requests an access code.
95
96
  end
96
97
 
97
98
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.27
1
+ 3.2.0
@@ -0,0 +1,3 @@
1
+ <p>Thank you for your interest in <%= MuckEngine.configuration.application_name %>.
2
+ We are currently limiting access to the application, but we'll provide you with and access code as quickly as possible.
3
+ </p>
@@ -0,0 +1,2 @@
1
+ Thank you for your interest in <%= MuckEngine.configuration.application_name %>.
2
+ We are currently limiting access to the application, but we'll provide you with and access code as quickly as possible.
@@ -122,6 +122,7 @@ en:
122
122
  update: Update
123
123
  already_activated: Your account has already been activated. You can log in below.
124
124
  welcome_email_subject: Welcome to %{application_name}
125
+ access_code_request_confirm_subject: Thank you for your beta code request for %{application_name}
125
126
  deleting_user: deleting user...
126
127
  add_user_to_role: Add User to Role
127
128
  logout_required: ""
@@ -27,6 +27,8 @@ module MuckUsers
27
27
  attr_accessor :require_access_code # Require that the user have an access code to be able to sign up.
28
28
  attr_accessor :validate_terms_of_service # Require that the accept terms of service before signing up.
29
29
 
30
+ attr_accessor :send_access_code_request_confirm # Determines whether or not to send a confirmation email after a user requests an access code.
31
+
30
32
  def initialize
31
33
  self.automatically_activate = true
32
34
  self.automatically_login_after_account_create = true
@@ -35,6 +37,7 @@ module MuckUsers
35
37
  self.let_users_delete_their_account = false
36
38
  self.require_access_code = false
37
39
  self.validate_terms_of_service = false
40
+ self.send_access_code_request_confirm = false
38
41
  end
39
42
 
40
43
  end
@@ -63,6 +63,13 @@ module MuckUsers
63
63
  end
64
64
  end
65
65
 
66
+ def access_code_request_confirm(email)
67
+ mail(:to => email, :subject => I18n.t('muck.users.access_code_request_confirm_subject', :application_name => MuckEngine.configuration.application_name)) do |format|
68
+ format.html
69
+ format.text
70
+ end
71
+ end
72
+
66
73
  end
67
74
  end
68
75
  end
@@ -11,6 +11,8 @@ module MuckUsers
11
11
  scope :fullfilled, where('access_code_requests.code_sent_at IS NOT NULL')
12
12
  scope :by_newest, order("created_at DESC")
13
13
  scope :by_oldest, order("created_at ASC")
14
+
15
+ after_create :send_access_code_request_confirm
14
16
  end
15
17
 
16
18
  module ClassMethods
@@ -31,6 +33,12 @@ module MuckUsers
31
33
 
32
34
  end
33
35
 
36
+ def send_access_code_request_confirm
37
+ if MuckUsers.configuration.send_access_code_request_confirm
38
+ UserMailer.access_code_request_confirm(self.email).deliver
39
+ end
40
+ end
41
+
34
42
  def send_access_code(subject, message, expires_at)
35
43
  access_code = AccessCode.create!(:unlimited => false,
36
44
  :use_limit => 1,
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.27"
8
+ s.version = "3.2.0"
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{2011-03-19}
12
+ s.date = %q{2011-04-19}
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 = [
@@ -127,6 +127,8 @@ Gem::Specification.new do |s|
127
127
  "app/views/user_mailer/access_code.zh-CN.html.erb",
128
128
  "app/views/user_mailer/access_code.zh-TW.html.erb",
129
129
  "app/views/user_mailer/access_code.zh.html.erb",
130
+ "app/views/user_mailer/access_code_request_confirm.html.erb",
131
+ "app/views/user_mailer/access_code_request_confirm.text.erb",
130
132
  "app/views/user_mailer/activation_confirmation.ar.html.erb",
131
133
  "app/views/user_mailer/activation_confirmation.bg.html.erb",
132
134
  "app/views/user_mailer/activation_confirmation.ca.html.erb",
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: 53
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 1
9
- - 27
10
- version: 3.1.27
8
+ - 2
9
+ - 0
10
+ version: 3.2.0
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: 2011-03-19 00:00:00 -06:00
19
+ date: 2011-04-19 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -195,6 +195,8 @@ files:
195
195
  - app/views/user_mailer/access_code.zh-CN.html.erb
196
196
  - app/views/user_mailer/access_code.zh-TW.html.erb
197
197
  - app/views/user_mailer/access_code.zh.html.erb
198
+ - app/views/user_mailer/access_code_request_confirm.html.erb
199
+ - app/views/user_mailer/access_code_request_confirm.text.erb
198
200
  - app/views/user_mailer/activation_confirmation.ar.html.erb
199
201
  - app/views/user_mailer/activation_confirmation.bg.html.erb
200
202
  - app/views/user_mailer/activation_confirmation.ca.html.erb