sendgrid-ruby 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a77256d8db572200bdedd90a2b719d0f36d1a1aecbf17070968b555ed404028
4
- data.tar.gz: 10081de69452a519515b2fe5f086460935cac375e1d3ade7528412477aab38a9
3
+ metadata.gz: b941f6f9d42b1635efa45774843ac79466ae526b87ae1c4e11798f0f65f60d18
4
+ data.tar.gz: 50547fada575f32430c13b830faa1959867a8edc2285ede32c5e167f53990144
5
5
  SHA512:
6
- metadata.gz: fa4e2a6a2cd904d43f1c32a57ecbc1ea7db0729fed4cab05303566515975661fd12bb0e1d3f92480b3101276019db4a1858dc060ff35a1055ff587dc5582d071
7
- data.tar.gz: 10493d88b4836f3f90a8813dbe3bb6d40e141a3d0f1ed99adc35c34a308c7a149104b7bde9829c8bf5b5b1efb7e855ad1236fc43c5f6c444c656a1e6f740599c
6
+ metadata.gz: 35436f3cf7a212e98dc9825eeca8fd64bc589f201956a890f158d740234f9b7399590d4e3c0b2836d9f072e2fbc88119b01ef8bac6b86fd10024ed5b36518b0b
7
+ data.tar.gz: 1917abc8a67a84c905a0b1ff071c3352ea8e73fc6cd06095dcd4888cc0e55b902c2103db71fa13919d625674fbb83a9ad3ee05de7d635380358906e3cf1f382f
@@ -0,0 +1,10 @@
1
+ contact_links:
2
+ - name: Twilio SendGrid Support
3
+ url: https://support.sendgrid.com
4
+ about: Get Support
5
+ - name: Stack Overflow
6
+ url: https://stackoverflow.com/questions/tagged/sendgrid-ruby+or+sendgrid+ruby
7
+ about: Ask questions on Stack Overflow
8
+ - name: Documentation
9
+ url: https://sendgrid.com/docs/for-developers/
10
+ about: View Reference Documentation
data/.travis.yml CHANGED
@@ -1,25 +1,25 @@
1
1
  language: ruby
2
2
  env:
3
- - version=ruby:2.7
4
- - version=ruby:2.6
5
- - version=ruby:2.5
6
- - version=ruby:2.4
7
- - version=jruby:9.2
8
-
3
+ - version=ruby:2.7
4
+ - version=ruby:2.6
5
+ - version=ruby:2.5
6
+ - version=ruby:2.4
7
+ - version=jruby:9.2
9
8
  gemfile:
10
- - gemfiles/Sinatra_1.gemfile
11
- - gemfiles/Sinatra_2.gemfile
12
-
13
- script: make test-docker
14
-
9
+ - gemfiles/Sinatra_1.gemfile
10
+ - gemfiles/Sinatra_2.gemfile
11
+ script:
12
+ - if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
13
+ echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin;
14
+ fi
15
+ - make test-docker
15
16
  deploy:
16
17
  provider: rubygems
17
- api_key: $RUBYGEMS_API_KEY
18
+ api_key: "$RUBYGEMS_API_KEY"
18
19
  gem: sendgrid-ruby
19
20
  on:
20
21
  tags: true
21
22
  condition: $version = ruby:2.4 && $BUNDLE_GEMFILE = *"gemfiles/Sinatra_1.gemfile"
22
-
23
23
  notifications:
24
24
  slack:
25
25
  if: branch = main
@@ -27,4 +27,4 @@ notifications:
27
27
  on_success: never
28
28
  on_failure: change
29
29
  rooms:
30
- - secure: QwoVrGveeA1bo/26fO2A+OQHmUX69NLaC214qd18C1Z8ztYMHkd05/9+k9HFb+PSdPkGLSeYOPWAKJUqJWB7HfGINNGpRGIPFcmfB7vhvvLFnhud/SAdQPRZ+SCeZPdpZcjpVRLYENKv259ucGPBCPFXh1HfJF92R0IrKeW5CII=
30
+ secure: oSeohwM+ernyiRYSRLpNlICk0wgj0lku3y5LuouJLRHs45tCAzLZLbgxsor18wCSJkmhfn2vg4Rn969VnskFuj70OhJSLBKL4UXBnR1Ji0ClpfJlGojcbY/5Z8N/eGDrvf5ofA0Jc+L/ut+oSCMXnstEGbx4wBpPTajHuRtvb34=
data/CHANGELOG.md CHANGED
@@ -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
+ [2021-08-11] Version 6.5.0
5
+ --------------------------
6
+ **Library - Feature**
7
+ - [PR #466](https://github.com/sendgrid/sendgrid-ruby/pull/466): Add From address to personalization. Thanks to [@grin](https://github.com/grin)!
8
+
9
+
4
10
  [2021-02-10] Version 6.4.0
5
11
  --------------------------
6
12
  **Library - Feature**
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Travis Badge](https://travis-ci.com/sendgrid/sendgrid-ruby.svg?branch=main)](https://travis-ci.com/sendgrid/sendgrid-ruby)
4
4
  [![Gem Version](https://badge.fury.io/rb/sendgrid-ruby.svg)](https://badge.fury.io/rb/sendgrid-ruby)
5
- [![Email Notifications Badge](https://dx.sendgrid.com/badge/ruby)](https://dx.sendgrid.com/newsletter/ruby)
6
5
  [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
6
  [![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
8
7
  [![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-ruby.svg)](https://github.com/sendgrid/sendgrid-ruby/graphs/contributors)
@@ -18,6 +18,7 @@ def hello_world
18
18
  puts response.headers
19
19
  end
20
20
 
21
+ # rubocop:disable Metrics/AbcSize
21
22
  def kitchen_sink
22
23
  mail = SendGrid::Mail.new
23
24
  mail.from = Email.new(email: 'test@example.com')
@@ -29,6 +30,9 @@ def kitchen_sink
29
30
  personalization.add_cc(Email.new(email: 'test4@example.com', name: 'Example User'))
30
31
  personalization.add_bcc(Email.new(email: 'test5@example.com', name: 'Example User'))
31
32
  personalization.add_bcc(Email.new(email: 'test6@example.com', name: 'Example User'))
33
+ # Note, the domain of the from email property specified in any personalization must
34
+ # match the domain of the from email property specified at root level
35
+ personalization.from = Email.new(email: 'alias@example.com', name: "My alias")
32
36
  personalization.subject = 'Hello World from the Personalized Twilio SendGrid Ruby Library'
33
37
  personalization.add_header(Header.new(key: 'X-Test', value: 'True'))
34
38
  personalization.add_header(Header.new(key: 'X-Mock', value: 'False'))
@@ -124,6 +128,7 @@ def kitchen_sink
124
128
  puts response.body
125
129
  puts response.headers
126
130
  end
131
+ # rubocop:enable Metrics/AbcSize
127
132
 
128
133
  def dynamic_template_data_hello_world
129
134
  mail = Mail.new
@@ -5,10 +5,11 @@ module SendGrid
5
5
  attr_reader :tos, :ccs, :bccs, :headers, :substitutions, :custom_args,
6
6
  :dynamic_template_data
7
7
 
8
- attr_accessor :send_at, :subject
8
+ attr_accessor :send_at, :subject, :from
9
9
 
10
10
  def initialize
11
11
  @tos = []
12
+ @from = nil
12
13
  @ccs = []
13
14
  @bccs = []
14
15
  @subject = nil
@@ -59,6 +60,7 @@ module SendGrid
59
60
  def to_json(*)
60
61
  {
61
62
  'to' => tos,
63
+ 'from' => from,
62
64
  'cc' => ccs,
63
65
  'bcc' => bccs,
64
66
  'subject' => subject,
@@ -1,3 +1,3 @@
1
1
  module SendGrid
2
- VERSION = '6.4.0'.freeze
2
+ VERSION = '6.5.0'.freeze
3
3
  end
@@ -33,7 +33,7 @@ class TestAPI < MiniTest::Test
33
33
  assert_equal(test_headers, sg.request_headers)
34
34
  assert_equal('v3', sg.version)
35
35
  assert_equal(subuser, sg.impersonate_subuser)
36
- assert_equal('6.4.0', SendGrid::VERSION)
36
+ assert_equal('6.5.0', SendGrid::VERSION)
37
37
  assert_instance_of(SendGrid::Client, sg.client)
38
38
  assert_equal({}, sg.http_options)
39
39
  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: 6.4.0
4
+ version: 6.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elmer Thomas
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-10 00:00:00.000000000 Z
13
+ date: 2021-08-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ruby_http_client
@@ -167,6 +167,7 @@ extra_rdoc_files: []
167
167
  files:
168
168
  - ".codeclimate.yml"
169
169
  - ".env_sample"
170
+ - ".github/ISSUE_TEMPLATE/config.yml"
170
171
  - ".gitignore"
171
172
  - ".rubocop.yml"
172
173
  - ".rubocop_todo.yml"