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: 03a8b5244fc23f52c956c6588fba347bbf3f7846415c684cf8c28951d1459d81
4
- data.tar.gz: 8db72b4303a461a57364359a0687582b8ed8c6b05b34f6adb9486b9624e3bfcc
3
+ metadata.gz: 7cdb61342de4732b34e1178a1ec8e32c384e0bc14db18e6a42598c482b52bdaf
4
+ data.tar.gz: 432ee4aadde7f3f45a23e9feb41189fb102ac66a7ba039bf3ed1afcdd2664af5
5
5
  SHA512:
6
- metadata.gz: 49d993317e3f3b93aec22d76c11e70669be871d898aa7da6da0e7d599013e23cd7db54b3362b817f9f3971ad5f4351edcfaf9ce35a02bad7f4eeda8bd636223e
7
- data.tar.gz: '09002b2259c179980ac39619f81ea1e15b2c8d67ee961b0b9dff3bd5299ed779c97f943efad01458fc205cb7d43b23e4d3b3b27811b29ab17aa4fc4eeac83a2b'
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
@@ -1,3 +1,3 @@
1
1
  module Credible
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce