credible 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cdb61342de4732b34e1178a1ec8e32c384e0bc14db18e6a42598c482b52bdaf
|
4
|
+
data.tar.gz: 432ee4aadde7f3f45a23e9feb41189fb102ac66a7ba039bf3ed1afcdd2664af5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95a87ebb7fbe400f33b1df9cfb9fc3bbc55d461f8880a87e342243573fbef2670d19aee7b42ea07e216d1ab7d78f72fa6e19fb6a5ad7228ab3ae887249a9912
|
7
|
+
data.tar.gz: 0072adea10f8c7e1c547ac4bcb1be39edfa0e02847f03d0fa8d08495db71111490987547e50916063f500abe804d31b9191e41647f5fc48448958a634946ecba
|
data/README.md
CHANGED
@@ -81,6 +81,12 @@ To user Credible's in-built mailers, you must set a hostname for your applicatio
|
|
81
81
|
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
82
82
|
```
|
83
83
|
|
84
|
+
Your app will also be expected to accept and properly route requests for `[root URL]/confirm/[confirmation token]?email=[email]`. The `confirmation_token` and `email` params should be sent with an AJAX request to the Credible auth route.
|
85
|
+
|
86
|
+
For example, if you have Credible mounted as `mount Credible::Engine => "/auth"`, you would make a get request to `/auth/confirm/[confirmation token]?email=[email]`.
|
87
|
+
|
88
|
+
_This is a little complicated and not very user friendly. A future version will provide an engine_name to assist with Rails' URL helpers, as well as an in-built UI for handling these requests on your behalf._
|
89
|
+
|
84
90
|
## Contributing
|
85
91
|
|
86
92
|
Credible is not yet accepting contributions. Watch this space.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Credible::ConfirmationMailer < Credible::MailerBase
|
2
2
|
def confirmation_email
|
3
|
-
@app_name = Rails.application.class.module_parent_name
|
3
|
+
@app_name = params[:app_name] || Rails.application.class.module_parent_name
|
4
4
|
@user = params[:user]
|
5
5
|
# TODO: Provide a means to have URL set by user
|
6
6
|
@confirmation_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Credible::InvitationMailer < Credible::MailerBase
|
2
2
|
def invitation_email
|
3
|
-
@app_name = Rails.application.class.module_parent_name
|
3
|
+
@app_name = params[:app_name] || Rails.application.class.module_parent_name
|
4
4
|
@user = params[:user]
|
5
5
|
# TODO: Provide a means to have URL set by user
|
6
6
|
@invitation_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Credible::ResetPasswordMailer < Credible::MailerBase
|
2
2
|
def reset_password_email
|
3
|
-
@app_name = Rails.application.class.module_parent_name
|
3
|
+
@app_name = params[:app_name] || Rails.application.class.module_parent_name
|
4
4
|
@user = params[:user]
|
5
5
|
# TODO: Provide a means to have URL set by user
|
6
6
|
@reset_password_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
|
data/lib/credible/version.rb
CHANGED