credible 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/mailers/credible/user_mailer.rb +7 -10
- data/app/views/credible/user_mailer/confirmation_email.html.haml +2 -2
- data/app/views/credible/user_mailer/confirmation_email.text.haml +2 -2
- data/app/views/credible/user_mailer/invitation_email.html.haml +1 -1
- data/app/views/credible/user_mailer/invitation_email.text.haml +1 -1
- data/lib/credible/version.rb +1 -1
- metadata +1 -2
- data/app/mailers/credible/application_mailer.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a7e831e22ec5681ca50fa757a380c8bfacca2110ea5198a8b1a1ad756bedef9
|
4
|
+
data.tar.gz: ec273ca2a4984cc04fcce5a9a335b034258d927c22e7f6c8afecf86ec56d53b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c13e39deeedff85915708af06b2dc90b1db47a7f6b47b8d214fc318f958403342e7270ec20bdf73c52679f65478fec51a63ec774b6cc6454300066daa9d9ed9
|
7
|
+
data.tar.gz: 486785ac185da55edd463932d4b537cb7037901cad30e0842e0c43e1643cd6726e871be790daa8bb6ec62f5cf81ab717dccaade94150300717f03517b2900cf8
|
data/README.md
CHANGED
@@ -70,6 +70,14 @@ class Session < ApplicationRecord
|
|
70
70
|
end
|
71
71
|
```
|
72
72
|
|
73
|
+
## Mailers
|
74
|
+
|
75
|
+
To user Credible's in-built mailers, you must set a hostname for your application. A suitable setting for this in `config/environments/development.rb` might be:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
79
|
+
```
|
80
|
+
|
73
81
|
## Contributing
|
74
82
|
|
75
83
|
Credible is not yet accepting contributions. Watch this space.
|
@@ -1,21 +1,18 @@
|
|
1
|
-
class Credible::UserMailer <
|
2
|
-
# TODO: Decouple from Settings in inheriting application.
|
3
|
-
# QUESTION: How then will we set the URL?
|
4
|
-
|
1
|
+
class Credible::UserMailer < ApplicationMailer
|
5
2
|
include Rails.application.routes.url_helpers
|
6
3
|
|
7
4
|
def confirmation_email
|
8
|
-
@
|
5
|
+
@app_name = Rails.application.class.module_parent_name
|
9
6
|
@user = params[:user]
|
10
|
-
@url = root_url
|
7
|
+
@url = root_url
|
11
8
|
@confirmation_url = @url + 'confirm/' + @user.confirmation_token
|
12
|
-
mail(
|
9
|
+
mail(to: @user.email, subject: "Welcome to #{@app_name} | Please confirm your account")
|
13
10
|
end
|
14
11
|
|
15
12
|
def invitation_email
|
16
|
-
@
|
13
|
+
@app_name = Rails.application.class.module_parent_name
|
17
14
|
@user = params[:user]
|
18
|
-
@url = root_url
|
19
|
-
mail(
|
15
|
+
@url = root_url
|
16
|
+
mail(to: @user.email, subject: "You have been invited to #{@app_name}")
|
20
17
|
end
|
21
18
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
%h1= "Welcome to #{@
|
1
|
+
%h1= "Welcome to #{@app_name}, #{@user.name}"
|
2
2
|
|
3
3
|
%p
|
4
|
-
= "You have successfully signed up to #{@
|
4
|
+
= "You have successfully signed up to #{@app_name}, your username is: #{@user.email}."
|
5
5
|
%br/
|
6
6
|
|
7
7
|
%p
|
@@ -1,7 +1,7 @@
|
|
1
|
-
= "Welcome to #{@
|
1
|
+
= "Welcome to #{@app_name}, #{@user.name}"
|
2
2
|
\===============================================
|
3
3
|
|
4
|
-
= "You have successfully signed up to #{@
|
4
|
+
= "You have successfully signed up to #{@app_name}, your username is: #{@user.email}."
|
5
5
|
|
6
6
|
To confirm your account, please follow this link:
|
7
7
|
= @confirmation_url
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom Bruce
|
@@ -100,7 +100,6 @@ 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/application_mailer.rb
|
104
103
|
- app/mailers/credible/user_mailer.rb
|
105
104
|
- app/models/credible/application_record.rb
|
106
105
|
- app/policies/credible/application_policy.rb
|