sendgrid-ruby 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +21 -0
- data/CHANGELOG.md +16 -0
- data/CONTRIBUTING.md +12 -4
- data/LICENSE.txt +1 -1
- data/README.md +9 -5
- data/USE_CASES.md +5 -1
- data/docker/Dockerfile +12 -0
- data/docker/README.md +30 -0
- data/examples/helpers/mail/example.rb +18 -0
- data/lib/sendgrid/helpers/inbound/README.md +1 -1
- data/lib/sendgrid/helpers/mail/custom_arg.rb +1 -1
- data/lib/sendgrid/helpers/mail/personalization.rb +8 -1
- data/lib/sendgrid/version.rb +1 -1
- data/sendgrid-ruby.gemspec +2 -1
- data/test/sendgrid/helpers/mail/test_mail.rb +15 -0
- data/test/sendgrid/helpers/mail/test_personalizations.rb +15 -0
- data/test/sendgrid/test_sendgrid-ruby.rb +74 -1
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 796596b834ff9725ad09dd290829bd710b88789f
|
4
|
+
data.tar.gz: 1d572c07d391a91a4e3f3c279b3fc9ef74128b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5285bba04ae710a028e424ce7b34676e09a4dbf5b2c20eed61205078d97011a3aadbea65f6562dd84883b6583203f28751834ecde2ad225bdcd7ba5bb8ef71dd
|
7
|
+
data.tar.gz: e5eb5ec7768129a04c65fcc4e5e3f2ab88013f4d6d79eec9252ed20f72fb3120d10527efda11127e80440f10b1e5a3e72c568afa7b094ceac4b1196424b53804
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
duplication:
|
4
|
+
enabled: true
|
5
|
+
config:
|
6
|
+
languages:
|
7
|
+
- ruby
|
8
|
+
fixme:
|
9
|
+
enabled: true
|
10
|
+
rubocop:
|
11
|
+
enabled: true
|
12
|
+
bundler-audit:
|
13
|
+
enabled: true
|
14
|
+
ratings:
|
15
|
+
paths:
|
16
|
+
- "**.rb"
|
17
|
+
exclude_paths:
|
18
|
+
- examples/
|
19
|
+
- spec/
|
20
|
+
- test/
|
21
|
+
- gemfiles/
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [5.3.0] - 2018-10-12 ##
|
5
|
+
### Added
|
6
|
+
- [PR #300](https://github.com/sendgrid/sendgrid-ruby/pull/300): Support for Dynamic Templates. Big thanks to [@nedcampion](https://github.com/nedcampion) for the PR!
|
7
|
+
- [PR #178](https://github.com/sendgrid/sendgrid-ruby/pull/178): Convert key/value arguments to CustomArgs to strings. Big thanks to [@sitaramshelke](https://github.com/sitaramshelke) for the PR!
|
8
|
+
- [PR #258](https://github.com/sendgrid/sendgrid-ruby/pull/258): Added unittest to check for specific repo files. Big thanks to [@mptap](https://github.com/mptap) for the PR!
|
9
|
+
- [PR #255](https://github.com/sendgrid/sendgrid-ruby/pull/255): Add a unittest to check the license.md file date range. Big thanks to [@prashuchaudhary](https://github.com/prashuchaudhary) for the PR!
|
10
|
+
- [PR #181](https://github.com/sendgrid/sendgrid-ruby/pull/181): Add Docker. Big thanks to [@shrivara](https://github.com/shrivara) for the PR!
|
11
|
+
- [PR #248](https://github.com/sendgrid/sendgrid-ruby/pull/248): Added .codeclimate.yml. Big thanks to [@proton](https://github.com/proton) for the PR!
|
12
|
+
- [PR #260](https://github.com/sendgrid/sendgrid-ruby/pull/260): Update ruby-http-client dependency to support v3.3.0. Big thanks to [@mptap](https://github.com/mptap) for the PR!
|
13
|
+
- [PR #304](https://github.com/sendgrid/sendgrid-ruby/pull/304): Readability update for documentation. Big thanks to [@af4ro](https://github.com/af4ro) for the PR!
|
14
|
+
- [PR #306](https://github.com/sendgrid/sendgrid-ruby/pull/306): Update example to work in Rails console. Big thanks to [@RogerPodacter](https://github.com/RogerPodacter) for the PR!
|
15
|
+
|
16
|
+
### Fixes
|
17
|
+
- [PR #252](https://github.com/sendgrid/sendgrid-ruby/pull/252): Update LICENSE, set correct year. Big thanks to [@pushkyn](https://github.com/pushkyn) for the PR!
|
18
|
+
- [PR #257](https://github.com/sendgrid/sendgrid-ruby/pull/257): README.md typo fix. Big thanks to [@shucon](https://github.com/shucon) for the PR!
|
19
|
+
|
4
20
|
## [5.2.0] - 2017-10-30 ##
|
5
21
|
### Added
|
6
22
|
- PR #234: Helpers for email statistics - global, category, subuser
|
data/CONTRIBUTING.md
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
|
2
2
|
|
3
|
-
- [CLAs and CCLAs](#
|
4
|
-
- [Roadmap & Milestones](#roadmap)
|
3
|
+
- [CLAs and CCLAs](#clas-and-cclas)
|
5
4
|
- [Feature Request](#feature-request)
|
6
5
|
- [Submit a Bug Report](#submit-a-bug-report)
|
6
|
+
- [Please use our Bug Report Template](#please-use-our-bug-report-template)
|
7
7
|
- [Improvements to the Codebase](#improvements-to-the-codebase)
|
8
|
-
- [
|
8
|
+
- [Development Environment](#development-environment)
|
9
|
+
- [Install and Run Locally](#install-and-run-locally)
|
10
|
+
- [Prerequisites](#prerequisites)
|
11
|
+
- [Initial setup:](#initial-setup)
|
12
|
+
- [Environment Variables](#environment-variables)
|
13
|
+
- [Execute:](#execute)
|
14
|
+
- [Understanding the Code Base](#understanding-the-code-base)
|
9
15
|
- [Testing](#testing)
|
10
|
-
- [Style Guidelines & Naming Conventions](#style-guidelines
|
16
|
+
- [Style Guidelines & Naming Conventions](#style-guidelines--naming-conventions)
|
11
17
|
- [Creating a Pull Request](#creating-a-pull-request)
|
12
18
|
|
13
19
|
<a name="roadmap"></a>
|
@@ -163,8 +169,10 @@ Please run your code through:
|
|
163
169
|
```bash
|
164
170
|
# Clone your fork of the repo into the current directory
|
165
171
|
git clone https://github.com/sendgrid/sendgrid-ruby
|
172
|
+
|
166
173
|
# Navigate to the newly cloned directory
|
167
174
|
cd sendgrid-ruby
|
175
|
+
|
168
176
|
# Assign the original repo to a remote called "upstream"
|
169
177
|
git remote add upstream https://github.com/sendgrid/sendgrid-ruby
|
170
178
|
```
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Version 3.X.X+ of this library provides full support for all SendGrid [Web API v
|
|
10
10
|
|
11
11
|
This library represents the beginning of a new path for SendGrid. We want this library to be community driven and SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/sendgrid/sendgrid-ruby/issues) and [pull requests](https://github.com/sendgrid/sendgrid-ruby/blob/master/CONTRIBUTING.md) or simply upvote or comment on existing issues or pull requests.
|
12
12
|
|
13
|
-
Please browse the rest of this README for further
|
13
|
+
Please browse the rest of this README for further details.
|
14
14
|
|
15
15
|
We appreciate your continued support, thank you!
|
16
16
|
|
@@ -83,16 +83,17 @@ The following is the minimum needed code to send an email with the [/mail/send H
|
|
83
83
|
require 'sendgrid-ruby'
|
84
84
|
include SendGrid
|
85
85
|
|
86
|
-
from = Email.new(email: 'test@example.com')
|
87
|
-
to = Email.new(email: 'test@example.com')
|
86
|
+
from = SendGrid::Email.new(email: 'test@example.com')
|
87
|
+
to = SendGrid::Email.new(email: 'test@example.com')
|
88
88
|
subject = 'Sending with SendGrid is Fun'
|
89
|
-
content = Content.new(type: 'text/plain', value: 'and easy to do anywhere, even with Ruby')
|
90
|
-
mail = Mail.new(from, subject, to, content)
|
89
|
+
content = SendGrid::Content.new(type: 'text/plain', value: 'and easy to do anywhere, even with Ruby')
|
90
|
+
mail = SendGrid::Mail.new(from, subject, to, content)
|
91
91
|
|
92
92
|
sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
|
93
93
|
response = sg.client.mail._('send').post(request_body: mail.to_json)
|
94
94
|
puts response.status_code
|
95
95
|
puts response.body
|
96
|
+
puts response.parsed_body
|
96
97
|
puts response.headers
|
97
98
|
```
|
98
99
|
|
@@ -131,6 +132,7 @@ sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
|
|
131
132
|
response = sg.client.mail._("send").post(request_body: data)
|
132
133
|
puts response.status_code
|
133
134
|
puts response.body
|
135
|
+
puts response.parsed_body
|
134
136
|
puts response.headers
|
135
137
|
```
|
136
138
|
|
@@ -142,6 +144,7 @@ sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
|
|
142
144
|
response = sg.client.suppression.bounces.get()
|
143
145
|
puts response.status_code
|
144
146
|
puts response.body
|
147
|
+
puts response.parsed_body
|
145
148
|
puts response.headers
|
146
149
|
```
|
147
150
|
|
@@ -153,6 +156,7 @@ sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
|
|
153
156
|
response = sg.client._("suppression/bounces").get()
|
154
157
|
puts response.status_code
|
155
158
|
puts response.body
|
159
|
+
puts response.parsed_body
|
156
160
|
puts response.headers
|
157
161
|
```
|
158
162
|
|
data/USE_CASES.md
CHANGED
@@ -7,7 +7,9 @@ This documentation provides examples for specific use cases. Please [open an iss
|
|
7
7
|
* [How to View Email Statistics](#email-statistics)
|
8
8
|
|
9
9
|
<a name="transactional-templates"></a>
|
10
|
-
# Transactional Templates
|
10
|
+
# (LEGACY) Transactional Templates
|
11
|
+
|
12
|
+
IF YOU ARE USING OUR NEW TEMPLATES, PLEASE SEE [THIS ISSUE](https://github.com/sendgrid/sendgrid-ruby/issues/301).
|
11
13
|
|
12
14
|
For this example, we assume you have created a [transactional template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). Following is the template content we used for testing.
|
13
15
|
|
@@ -68,6 +70,7 @@ rescue Exception => e
|
|
68
70
|
end
|
69
71
|
puts response.status_code
|
70
72
|
puts response.body
|
73
|
+
puts response.parsed_body
|
71
74
|
puts response.headers
|
72
75
|
```
|
73
76
|
|
@@ -111,6 +114,7 @@ rescue Exception => e
|
|
111
114
|
end
|
112
115
|
puts response.status_code
|
113
116
|
puts response.body
|
117
|
+
puts response.parsed_body
|
114
118
|
puts response.headers
|
115
119
|
```
|
116
120
|
|
data/docker/Dockerfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
FROM ruby:2.4.2-jessie
|
2
|
+
|
3
|
+
# Clone sendgrid-ruby
|
4
|
+
WORKDIR /sources
|
5
|
+
RUN git clone https://github.com/sendgrid/sendgrid-ruby.git
|
6
|
+
|
7
|
+
# Bundle
|
8
|
+
WORKDIR /sources/sendgrid-ruby
|
9
|
+
RUN bundle install
|
10
|
+
|
11
|
+
# Install prism
|
12
|
+
RUN curl https://raw.githubusercontent.com/stoplightio/prism/master/install.sh | sh
|
data/docker/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Docker image for sendgrid-ruby
|
2
|
+
|
3
|
+
## Quickstart
|
4
|
+
1. [Install Docker](https://docs.docker.com/engine/installation/) on your machine.
|
5
|
+
2. Run `docker run --rm -it sendgrid/sendgrid-ruby irb`.
|
6
|
+
3. Run `require './lib/sendgrid-ruby.rb'`.
|
7
|
+
|
8
|
+
## Poke around
|
9
|
+
|
10
|
+
If you would like to just poke around in the image and check some examples:
|
11
|
+
```sh
|
12
|
+
docker run --rm -it sendgrid/sendgrid-ruby bash
|
13
|
+
```
|
14
|
+
|
15
|
+
If you want to mount your fork or specific version of the gem:
|
16
|
+
```sh
|
17
|
+
docker run --rm -v /path/to/local/sendgrid-ruby:/sources/sendgrid-ruby -it sendgrid/sendgrid-ruby bash
|
18
|
+
```
|
19
|
+
|
20
|
+
## Running tests
|
21
|
+
|
22
|
+
If you would like to run the tests present in the image:
|
23
|
+
```sh
|
24
|
+
docker run --rm sendgrid/sendgrid-ruby rake
|
25
|
+
```
|
26
|
+
|
27
|
+
If you want to run tests on your fork or a specific version, mount the codebase onto the image:
|
28
|
+
```sh
|
29
|
+
docker run --rm -v /path/to/local/sendgrid-ruby:/sources/sendgrid-ruby sendgrid/sendgrid-ruby rake
|
30
|
+
```
|
@@ -125,5 +125,23 @@ def kitchen_sink
|
|
125
125
|
puts response.headers
|
126
126
|
end
|
127
127
|
|
128
|
+
def dynamic_template_data_hello_world
|
129
|
+
mail = Mail.new
|
130
|
+
mail.template_id = '' # a non-legacy template id
|
131
|
+
mail.from = Email.new(email: 'test@example.com')
|
132
|
+
subject = 'Dynamic Template Data Hello World from the SendGrid Ruby Library'
|
133
|
+
mail.subject = subject
|
134
|
+
personalization = Personalization.new
|
135
|
+
personalization.add_to(Email.new(email: 'test1@example.com', name: 'Example User'))
|
136
|
+
personalization.add_dynamic_template_data({
|
137
|
+
"variable" => [
|
138
|
+
{"foo" => "bar"}, {"foo" => "baz"}
|
139
|
+
]
|
140
|
+
})
|
141
|
+
mail.add_personalization(personalization)
|
142
|
+
end
|
143
|
+
|
128
144
|
hello_world
|
129
145
|
kitchen_sink
|
146
|
+
dynamic_template_data_hello_world
|
147
|
+
|
@@ -30,7 +30,7 @@ bundle install
|
|
30
30
|
ruby ./lib/sendgrid/helpers/inbound/send.rb ./lib/sendgrid/helpers/inbound/sample_data/default_data.txt
|
31
31
|
```
|
32
32
|
|
33
|
-
More sample data can be found [here](https://github.com/sendgrid/sendgrid-ruby/tree/master/sendgrid/helpers/inbound/sample_data).
|
33
|
+
More sample data can be found [here](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/inbound/sample_data).
|
34
34
|
|
35
35
|
View the results in the first terminal.
|
36
36
|
|
@@ -4,7 +4,7 @@ module SendGrid
|
|
4
4
|
class CustomArg
|
5
5
|
def initialize(key: nil, value: nil)
|
6
6
|
@custom_arg = {}
|
7
|
-
(key.nil? || value.nil?) ? @custom_arg = nil : @custom_arg[key] = value
|
7
|
+
(key.nil? || value.nil?) ? @custom_arg = nil : @custom_arg[key.to_s] = value.to_s
|
8
8
|
end
|
9
9
|
|
10
10
|
def custom_arg=(custom_arg)
|
@@ -3,7 +3,8 @@ require 'json'
|
|
3
3
|
module SendGrid
|
4
4
|
class Personalization
|
5
5
|
|
6
|
-
attr_reader :tos, :ccs, :bccs, :headers, :substitutions, :custom_args
|
6
|
+
attr_reader :tos, :ccs, :bccs, :headers, :substitutions, :custom_args,
|
7
|
+
:dynamic_template_data
|
7
8
|
|
8
9
|
def initialize
|
9
10
|
@tos = []
|
@@ -13,6 +14,7 @@ module SendGrid
|
|
13
14
|
@headers = {}
|
14
15
|
@substitutions = {}
|
15
16
|
@custom_args = {}
|
17
|
+
@dynamic_template_data = {}
|
16
18
|
@send_at = nil
|
17
19
|
end
|
18
20
|
|
@@ -51,6 +53,10 @@ module SendGrid
|
|
51
53
|
@custom_args = @custom_args.merge(custom_arg['custom_arg'])
|
52
54
|
end
|
53
55
|
|
56
|
+
def add_dynamic_template_data(dynamic_template_data)
|
57
|
+
@dynamic_template_data.merge!(dynamic_template_data)
|
58
|
+
end
|
59
|
+
|
54
60
|
def send_at=(send_at)
|
55
61
|
@send_at = send_at
|
56
62
|
end
|
@@ -68,6 +74,7 @@ module SendGrid
|
|
68
74
|
'headers' => self.headers,
|
69
75
|
'substitutions' => self.substitutions,
|
70
76
|
'custom_args' => self.custom_args,
|
77
|
+
'dynamic_template_data' => self.dynamic_template_data,
|
71
78
|
'send_at' => self.send_at
|
72
79
|
}.delete_if { |_, value| value.to_s.strip == '' || value == [] || value == {}}
|
73
80
|
end
|
data/lib/sendgrid/version.rb
CHANGED
data/sendgrid-ruby.gemspec
CHANGED
@@ -19,11 +19,12 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
|
20
20
|
spec.test_files = spec.files.grep(/^(test|spec|features)/)
|
21
21
|
spec.require_paths = ['lib']
|
22
|
-
spec.add_dependency 'ruby_http_client', '~> 3.
|
22
|
+
spec.add_dependency 'ruby_http_client', '~> 3.3.0'
|
23
23
|
spec.add_dependency 'sinatra', '>= 1.4.7', '< 3'
|
24
24
|
spec.add_development_dependency 'rake', '~> 0'
|
25
25
|
spec.add_development_dependency 'rspec'
|
26
26
|
spec.add_development_dependency 'pry'
|
27
27
|
spec.add_development_dependency 'faker'
|
28
|
+
spec.add_development_dependency 'rubocop'
|
28
29
|
spec.add_development_dependency 'minitest', '~> 5.9'
|
29
30
|
end
|
@@ -207,6 +207,21 @@ class TestMail < Minitest::Test
|
|
207
207
|
assert_equal mail.to_json, expected_json
|
208
208
|
end
|
209
209
|
|
210
|
+
def test_add_non_string_custom_arg
|
211
|
+
mail = Mail.new
|
212
|
+
mail.add_custom_arg(CustomArg.new(key: "Integer", value: 1))
|
213
|
+
mail.add_custom_arg(CustomArg.new(key: "Array", value: [1, "a", true]))
|
214
|
+
mail.add_custom_arg(CustomArg.new(key: "Hash", value: {"a" => 1, "b" => 2}))
|
215
|
+
expected_json = {
|
216
|
+
"custom_args"=>{
|
217
|
+
"Integer"=>"1",
|
218
|
+
"Array"=>"[1, \"a\", true]",
|
219
|
+
"Hash"=>"{\"a\"=>1, \"b\"=>2}",
|
220
|
+
}
|
221
|
+
}
|
222
|
+
assert_equal mail.to_json, expected_json
|
223
|
+
end
|
224
|
+
|
210
225
|
def test_add_attachment
|
211
226
|
mail = Mail.new
|
212
227
|
mail.add_attachment('foo')
|
@@ -143,4 +143,19 @@ class TestPersonalization < Minitest::Test
|
|
143
143
|
assert_equal @personalization.to_json, expected_json
|
144
144
|
end
|
145
145
|
|
146
|
+
def test_add_dynamic_template_data
|
147
|
+
@personalization = Personalization.new()
|
148
|
+
@personalization.add_dynamic_template_data({
|
149
|
+
"name"=>"Example User",
|
150
|
+
"city"=> "Denver"
|
151
|
+
})
|
152
|
+
expected_json = {
|
153
|
+
"dynamic_template_data"=>{
|
154
|
+
"name"=>"Example User",
|
155
|
+
"city"=>"Denver"
|
156
|
+
}
|
157
|
+
}
|
158
|
+
assert_equal @personalization.to_json, expected_json
|
159
|
+
end
|
160
|
+
|
146
161
|
end
|
@@ -55,7 +55,7 @@ class TestAPI < MiniTest::Test
|
|
55
55
|
')
|
56
56
|
assert_equal(test_headers, sg.request_headers)
|
57
57
|
assert_equal("v3", sg.version)
|
58
|
-
assert_equal("5.
|
58
|
+
assert_equal("5.3.0", SendGrid::VERSION)
|
59
59
|
assert_instance_of(SendGrid::Client, sg.client)
|
60
60
|
end
|
61
61
|
|
@@ -2667,4 +2667,77 @@ class TestAPI < MiniTest::Test
|
|
2667
2667
|
|
2668
2668
|
self.assert_equal('200', response.status_code)
|
2669
2669
|
end
|
2670
|
+
|
2671
|
+
|
2672
|
+
def test_license_file_correct_year_range
|
2673
|
+
if File.exist?('./LICENSE.txt')
|
2674
|
+
# get only the first line from the license txt file
|
2675
|
+
year_range = File.open('./LICENSE.txt', &:readline).gsub(/[^\d-]/, '')
|
2676
|
+
self.assert_equal("2014-#{Time.now.year}", year_range)
|
2677
|
+
end
|
2678
|
+
end
|
2679
|
+
|
2680
|
+
def test_docker_exists
|
2681
|
+
assert(File.file?('./Dockerfile') || File.file?('./docker/Dockerfile'))
|
2682
|
+
end
|
2683
|
+
|
2684
|
+
# def test_docker_compose_exists
|
2685
|
+
# assert(File.file?('./docker-compose.yml') || File.file?('./docker/docker-compose.yml'))
|
2686
|
+
# end
|
2687
|
+
|
2688
|
+
def test_env_sample_exists
|
2689
|
+
assert(File.file?('./.env_sample'))
|
2690
|
+
end
|
2691
|
+
|
2692
|
+
def test_gitignore_exists
|
2693
|
+
assert(File.file?('./.gitignore'))
|
2694
|
+
end
|
2695
|
+
|
2696
|
+
def test_travis_exists
|
2697
|
+
assert(File.file?('./.travis.yml'))
|
2698
|
+
end
|
2699
|
+
|
2700
|
+
def test_codeclimate_exists
|
2701
|
+
assert(File.file?('./.codeclimate.yml'))
|
2702
|
+
end
|
2703
|
+
|
2704
|
+
def test_changelog_exists
|
2705
|
+
assert(File.file?('./CHANGELOG.md'))
|
2706
|
+
end
|
2707
|
+
|
2708
|
+
def test_code_of_conduct_exists
|
2709
|
+
assert(File.file?('./CODE_OF_CONDUCT.md'))
|
2710
|
+
end
|
2711
|
+
|
2712
|
+
def test_contributing_exists
|
2713
|
+
assert(File.file?('./CONTRIBUTING.md'))
|
2714
|
+
end
|
2715
|
+
|
2716
|
+
def test_issue_template_exists
|
2717
|
+
assert(File.file?('./.github/ISSUE_TEMPLATE'))
|
2718
|
+
end
|
2719
|
+
|
2720
|
+
def test_license_exists
|
2721
|
+
assert(File.file?('./LICENSE.txt'))
|
2722
|
+
end
|
2723
|
+
|
2724
|
+
def test_pull_request_template_exists
|
2725
|
+
assert(File.file?('./.github/PULL_REQUEST_TEMPLATE'))
|
2726
|
+
end
|
2727
|
+
|
2728
|
+
def test_readme_exists
|
2729
|
+
assert(File.file?('./README.md'))
|
2730
|
+
end
|
2731
|
+
|
2732
|
+
def test_troubleshooting_exists
|
2733
|
+
assert(File.file?('./TROUBLESHOOTING.md'))
|
2734
|
+
end
|
2735
|
+
|
2736
|
+
def test_usage_exists
|
2737
|
+
assert(File.file?('./USAGE.md'))
|
2738
|
+
end
|
2739
|
+
|
2740
|
+
def test_use_cases_exists
|
2741
|
+
assert(File.file?('./USE_CASES.md'))
|
2742
|
+
end
|
2670
2743
|
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: 5.
|
4
|
+
version: 5.3.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:
|
13
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ruby_http_client
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
28
|
+
version: 3.3.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: sinatra
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,6 +102,20 @@ dependencies:
|
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: rubocop
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
105
119
|
- !ruby/object:Gem::Dependency
|
106
120
|
name: minitest
|
107
121
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,7 @@ executables: []
|
|
122
136
|
extensions: []
|
123
137
|
extra_rdoc_files: []
|
124
138
|
files:
|
139
|
+
- ".codeclimate.yml"
|
125
140
|
- ".env_sample"
|
126
141
|
- ".github/ISSUE_TEMPLATE"
|
127
142
|
- ".github/PULL_REQUEST_TEMPLATE"
|
@@ -138,6 +153,8 @@ files:
|
|
138
153
|
- USAGE.md
|
139
154
|
- USE_CASES.md
|
140
155
|
- config.ru
|
156
|
+
- docker/Dockerfile
|
157
|
+
- docker/README.md
|
141
158
|
- examples/accesssettings/accesssettings.rb
|
142
159
|
- examples/alerts/alerts.rb
|
143
160
|
- examples/apikeys/apikeys.rb
|