credible 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/credible/authentication/users_controller.rb +2 -2
- data/app/mailers/credible/{user_mailer.rb → confirmation_mailer.rb} +1 -10
- data/app/mailers/credible/invitation_mailer.rb +9 -0
- data/app/mailers/credible/reset_password_mailer.rb +9 -0
- data/app/mailers/credible_mailer.rb +3 -0
- data/app/views/credible/{user_mailer → confirmation_mailer}/confirmation_email.html.haml +0 -0
- data/app/views/credible/{user_mailer → confirmation_mailer}/confirmation_email.text.haml +0 -0
- data/app/views/credible/invitation_mailer/invitation_email.html.haml +7 -0
- data/app/views/credible/invitation_mailer/invitation_email.text.haml +6 -0
- data/app/views/credible/reset_password_mailer/reset_password_email.html.haml +7 -0
- data/app/views/credible/reset_password_mailer/reset_password_email.text.haml +6 -0
- data/lib/credible/version.rb +1 -1
- metadata +11 -6
- data/app/views/credible/user_mailer/invitation_email.html.haml +0 -3
- data/app/views/credible/user_mailer/invitation_email.text.haml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4c5ed3ddcad0d273dd3637387e2dbc0707cdb0d6f798220ff7dbe5837771e47
|
4
|
+
data.tar.gz: a130e2ef99889ed2811fdea510f939771e8472f31beb5aafb5908db517ce73a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aee55582756b905e423934dacc61fbe8871debd89b0605ac0acfdd0a71929326a4dbdd9afc3fd939cdd59a05c997fd6897f8b1be1ca529f5628b60762f06e7a5
|
7
|
+
data.tar.gz: dd2897f009bec2bb23dc41308ca0808f62138064d1f1b8ec866801ee303c93a3d2e66dc6607dc8ade859f0714be380a2a7ca23f3aa4dd4ab8372a7332736c940
|
@@ -21,7 +21,7 @@ class Credible::Authentication::UsersController < Credible::AuthenticationContro
|
|
21
21
|
authorize @user
|
22
22
|
|
23
23
|
if @user.save
|
24
|
-
Credible::
|
24
|
+
Credible::ConfirmationMailer.with(user: @user).confirmation_email.deliver_later
|
25
25
|
@session = ::Session.create(user: @user)
|
26
26
|
render :show, status: :created, location: @user
|
27
27
|
else
|
@@ -54,7 +54,7 @@ class Credible::Authentication::UsersController < Credible::AuthenticationContro
|
|
54
54
|
@user.reset_password
|
55
55
|
|
56
56
|
if @user.save
|
57
|
-
Credible::
|
57
|
+
Credible::ResetPasswordMailer.with(user: @user).reset_password_email.deliver_later
|
58
58
|
render :show, status: :ok, location: @user
|
59
59
|
else
|
60
60
|
render json: @user.errors, status: :unprocessable_entity
|
@@ -1,6 +1,4 @@
|
|
1
|
-
class Credible::
|
2
|
-
include Rails.application.routes.url_helpers
|
3
|
-
|
1
|
+
class Credible::ConfirmationMailer < CredibleMailer
|
4
2
|
def confirmation_email
|
5
3
|
@app_name = Rails.application.class.module_parent_name
|
6
4
|
@user = params[:user]
|
@@ -8,11 +6,4 @@ class Credible::UserMailer < ApplicationMailer
|
|
8
6
|
@confirmation_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
9
7
|
mail(to: @user.email, subject: "Welcome to #{@app_name} | Please confirm your account")
|
10
8
|
end
|
11
|
-
|
12
|
-
def invitation_email
|
13
|
-
@app_name = Rails.application.class.module_parent_name
|
14
|
-
@user = params[:user]
|
15
|
-
@url = root_url
|
16
|
-
mail(to: @user.email, subject: "You have been invited to #{@app_name}")
|
17
|
-
end
|
18
9
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class Credible::InvitationMailer < CredibleMailer
|
2
|
+
def invitation_email
|
3
|
+
@app_name = Rails.application.class.module_parent_name
|
4
|
+
@user = params[:user]
|
5
|
+
@url = root_url
|
6
|
+
@invitation_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
7
|
+
mail(to: @user.email, subject: "You have been invited to #{@app_name}")
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class Credible::ResetPasswordMailer < CredibleMailer
|
2
|
+
def reset_password_email
|
3
|
+
@app_name = Rails.application.class.module_parent_name
|
4
|
+
@user = params[:user]
|
5
|
+
@url = root_url
|
6
|
+
@reset_password_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
7
|
+
mail(to: @user.email, subject: "Please reset your #{@app_name} password")
|
8
|
+
end
|
9
|
+
end
|
File without changes
|
File without changes
|
data/lib/credible/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: credible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom Bruce
|
@@ -100,7 +100,10 @@ files:
|
|
100
100
|
- app/controllers/credible/authentication_controller.rb
|
101
101
|
- app/helpers/credible/application_helper.rb
|
102
102
|
- app/jobs/credible/application_job.rb
|
103
|
-
- app/mailers/credible/
|
103
|
+
- app/mailers/credible/confirmation_mailer.rb
|
104
|
+
- app/mailers/credible/invitation_mailer.rb
|
105
|
+
- app/mailers/credible/reset_password_mailer.rb
|
106
|
+
- app/mailers/credible_mailer.rb
|
104
107
|
- app/models/credible/application_record.rb
|
105
108
|
- app/policies/credible/application_policy.rb
|
106
109
|
- app/policies/credible/authentication/session_policy.rb
|
@@ -110,10 +113,12 @@ files:
|
|
110
113
|
- app/views/credible/authentication/sessions/show.json.jbuilder
|
111
114
|
- app/views/credible/authentication/users/_user.json.jbuilder
|
112
115
|
- app/views/credible/authentication/users/show.json.jbuilder
|
113
|
-
- app/views/credible/
|
114
|
-
- app/views/credible/
|
115
|
-
- app/views/credible/
|
116
|
-
- app/views/credible/
|
116
|
+
- app/views/credible/confirmation_mailer/confirmation_email.html.haml
|
117
|
+
- app/views/credible/confirmation_mailer/confirmation_email.text.haml
|
118
|
+
- app/views/credible/invitation_mailer/invitation_email.html.haml
|
119
|
+
- app/views/credible/invitation_mailer/invitation_email.text.haml
|
120
|
+
- app/views/credible/reset_password_mailer/reset_password_email.html.haml
|
121
|
+
- app/views/credible/reset_password_mailer/reset_password_email.text.haml
|
117
122
|
- config/initializers/warden.rb
|
118
123
|
- config/routes.rb
|
119
124
|
- lib/credible.rb
|