mail-notify 0.2.1 → 0.2.2

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: e91ec4d4b170c5fabeff04f13017e6c00f061db8fe4e7dd986c84b68ec2f91c9
4
- data.tar.gz: 005c84b9497b0c8d5015544166ebe71cc198e9af8a94c01e3cabcbb3d14f6479
3
+ metadata.gz: 2cccef3b1098b15cd45d499ca9e14fdde795c87816386bbf87cb29620fb76576
4
+ data.tar.gz: 05e1dacda06543a00819af0830348ab78abaa870d25278c5e67d996bea4a5d77
5
5
  SHA512:
6
- metadata.gz: 278189dc0d7490eda9f64f894a2a098fad226a48123414bf829e7d0ef45f4b00b77d082d9f74889163af402efd21192bef585d74fbae15d1e8484033a604c62b
7
- data.tar.gz: 7deb6fa252d4955216f604664de081a3a1b2729eefc11ff58f51d6821706427dc90520a896eb30de987f9d8299b460449562656bc1ad77c5462cc2235ca2f4ea
6
+ metadata.gz: fbb86ca94843dcd6b534a29d11d850e393ec37a72d90d58fe2b1dfead8471d4b922e6e9fede8cc59b58be6e1d3f3d3ffc0e8798c62f916edfe2a9b40f4ff7e30
7
+ data.tar.gz: 284a01c7f04728b4bf8dce7575b8ae00b0414cdaec1fe2bca589eb30186ab338f7efae7fb12c7f1cc3d893bc1ebd538350724cc77bb84ea7ad81ae70412b42b8
data/CHANGELOG.md CHANGED
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog]
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ - Add error handling for blank variables
10
+
9
11
  ## [0.2.1] - 2019-10-22
10
12
 
11
13
  - Add Rails 6 support for previews
@@ -6,6 +6,8 @@ module Mail
6
6
  attr_accessor :settings, :response
7
7
 
8
8
  def initialize(settings)
9
+ raise ArgumentError, 'You must specify an API key' if settings[:api_key].blank?
10
+
9
11
  @settings = settings
10
12
  end
11
13
 
@@ -4,10 +4,14 @@ module Mail
4
4
  module Notify
5
5
  class Mailer < ActionMailer::Base
6
6
  def view_mail(template_id, headers)
7
+ raise ArgumentError, 'You must specify a template ID' if template_id.blank?
8
+
7
9
  mail(headers.merge(template_id: template_id))
8
10
  end
9
11
 
10
12
  def template_mail(template_id, headers)
13
+ raise ArgumentError, 'You must specify a template ID' if template_id.blank?
14
+
11
15
  mail(headers.merge(body: '', subject: '', template_id: template_id))
12
16
  end
13
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mail
4
4
  module Notify
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Harrison
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-22 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler