hackathon_manager 0.6.4 → 0.6.5

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: 9dbbc80071c3b2aba0d473a8c4f7398129e61bd9
4
- data.tar.gz: 4dc5a452e23ab5e275212ff82c10f95066bf4dc8
3
+ metadata.gz: a51352083b4efe91bc92f29569313d4cae2411f1
4
+ data.tar.gz: 67421b84d0631aa2df21a2bf15dc83f7ba60c43c
5
5
  SHA512:
6
- metadata.gz: ab45cb007e339a28dd2319cd1ccdbca80170bca5b4ab328082056d44b4eff820d679e461cb0efbbd66ccfe6f6ce8b4ddfbfca86e14aaea1173c21ddd3a5b0201
7
- data.tar.gz: 384bfcce1651f83d53ccbb4745f55e47a58d7291db1a9ae85cc5cb5743e77e049cd45b4aafc7eaa950e6f3c9a6a2d153baaf04dfaa90e4235931c8c9a6984432
6
+ metadata.gz: 7c63629d0dd82b8c317f929e320b73884fe947a3ca517a36f9d68b4e817b490225ad8cbe170056633b75b867bf03da186478c15b834ee6ee58c571d90fe9b925
7
+ data.tar.gz: 4725f0733645437c9eaf9496f95de77ecbcd87cec56f880620fae19d49a187e9fd99d6d5f297dbd30242849e5694b6b94f7c53a64c718d98e247b61dce17e13e
@@ -7,13 +7,13 @@ class Mailer < ApplicationMailer
7
7
  def application_confirmation_email(questionnaire_id)
8
8
  @questionnaire = Questionnaire.find_by_id(questionnaire_id)
9
9
  return unless @questionnaire.present? && @questionnaire.user.present?
10
- mail_questionnaire("Application Received")
10
+ mail_questionnaire("Application Received", transactional: true)
11
11
  end
12
12
 
13
13
  def rsvp_confirmation_email(questionnaire_id)
14
14
  @questionnaire = Questionnaire.find_by_id(questionnaire_id)
15
15
  return unless @questionnaire.present? && @questionnaire.user.present?
16
- mail_questionnaire("RSVP Confirmation")
16
+ mail_questionnaire("RSVP Confirmation", transactional: true)
17
17
  end
18
18
 
19
19
  def accepted_email(questionnaire_id)
@@ -75,10 +75,16 @@ class Mailer < ApplicationMailer
75
75
  "\"#{name}\" <#{email}>"
76
76
  end
77
77
 
78
- def mail_questionnaire(subject)
78
+ def mail_questionnaire(subject, sparkpost_data = {})
79
79
  mail(
80
80
  to: pretty_email(@questionnaire.full_name, @questionnaire.user.email),
81
- subject: subject
81
+ subject: subject,
82
+ sparkpost_data: sparkpost_data
82
83
  )
84
+ rescue SparkPostRails::DeliveryException => e
85
+ error_code_to_not_retry = [
86
+ "1902" # Generation rejection
87
+ ]
88
+ raise e unless e.blank? || error_code_to_not_retry.include?(e.service_code)
83
89
  end
84
90
  end
@@ -1,3 +1,3 @@
1
1
  module HackathonManager
2
- VERSION = '0.6.4'.freeze
2
+ VERSION = '0.6.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackathon_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Olivera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails