sendgrid-ruby 1.1.5 → 1.1.6

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: 3c556cc58a72b04d8db231eb81396415aa3d5007
4
- data.tar.gz: b86fde7d2356ecf19acc374aac5f429f0b425ea2
3
+ metadata.gz: a0997af40965b55afccbb2fd70def32ed7c8213a
4
+ data.tar.gz: 2453f6b8577c67c463a30260b5e33e05e5d4d4a9
5
5
  SHA512:
6
- metadata.gz: b3138df821abe297098687b31936d15d50d49e712abae0fe2a34701e3a450f6526dacccc95166c8538bc3350a08f4f9a7894e809da2f4ab2da771576d98a3f84
7
- data.tar.gz: 2127a04422ddd3a3c4061977c7b9f0ff394c150e4154c862a81d7d649cbd96e706d9fc6e741434d46760e6ff4ec518a04d0c87d44b2d1fb522696db1577ce2e9
6
+ metadata.gz: 645b595f82306ba093af8d4b6e8465d2e243ca149070a411d5d90295845b8eda5433b6b89c8ffb62db520b949df26a7011d357b978ffa8bce7e1b038b2f0b337
7
+ data.tar.gz: 6c982e7e5c6c6c5366cc5332019383114d189b6b4d39092b3c33139e56bed3d85da1596a6a4a9b1fcf3818c7d7f774ea43d7412c0b0cf10f3311d7056b26b652
@@ -1,6 +1,12 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.1.6] - 2015-11-26 ##
5
+ ## Added
6
+ Support for cc_name and bcc_name via [#31](https://github.com/sendgrid/sendgrid-ruby/pull/31)
7
+
8
+ Thanks [Dylan](https://github.com/DylanGriffith)!
9
+
4
10
  ## [1.1.5] - 2015-10-28 ##
5
11
  ## Added
6
12
  Support for [Templates](https://github.com/sendgrid/sendgrid-ruby#working-with-templates) via [#28](https://github.com/sendgrid/sendgrid-ruby/pull/28)
File without changes
data/README.md CHANGED
@@ -102,7 +102,9 @@ params = {
102
102
  :text,
103
103
  :html,
104
104
  :cc,
105
+ :cc_name,
105
106
  :bcc,
107
+ :bcc_name,
106
108
  :reply_to,
107
109
  :date,
108
110
  :smtpapi,
data/example.rb CHANGED
@@ -2,6 +2,7 @@
2
2
  # using ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
3
3
  # attachment is sent but only a corrupted 1k file
4
4
 
5
+
5
6
  require_relative "lib/sendgrid-ruby.rb"
6
7
 
7
8
  require 'dotenv'
@@ -19,8 +20,14 @@ client = SendGrid::Client.new do |c|
19
20
  end
20
21
 
21
22
  mail = SendGrid::Mail.new do |m|
22
- m.to = 'elmer.thomas@sendgrid.com'
23
- m.from = 'elmer@thinkingserious.com'
23
+ m.to = 'to@example.com'
24
+ m.to_name = 'John Doe'
25
+ m.from = 'from@example.com'
26
+ m.from_name = 'Jane Doe'
27
+ m.cc = 'cc@example.com'
28
+ m.cc_name = 'John Doe CC'
29
+ m.bcc = 'bcc@examlpe.com'
30
+ m.bcc_name = 'Jane Doe BCC'
24
31
  m.subject = 'Hello world!'
25
32
  m.text = 'I heard you like the beach.'
26
33
  m.html = 'I heard you like the beach <div><img src="cid:beach"></div>'
@@ -4,8 +4,8 @@ require 'mimemagic'
4
4
 
5
5
  module SendGrid
6
6
  class Mail
7
- attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc,
8
- :bcc, :reply_to, :date, :smtpapi, :attachments, :content, :template
7
+ attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc, :cc_name,
8
+ :bcc, :bcc_name, :reply_to, :date, :smtpapi, :attachments, :content, :template
9
9
 
10
10
  def initialize(params = {})
11
11
  params.each do |k, v|
@@ -79,7 +79,7 @@ module SendGrid
79
79
  else
80
80
  bcc << email
81
81
  end
82
- add_bcc_name(name)
82
+ add_bcc_name(name) if name
83
83
  end
84
84
 
85
85
  def add_bcc_name(name)
@@ -139,7 +139,9 @@ module SendGrid
139
139
  :date => date,
140
140
  :replyto => reply_to,
141
141
  :cc => cc,
142
+ :ccname => cc_name,
142
143
  :bcc => bcc,
144
+ :bccname => bcc_name,
143
145
  :text => text,
144
146
  :html => html,
145
147
  :'x-smtpapi' => smtpapi_json,
@@ -1,3 +1,3 @@
1
1
  module SendGrid
2
- VERSION = '1.1.5'
2
+ VERSION = '1.1.6'
3
3
  end
@@ -2,6 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe 'SendGrid' do
4
4
  it 'should have a version' do
5
- expect(SendGrid::VERSION).to eq('1.1.5')
5
+ expect(SendGrid::VERSION).to eq('1.1.6')
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Johnson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-28 00:00:00.000000000 Z
12
+ date: 2015-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: smtpapi
@@ -205,6 +205,7 @@ files:
205
205
  - ".rubocop.yml"
206
206
  - ".travis.yml"
207
207
  - CHANGELOG.md
208
+ - FETCH_HEAD
208
209
  - Gemfile
209
210
  - Guardfile
210
211
  - LICENSE.txt