credible 0.8.0 → 0.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61357e14d2d15acb05c8382cddc3d46da9cad63d3f64a1a30ea51855cd99111d
4
- data.tar.gz: d785759b5a2a64fbdb99e747afef80af236417aa86885b63186980edd2045219
3
+ metadata.gz: 03a8b5244fc23f52c956c6588fba347bbf3f7846415c684cf8c28951d1459d81
4
+ data.tar.gz: 8db72b4303a461a57364359a0687582b8ed8c6b05b34f6adb9486b9624e3bfcc
5
5
  SHA512:
6
- metadata.gz: caf407bff7ada8ade260aa0617cebc191bf5cd132d5962aeaba2e51770d5135ad36b5a04727852eb85c00689bea3523ba132e761f18d97b3804d349b5e717838
7
- data.tar.gz: b3e114d34cddacee014020349326a2a42ac2ef22cf374b585f6de199180e1fdac455cf7684e7202b3d94f5f2b18aff92e59b0b9788763eb4e59682b0cc4b4c4b
6
+ metadata.gz: 49d993317e3f3b93aec22d76c11e70669be871d898aa7da6da0e7d599013e23cd7db54b3362b817f9f3971ad5f4351edcfaf9ce35a02bad7f4eeda8bd636223e
7
+ data.tar.gz: '09002b2259c179980ac39619f81ea1e15b2c8d67ee961b0b9dff3bd5299ed779c97f943efad01458fc205cb7d43b23e4d3b3b27811b29ab17aa4fc4eeac83a2b'
@@ -1,9 +1,9 @@
1
- class Credible::ConfirmationMailer < CredibleMailer
1
+ class Credible::ConfirmationMailer < Credible::MailerBase
2
2
  def confirmation_email
3
3
  @app_name = Rails.application.class.module_parent_name
4
4
  @user = params[:user]
5
- @url = root_url
6
- @confirmation_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
5
+ # TODO: Provide a means to have URL set by user
6
+ @confirmation_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
7
7
  mail(to: @user.email, subject: "Welcome to #{@app_name} | Please confirm your account")
8
8
  end
9
9
  end
@@ -1,9 +1,9 @@
1
- class Credible::InvitationMailer < CredibleMailer
1
+ class Credible::InvitationMailer < Credible::MailerBase
2
2
  def invitation_email
3
3
  @app_name = Rails.application.class.module_parent_name
4
4
  @user = params[:user]
5
- @url = root_url
6
- @invitation_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
5
+ # TODO: Provide a means to have URL set by user
6
+ @invitation_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
7
7
  mail(to: @user.email, subject: "You have been invited to #{@app_name}")
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
- class CredibleMailer < ApplicationMailer
1
+ class Credible::MailerBase < ApplicationMailer
2
2
  include Rails.application.routes.url_helpers
3
3
  end
@@ -1,9 +1,9 @@
1
- class Credible::ResetPasswordMailer < CredibleMailer
1
+ class Credible::ResetPasswordMailer < Credible::MailerBase
2
2
  def reset_password_email
3
3
  @app_name = Rails.application.class.module_parent_name
4
4
  @user = params[:user]
5
- @url = root_url
6
- @reset_password_url = @url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
5
+ # TODO: Provide a means to have URL set by user
6
+ @reset_password_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
7
7
  mail(to: @user.email, subject: "Please reset your #{@app_name} password")
8
8
  end
9
9
  end
@@ -0,0 +1,11 @@
1
+ <h1>
2
+ <%= "Welcome to #{@app_name}, #{@user.email}" %>
3
+ </h1>
4
+ <p>
5
+ <%= "You have successfully signed up to #{@app_name}, your username is: #{@user.email}." %>
6
+ <br/>
7
+ </p>
8
+ <p>
9
+ To confirm your account, please follow this link: <%= link_to @confirmation_url, @confirmation_url %>
10
+ </p>
11
+ <p>Thanks for joining and have a great day!</p>
@@ -0,0 +1,5 @@
1
+ <%= "Welcome to #{@app_name}, #{@user.email}" %>
2
+ \===============================================
3
+ <%= "You have successfully signed up to #{@app_name}, your username is: #{@user.email}." %>
4
+ To confirm your account, please follow this link: <%= @confirmation_url %>
5
+ Thanks for joining and have a great day!
@@ -0,0 +1,8 @@
1
+ <h1>
2
+ <%= "You have been invited to #{@app_name}" %>
3
+ </h1>
4
+ <p>
5
+ To confirm your account, please follow this link:
6
+ <%= link_to @invitation_url, @invitation_url %>
7
+ </p>
8
+ <p>We look forward to having you!</p>
@@ -0,0 +1,4 @@
1
+ <%= "You have been invited to #{@app_name}" %>
2
+ To confirm your account, please follow this link:
3
+ <%= link_to @invitation_url, @invitation_url %>
4
+ We look forward to having you!
@@ -0,0 +1,6 @@
1
+ <h1>You have requested a password reset</h1>
2
+ <p>
3
+ To sign in and reset your password, please follow this link:
4
+ <%= link_to @reset_password_url, @reset_password_url %>
5
+ </p>
6
+ <p>It's good to have you back!</p>
@@ -1,6 +1,4 @@
1
1
  You have requested a password reset
2
-
3
2
  To sign in and reset your password, please follow this link:
4
- = link_to @reset_password_url, @reset_password_url
5
-
3
+ <%= link_to @reset_password_url, @reset_password_url %>
6
4
  It's good to have you back!
data/config/routes.rb CHANGED
@@ -7,7 +7,7 @@ Credible::Engine.routes.draw do
7
7
  # /auth/signup.json
8
8
  post 'signup', to: 'users#create'
9
9
  # /auth/confirm.json
10
- get 'confirm/:confirmation_token', to: 'users#confirm'
10
+ get 'confirm/:confirmation_token', to: 'users#confirm', as: :confirmation
11
11
  # /auth/signout.json
12
12
  delete 'signout', to: 'sessions#destroy'
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Credible
2
- VERSION = '0.8.0'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,6 +30,20 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 6.0.2.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: bcrypt
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 3.1.7
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 3.1.7
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: warden
35
49
  requirement: !ruby/object:Gem::Requirement
@@ -116,19 +130,19 @@ files:
116
130
  - app/jobs/credible/application_job.rb
117
131
  - app/mailers/credible/confirmation_mailer.rb
118
132
  - app/mailers/credible/invitation_mailer.rb
133
+ - app/mailers/credible/mailer_base.rb
119
134
  - app/mailers/credible/reset_password_mailer.rb
120
- - app/mailers/credible_mailer.rb
121
135
  - app/models/credible/application_record.rb
122
136
  - app/views/credible/authentication/sessions/_session.json.jbuilder
123
137
  - app/views/credible/authentication/sessions/show.json.jbuilder
124
138
  - app/views/credible/authentication/users/_user.json.jbuilder
125
139
  - app/views/credible/authentication/users/show.json.jbuilder
126
- - app/views/credible/confirmation_mailer/confirmation_email.html.haml
127
- - app/views/credible/confirmation_mailer/confirmation_email.text.haml
128
- - app/views/credible/invitation_mailer/invitation_email.html.haml
129
- - app/views/credible/invitation_mailer/invitation_email.text.haml
130
- - app/views/credible/reset_password_mailer/reset_password_email.html.haml
131
- - app/views/credible/reset_password_mailer/reset_password_email.text.haml
140
+ - app/views/credible/confirmation_mailer/confirmation_email.html.erb
141
+ - app/views/credible/confirmation_mailer/confirmation_email.text.erb
142
+ - app/views/credible/invitation_mailer/invitation_email.html.erb
143
+ - app/views/credible/invitation_mailer/invitation_email.text.erb
144
+ - app/views/credible/reset_password_mailer/reset_password_email.html.erb
145
+ - app/views/credible/reset_password_mailer/reset_password_email.text.erb
132
146
  - config/initializers/warden.rb
133
147
  - config/routes.rb
134
148
  - lib/credible.rb
@@ -1,11 +0,0 @@
1
- %h1= "Welcome to #{@app_name}, #{@user.email}"
2
-
3
- %p
4
- = "You have successfully signed up to #{@app_name}, your username is: #{@user.email}."
5
- %br/
6
-
7
- %p
8
- To confirm your account, please follow this link:
9
- = link_to @confirmation_url, @confirmation_url
10
-
11
- %p Thanks for joining and have a great day!
@@ -1,9 +0,0 @@
1
- = "Welcome to #{@app_name}, #{@user.email}"
2
- \===============================================
3
-
4
- = "You have successfully signed up to #{@app_name}, your username is: #{@user.email}."
5
-
6
- To confirm your account, please follow this link:
7
- = @confirmation_url
8
-
9
- Thanks for joining and have a great day!
@@ -1,7 +0,0 @@
1
- %h1= "You have been invited to #{@app_name}"
2
-
3
- %p
4
- To confirm your account, please follow this link:
5
- = link_to @invitation_url, @invitation_url
6
-
7
- %p We look forward to having you!
@@ -1,6 +0,0 @@
1
- = "You have been invited to #{@app_name}"
2
-
3
- To confirm your account, please follow this link:
4
- = link_to @invitation_url, @invitation_url
5
-
6
- We look forward to having you!
@@ -1,7 +0,0 @@
1
- %h1 You have requested a password reset
2
-
3
- %p
4
- To sign in and reset your password, please follow this link:
5
- = link_to @reset_password_url, @reset_password_url
6
-
7
- %p It's good to have you back!