johnhenry 1.0.7 → 1.0.8

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
  SHA1:
3
- metadata.gz: 92f77c92449e3fde78b20a4fd4f76ceef79120fc
4
- data.tar.gz: 789c9bdb98150f1762652efec16f1ec1b2254c86
3
+ metadata.gz: 4ce2d8c76685686ef5b51ed0805b3bab68413851
4
+ data.tar.gz: 9f8d953e309bcc465b05a4ee59b9b3d33a7099dc
5
5
  SHA512:
6
- metadata.gz: 44bd98b2a747e5ba526f8a54f5d232a7d428aad40f3fa6b864a36ceaabe12a20e070c08ab882ed9e39865b190d52c107eee0402146b215daa4d70e659a3c4506
7
- data.tar.gz: 0359057958f604bab7dc8151b63755430ac1d61417b63c2ab3cf840564ba61cdda6442b1955f1ba5c6799b826013fb3227c2e614cd898600595b0a2ee8b8aaac
6
+ metadata.gz: 4d275809a4b8c08eb00d707c3f85e1c58fcdb274a9db0d967194aa00c5a8b8e4960912668e0e0006e8ce529445b4c91d9816285f6526c9e8e72e08e8bc04059e
7
+ data.tar.gz: c19d62ce51761137add8ef5d947a8ca1093d3f44511887d0386740c319db9b8507fd5f209d99c0ff65637aefac15d7a8a502771541745657118bf6514fde3832
@@ -0,0 +1,14 @@
1
+ class JohnHenryMailer < ActionMailer::Base
2
+ default from: 'No Reply <no-reply@example.com>'
3
+ default bcc: ENV['BCC_EMAILS'] if ENV['BCC_EMAILS'].present?
4
+
5
+ def signup(user)
6
+ @user = user
7
+ @name = @user.email.split('@').first.try(:titleize)
8
+ subject = "Thanks for trying the JohnHenry Rails toolkit"
9
+ subject += ", #{ @name }" unless @name.blank?
10
+ Rails.logger.info "Sending signup notification to #{ user.email }"
11
+ mail to: user.email,
12
+ subject: subject
13
+ end
14
+ end
@@ -1,4 +1,4 @@
1
- class UserMailer < ActionMailer::Base
1
+ class JohnHenryMailer < ActionMailer::Base
2
2
  default from: 'No Reply <no-reply@example.com>'
3
3
  default bcc: ENV['BCC_EMAILS'] if ENV['BCC_EMAILS'].present?
4
4
 
data/app/models/user.rb CHANGED
@@ -8,6 +8,6 @@ class User < ActiveRecord::Base
8
8
  private
9
9
 
10
10
  def send_signup_email
11
- UserMailer.signup(self).deliver
11
+ JohnHenryMailer.signup(self).deliver
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module JohnHenry
2
- VERSION = '1.0.7'
2
+ VERSION = '1.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johnhenry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Derewecki
@@ -184,6 +184,7 @@ files:
184
184
  - app/controllers/johnhenry/registrations_controller.rb
185
185
  - app/controllers/johnhenry/sessions_controller.rb
186
186
  - app/helpers/johnhenry/application_helper.rb
187
+ - app/mailers/john_henry_mailer.rb
187
188
  - app/mailers/user_mailer.rb
188
189
  - app/models/payment.rb
189
190
  - app/models/user.rb