ruby_http_client 3.5.0 → 3.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/config.yml +10 -0
- data/.github/workflows/test-and-deploy.yml +99 -0
- data/.rubocop.yml +3 -1
- data/.rubocop_todo.yml +65 -0
- data/CHANGELOG.md +26 -0
- data/CONTRIBUTING.md +7 -27
- data/FIRST_TIMERS.md +79 -0
- data/ISSUE_TEMPLATE.md +5 -1
- data/{LICENSE.md → LICENSE} +1 -1
- data/Makefile +2 -2
- data/PULL_REQUEST_TEMPLATE.md +5 -5
- data/README.md +19 -24
- data/lib/ruby_http_client.rb +17 -1
- data/ruby_http_client.gemspec +3 -4
- data/static/img/github-fork.png +0 -0
- data/static/img/github-sign-up.png +0 -0
- data/test/test_helper.rb +1 -1
- data/test/test_ruby_http_client.rb +12 -8
- data/twilio_sendgrid_logo.png +0 -0
- metadata +16 -26
- data/.codeclimate.yml +0 -16
- data/.travis.yml +0 -33
- data/first-timers.md +0 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5aafc3cc7f305da17f92cfb2bdb0e60ca5a9d7c076bc688fc8559b737049f5c3
|
4
|
+
data.tar.gz: 4ee430b196d2a94e15d96d1762d16075957875561fe6775e11929e68ea11e854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a62a58ee3666b835c1751524c46aa5b6af8897decb2ea7dbcc90de1524b9177c5f9c2db3a35a3952e108c25586df927f593dbc836a4676fdc74a9955ee61e3f
|
7
|
+
data.tar.gz: 2a6b432306346814a20994b0134510cc90ba083549f1ac693851ab5b3159abb1409550e9b0b30033532421c3e36c5b8ad95a5ef83121ebe3713b144555798d92
|
@@ -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/ruby-http-client+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
|
@@ -0,0 +1,99 @@
|
|
1
|
+
name: Test and Deploy
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ '*' ]
|
5
|
+
tags: [ '*' ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
schedule:
|
9
|
+
# Run automatically at 8AM PST Monday-Friday
|
10
|
+
- cron: '0 15 * * 1-5'
|
11
|
+
workflow_dispatch:
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test:
|
15
|
+
name: Test
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
timeout-minutes: 20
|
18
|
+
strategy:
|
19
|
+
matrix:
|
20
|
+
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'jruby-9.2' ]
|
21
|
+
steps:
|
22
|
+
- name: Checkout ruby-http-client
|
23
|
+
uses: actions/checkout@v2
|
24
|
+
with:
|
25
|
+
fetch-depth: 0
|
26
|
+
|
27
|
+
- name: Set up Ruby
|
28
|
+
uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true
|
32
|
+
|
33
|
+
- run: make install
|
34
|
+
|
35
|
+
- name: Set up linter
|
36
|
+
run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install
|
37
|
+
if: ${{ matrix.ruby != '2.4' }}
|
38
|
+
|
39
|
+
- run: bundle install --with development
|
40
|
+
|
41
|
+
- name: Run linter
|
42
|
+
run: bundle exec rake rubocop
|
43
|
+
if: ${{ matrix.ruby != '2.4' }}
|
44
|
+
|
45
|
+
- name: Run tests
|
46
|
+
run: make test
|
47
|
+
|
48
|
+
deploy:
|
49
|
+
name: Deploy
|
50
|
+
if: success() && github.ref_type == 'tag'
|
51
|
+
needs: [ test ]
|
52
|
+
runs-on: ubuntu-latest
|
53
|
+
steps:
|
54
|
+
- name: Checkout ruby-http-client
|
55
|
+
uses: actions/checkout@v2
|
56
|
+
with:
|
57
|
+
fetch-depth: 0
|
58
|
+
|
59
|
+
- name: Set up Ruby
|
60
|
+
uses: ruby/setup-ruby@v1
|
61
|
+
with:
|
62
|
+
ruby-version: 3.1
|
63
|
+
bundler-cache: true
|
64
|
+
|
65
|
+
- run: make install
|
66
|
+
|
67
|
+
- name: Create GitHub Release
|
68
|
+
uses: sendgrid/dx-automator/actions/release@main
|
69
|
+
env:
|
70
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
71
|
+
|
72
|
+
- name: Publish to Rubygems
|
73
|
+
env:
|
74
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
75
|
+
run: |
|
76
|
+
mkdir -p $HOME/.gem
|
77
|
+
touch $HOME/.gem/credentials
|
78
|
+
chmod 0600 $HOME/.gem/credentials
|
79
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
80
|
+
gem build *.gemspec
|
81
|
+
gem push *.gem
|
82
|
+
|
83
|
+
notify-on-failure:
|
84
|
+
name: Slack notify on failure
|
85
|
+
if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
|
86
|
+
needs: [ test, deploy ]
|
87
|
+
runs-on: ubuntu-latest
|
88
|
+
steps:
|
89
|
+
- uses: rtCamp/action-slack-notify@v2
|
90
|
+
env:
|
91
|
+
SLACK_COLOR: failure
|
92
|
+
SLACK_ICON_EMOJI: ':github:'
|
93
|
+
SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
|
94
|
+
SLACK_TITLE: Action Failure - ${{ github.repository }}
|
95
|
+
SLACK_USERNAME: GitHub Actions
|
96
|
+
SLACK_MSG_AUTHOR: twilio-dx
|
97
|
+
SLACK_FOOTER: Posted automatically using GitHub Actions
|
98
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
99
|
+
MSG_MINIMAL: true
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2022-01-25 23:29:33 UTC using RuboCop version 1.22.2.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'ruby_http_client.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Cop supports --auto-correct.
|
18
|
+
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
|
19
|
+
# AllowedMethods: alias_method, public, protected, private
|
20
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
21
|
+
Exclude:
|
22
|
+
- 'lib/ruby_http_client.rb'
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
# Cop supports --auto-correct.
|
26
|
+
# Configuration parameters: EnforcedStyle.
|
27
|
+
# SupportedStyles: final_newline, final_blank_line
|
28
|
+
Layout/TrailingEmptyLines:
|
29
|
+
Exclude:
|
30
|
+
- 'Gemfile'
|
31
|
+
|
32
|
+
# Offense count: 1
|
33
|
+
Lint/MissingSuper:
|
34
|
+
Exclude:
|
35
|
+
- 'test/test_ruby_http_client.rb'
|
36
|
+
|
37
|
+
# Offense count: 1
|
38
|
+
# Cop supports --auto-correct.
|
39
|
+
Lint/RedundantCopDisableDirective:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/ruby_http_client.rb'
|
42
|
+
|
43
|
+
# Offense count: 1
|
44
|
+
# Cop supports --auto-correct.
|
45
|
+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
46
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
47
|
+
Style/HashSyntax:
|
48
|
+
Exclude:
|
49
|
+
- 'Gemfile'
|
50
|
+
|
51
|
+
# Offense count: 4
|
52
|
+
# Cop supports --auto-correct.
|
53
|
+
# Configuration parameters: Mode.
|
54
|
+
Style/StringConcatenation:
|
55
|
+
Exclude:
|
56
|
+
- 'lib/ruby_http_client.rb'
|
57
|
+
- 'test/test_ruby_http_client.rb'
|
58
|
+
|
59
|
+
# Offense count: 2
|
60
|
+
# Cop supports --auto-correct.
|
61
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
62
|
+
# SupportedStyles: single_quotes, double_quotes
|
63
|
+
Style/StringLiterals:
|
64
|
+
Exclude:
|
65
|
+
- 'Gemfile'
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,32 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
[2022-02-09] Version 3.5.4
|
7
|
+
--------------------------
|
8
|
+
**Library - Chore**
|
9
|
+
- [PR #129](https://github.com/sendgrid/ruby-http-client/pull/129): upgrade supported language versions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
10
|
+
- [PR #128](https://github.com/sendgrid/ruby-http-client/pull/128): add gh release to workflow. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
11
|
+
- [PR #127](https://github.com/sendgrid/ruby-http-client/pull/127): migrate to gh actions. Thanks to [@beebzz](https://github.com/beebzz)!
|
12
|
+
|
13
|
+
|
14
|
+
[2022-01-12] Version 3.5.3
|
15
|
+
--------------------------
|
16
|
+
**Library - Chore**
|
17
|
+
- [PR #126](https://github.com/sendgrid/ruby-http-client/pull/126): update license year. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
|
18
|
+
|
19
|
+
|
20
|
+
[2021-01-13] Version 3.5.2
|
21
|
+
--------------------------
|
22
|
+
**Library - Fix**
|
23
|
+
- [PR #124](https://github.com/sendgrid/ruby-http-client/pull/124): Mistake on setup http_options for Net::HTTP object when build http. Thanks to [@hoangtuanictvn](https://github.com/hoangtuanictvn)!
|
24
|
+
|
25
|
+
|
26
|
+
[2020-08-19] Version 3.5.1
|
27
|
+
--------------------------
|
28
|
+
**Library - Chore**
|
29
|
+
- [PR #120](https://github.com/sendgrid/ruby-http-client/pull/120): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
|
30
|
+
|
31
|
+
|
6
32
|
[2020-03-04] Version 3.5.0
|
7
33
|
--------------------------
|
8
34
|
**Library - Fix**
|
data/CONTRIBUTING.md
CHANGED
@@ -1,7 +1,5 @@
|
|
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](#cla)
|
4
|
-
- [Roadmap & Milestones](#roadmap)
|
5
3
|
- [Feature Request](#feature-request)
|
6
4
|
- [Submit a Bug Report](#submit-a-bug-report)
|
7
5
|
- [Improvements to the Codebase](#improvements-to-the-codebase)
|
@@ -11,22 +9,6 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
|
|
11
9
|
- [Creating a Pull Request](#creating-a-pull-request)
|
12
10
|
- [Code Reviews](#code-reviews)
|
13
11
|
|
14
|
-
<a name="roadmap"></a>
|
15
|
-
We use [Milestones](https://github.com/sendgrid/ruby-http-client/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions, and additional PRs are welcomed and encouraged.
|
16
|
-
|
17
|
-
<a name="cla"></a>
|
18
|
-
## CLAs and CCLAs
|
19
|
-
|
20
|
-
Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) be filled out by every contributor to a SendGrid open source project.
|
21
|
-
|
22
|
-
Our goal with the CLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way, the CLA encourages broad participation by our open source community and helps us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
|
23
|
-
|
24
|
-
SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA. Copies of the CLA are available [here](https://gist.github.com/SendGridDX/98b42c0a5d500058357b80278fde3be8#file-sendgrid_cla).
|
25
|
-
|
26
|
-
When you create a Pull Request, after a few seconds, a comment will appear with a link to the CLA. Click the link and fill out the brief form and then click the "I agree" button and you are all set. You will not be asked to re-sign the CLA unless we make a change.
|
27
|
-
|
28
|
-
There are a few ways to contribute, which we'll enumerate below:
|
29
|
-
|
30
12
|
<a name="feature-request"></a>
|
31
13
|
## Feature Request
|
32
14
|
|
@@ -52,7 +34,7 @@ Before you decide to create a new issue, please try the following:
|
|
52
34
|
|
53
35
|
### Please use our Bug Report Template
|
54
36
|
|
55
|
-
In order to make the process easier, we've included a [sample bug report template](
|
37
|
+
In order to make the process easier, we've included a [sample bug report template](ISSUE_TEMPLATE.md).
|
56
38
|
|
57
39
|
<a name="improvements-to-the-codebase"></a>
|
58
40
|
## Improvements to the Codebase
|
@@ -88,7 +70,7 @@ source ./sendgrid.env
|
|
88
70
|
|
89
71
|
##### Execute: #####
|
90
72
|
|
91
|
-
See the [examples folder](
|
73
|
+
See the [examples folder](examples) to get started quickly.
|
92
74
|
|
93
75
|
To run the example (after updating the emails):
|
94
76
|
|
@@ -105,20 +87,20 @@ Working examples that demonstrate usage.
|
|
105
87
|
|
106
88
|
**ruby_http_client.rb**
|
107
89
|
|
108
|
-
An HTTP client with a fluent interface using method chaining and reflection. By returning self on [method_missing](
|
90
|
+
An HTTP client with a fluent interface using method chaining and reflection. By returning self on [method_missing](lib/ruby_http_client.rb#L209) and [_()](lib/ruby_http_client.rb#L194), we can dynamically build the URL using method chaining and [method_missing](lib/ruby_http_client.rb#L209) allows us to dynamically receive the method calls to achieve reflection.
|
109
91
|
|
110
92
|
This allows for the following mapping from a URL to a method chain:
|
111
93
|
|
112
|
-
`/api_client/{api_key_id}/version` maps to `client.api_client._(api_key_id).version.<method>()` where <method> is a [HTTP verb](
|
94
|
+
`/api_client/{api_key_id}/version` maps to `client.api_client._(api_key_id).version.<method>()` where <method> is a [HTTP verb](lib/ruby_http_client.rb#L38).
|
113
95
|
|
114
96
|
<a name="testing"></a>
|
115
97
|
## Testing
|
116
98
|
|
117
99
|
All PRs require passing tests before the PR will be reviewed.
|
118
100
|
|
119
|
-
All test files are in the [`test`](
|
101
|
+
All test files are in the [`test`](test) directory.
|
120
102
|
|
121
|
-
For the purposes of contributing to this repo, please update the [`test_ruby_http_client.rb`](
|
103
|
+
For the purposes of contributing to this repo, please update the [`test_ruby_http_client.rb`](test/test_ruby_http_client.rb) file with unit tests as you modify the code.
|
122
104
|
|
123
105
|
To run the tests:
|
124
106
|
|
@@ -190,9 +172,7 @@ Please run your code through:
|
|
190
172
|
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
|
191
173
|
with a clear title and description against the `development` branch. All tests must be passing before we will review the PR.
|
192
174
|
|
193
|
-
If you have any additional questions, please feel free to [email](mailto:dx@sendgrid.com) us or create an issue in this repo.
|
194
|
-
|
195
175
|
<a name="code-reviews"></a>
|
196
176
|
## Code Reviews
|
197
177
|
|
198
|
-
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some great <a href="https://help.github.com/articles/about-pull-request-reviews/">information on how to review a Pull Request.</a>
|
178
|
+
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some great <a href="https://help.github.com/articles/about-pull-request-reviews/">information on how to review a Pull Request.</a>
|
data/FIRST_TIMERS.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# How To Contribute to Twilio SendGrid Repositories via GitHub
|
2
|
+
Contributing to the Twilio SendGrid repositories is easy! All you need to do is find an open issue (see the bottom of this page for a list of repositories containing open issues), fix it and submit a pull request. Once you have submitted your pull request, the team can easily review it before it is merged into the repository.
|
3
|
+
|
4
|
+
To make a pull request, follow these steps:
|
5
|
+
|
6
|
+
1. Log into GitHub. If you do not already have a GitHub account, you will have to create one in order to submit a change. Click the Sign up link in the upper right-hand corner to create an account. Enter your username, password, and email address. If you are an employee of Twilio SendGrid, please use your full name with your GitHub account and enter Twilio SendGrid as your company so we can easily identify you.
|
7
|
+
|
8
|
+
<img src="/static/img/github-sign-up.png" width="800">
|
9
|
+
|
10
|
+
2. __[Fork](https://help.github.com/fork-a-repo/)__ the [ruby-http-client](https://github.com/sendgrid/ruby-http-client) repository:
|
11
|
+
|
12
|
+
<img src="/static/img/github-fork.png" width="800">
|
13
|
+
|
14
|
+
3. __Clone__ your fork via the following commands:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
# Clone your fork of the repo into the current directory
|
18
|
+
git clone https://github.com/your_username/ruby-http-client
|
19
|
+
# Navigate to the newly cloned directory
|
20
|
+
cd ruby-http-client
|
21
|
+
# Assign the original repo to a remote called "upstream"
|
22
|
+
git remote add upstream https://github.com/sendgrid/ruby-http-client
|
23
|
+
```
|
24
|
+
|
25
|
+
> Don't forget to replace *your_username* in the URL by your real GitHub username.
|
26
|
+
|
27
|
+
4. __Create a new topic branch__ (off the main project development branch) to contain your feature, change, or fix:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
git checkout -b <topic-branch-name>
|
31
|
+
```
|
32
|
+
|
33
|
+
5. __Commit your changes__ in logical chunks.
|
34
|
+
|
35
|
+
Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. Probably you will also have to create tests (if needed) or create or update the example code that demonstrates the functionality of this change to the code.
|
36
|
+
|
37
|
+
6. __Locally merge (or rebase)__ the upstream development branch into your topic branch:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
git pull [--rebase] upstream main
|
41
|
+
```
|
42
|
+
|
43
|
+
7. __Push__ your topic branch up to your fork:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
git push origin <topic-branch-name>
|
47
|
+
```
|
48
|
+
|
49
|
+
8. __[Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#changing-the-branch-range-and-destination-repository/)__ with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.
|
50
|
+
|
51
|
+
## Important notice
|
52
|
+
|
53
|
+
Before creating a pull request, make sure that you respect the repository's constraints regarding contributions. You can find them in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
54
|
+
|
55
|
+
## Repositories with Open, Easy, Help Wanted, Issue Filters
|
56
|
+
|
57
|
+
* [Python SDK](https://github.com/sendgrid/sendgrid-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
58
|
+
* [PHP SDK](https://github.com/sendgrid/sendgrid-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
59
|
+
* [C# SDK](https://github.com/sendgrid/sendgrid-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
60
|
+
* [Ruby SDK](https://github.com/sendgrid/sendgrid-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
61
|
+
* [Node.js SDK](https://github.com/sendgrid/sendgrid-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
62
|
+
* [Java SDK](https://github.com/sendgrid/sendgrid-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
63
|
+
* [Go SDK](https://github.com/sendgrid/sendgrid-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
64
|
+
* [Python SMTPAPI Client](https://github.com/sendgrid/smtpapi-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
65
|
+
* [PHP SMTPAPI Client](https://github.com/sendgrid/smtpapi-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
66
|
+
* [C# SMTPAPI Client](https://github.com/sendgrid/smtpapi-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
67
|
+
* [Ruby SMTPAPI Client](https://github.com/sendgrid/smtpapi-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
68
|
+
* [Node.js SMTPAPI Client](https://github.com/sendgrid/smtpapi-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
69
|
+
* [Java SMTPAPI Client](https://github.com/sendgrid/smtpapi-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
70
|
+
* [Go SMTPAPI Client](https://github.com/sendgrid/smtpapi-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
71
|
+
* [Python HTTP Client](https://github.com/sendgrid/python-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
72
|
+
* [PHP HTTP Client](https://github.com/sendgrid/php-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
73
|
+
* [C# HTTP Client](https://github.com/sendgrid/csharp-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
74
|
+
* [Java HTTP Client](https://github.com/sendgrid/java-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
75
|
+
* [Ruby HTTP Client](https://github.com/sendgrid/ruby-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
76
|
+
* [Go HTTP Client](https://github.com/sendgrid/rest/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
77
|
+
* [Open API Definition](https://github.com/sendgrid/sendgrid-oai/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
78
|
+
* [DX Automator](https://github.com/sendgrid/dx-automator/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
79
|
+
* [Documentation](https://github.com/sendgrid/docs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
data/ISSUE_TEMPLATE.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
<!--
|
2
2
|
If this is a feature request, make sure you search Issues for an existing request before creating a new one!
|
3
|
+
|
4
|
+
Please utilize the template below to help us resolve your issue.
|
5
|
+
|
6
|
+
Note that many issues can be resolved by updating to the latest version.
|
3
7
|
-->
|
4
8
|
|
5
9
|
### Issue Summary
|
@@ -21,6 +25,6 @@ A summary of the issue and the environment in which it occurs. If suitable, incl
|
|
21
25
|
```
|
22
26
|
|
23
27
|
### Technical details:
|
24
|
-
* ruby-http-client version:
|
28
|
+
* ruby-http-client version:
|
25
29
|
* ruby version:
|
26
30
|
|
data/{LICENSE.md → LICENSE}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (C)
|
3
|
+
Copyright (C) 2022, Twilio SendGrid, Inc. <help@twilio.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/Makefile
CHANGED
data/PULL_REQUEST_TEMPLATE.md
CHANGED
@@ -19,13 +19,13 @@ Closes #2
|
|
19
19
|
A short description of what this PR does.
|
20
20
|
|
21
21
|
### Checklist
|
22
|
-
- [
|
22
|
+
- [x] I acknowledge that all my contributions will be made under the project's license
|
23
23
|
- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
|
24
|
-
- [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
|
24
|
+
- [ ] I have read the [Contribution Guidelines](https://github.com/sendgrid/ruby-http-client/blob/main/CONTRIBUTING.md) and my PR follows them
|
25
25
|
- [ ] I have titled the PR appropriately
|
26
|
-
- [ ] I have updated my branch with the
|
26
|
+
- [ ] I have updated my branch with the main branch
|
27
27
|
- [ ] I have added tests that prove my fix is effective or that my feature works
|
28
|
-
- [ ] I have added necessary documentation about the functionality in the appropriate .md file
|
28
|
+
- [ ] I have added the necessary documentation about the functionality in the appropriate .md file
|
29
29
|
- [ ] I have added inline documentation to the code I modified
|
30
30
|
|
31
|
-
If you have questions, please file a [support ticket](https://
|
31
|
+
If you have questions, please file a [support ticket](https://support.sendgrid.com), or create a GitHub Issue in this repository.
|
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
![SendGrid Logo](
|
1
|
+
![SendGrid Logo](twilio_sendgrid_logo.png)
|
2
2
|
|
3
|
-
[![BuildStatus](https://
|
4
|
-
[![
|
5
|
-
[![
|
6
|
-
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)
|
3
|
+
[![BuildStatus](https://github.com/sendgrid/ruby-http-client/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/sendgrid/ruby-http-client/actions/workflows/test-and-deploy.yml)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/ruby_http_client.svg)](https://badge.fury.io/rb/ruby_http_client)
|
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/ruby-http-client.svg)](https://github.com/sendgrid/ruby-http-client/graphs/contributors)
|
9
8
|
|
@@ -12,14 +11,14 @@
|
|
12
11
|
If you are looking for the SendGrid API client library, please see [this repo](https://github.com/sendgrid/sendgrid-ruby).
|
13
12
|
|
14
13
|
# Announcements
|
14
|
+
**The default branch name for this repository has been changed to `main` as of 07/27/2020.**
|
15
15
|
|
16
|
-
All updates to this library are documented in our [CHANGELOG](
|
16
|
+
All updates to this library are documented in our [CHANGELOG](CHANGELOG.md).
|
17
17
|
|
18
18
|
# Table of Contents
|
19
19
|
- [Installation](#installation)
|
20
20
|
- [Quick Start](#quick-start)
|
21
21
|
- [Usage](#usage)
|
22
|
-
- [Roadmap](#roadmap)
|
23
22
|
- [How to Contribute](#contribute)
|
24
23
|
- [About](#about)
|
25
24
|
- [License](#license)
|
@@ -56,7 +55,7 @@ gem install ruby_http_client
|
|
56
55
|
|
57
56
|
```ruby
|
58
57
|
require 'ruby_http_client'
|
59
|
-
global_headers = {'Authorization' => '
|
58
|
+
global_headers = {'Authorization' => 'Bearer XXXXXXX' }
|
60
59
|
client = SendGrid::Client.new(host: 'base_url', request_headers: global_headers)
|
61
60
|
client.your.api._(param).call.get
|
62
61
|
puts response.status_code
|
@@ -68,7 +67,7 @@ puts response.headers
|
|
68
67
|
|
69
68
|
```ruby
|
70
69
|
require 'ruby_http_client'
|
71
|
-
global_headers = {'Authorization' => '
|
70
|
+
global_headers = {'Authorization' => 'Bearer XXXXXXX' }
|
72
71
|
client = SendGrid::Client.new(host: 'base_url', request_headers: global_headers)
|
73
72
|
query_params = { 'hello' => 0, 'world' => 1 }
|
74
73
|
request_headers = { 'X-Test' => 'test' }
|
@@ -84,32 +83,28 @@ puts response.headers
|
|
84
83
|
<a name="usage"></a>
|
85
84
|
# Usage
|
86
85
|
|
87
|
-
- [Example Code](
|
88
|
-
|
89
|
-
<a name="roadmap"></a>
|
90
|
-
# Roadmap
|
91
|
-
|
92
|
-
If you are interested in the future direction of this project, please take a look at our [milestones](https://github.com/sendgrid/ruby-http-client/milestones). We would love to hear your feedback.
|
86
|
+
- [Example Code](examples)
|
93
87
|
|
94
88
|
<a name="contribute"></a>
|
95
89
|
# How to Contribute
|
96
90
|
|
97
|
-
We encourage contribution to our libraries, please see our [CONTRIBUTING](
|
91
|
+
We encourage contribution to our libraries, please see our [CONTRIBUTING](CONTRIBUTING.md) guide for details.
|
98
92
|
|
99
93
|
Quick links:
|
100
94
|
|
101
|
-
- [Feature Request](
|
102
|
-
- [Bug Reports](
|
103
|
-
- [
|
104
|
-
- [
|
105
|
-
- [Review Pull Requests](https://github.com/sendgrid/ruby-http-client/blob/master/CONTRIBUTING.md#code-reviews)
|
95
|
+
- [Feature Request](CONTRIBUTING.md#feature-request)
|
96
|
+
- [Bug Reports](CONTRIBUTING.md#submit-a-bug-report)
|
97
|
+
- [Improvements to the Codebase](CONTRIBUTING.md#improvements-to-the-codebase)
|
98
|
+
- [Review Pull Requests](CONTRIBUTING.md#code-reviews)
|
106
99
|
|
107
100
|
<a name="about"></a>
|
108
101
|
# About
|
109
102
|
|
110
|
-
ruby-http-client is
|
103
|
+
ruby-http-client is maintained and funded by Twilio SendGrid, Inc. The names and logos for ruby-http-client are trademarks of Twilio SendGrid, Inc.
|
104
|
+
|
105
|
+
If you need help installing or using the library, please check the [Twilio SendGrid Support Help Center](https://support.sendgrid.com).
|
111
106
|
|
112
|
-
|
107
|
+
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
|
113
108
|
|
114
109
|
# License
|
115
|
-
[The MIT License (MIT)](LICENSE
|
110
|
+
[The MIT License (MIT)](LICENSE)
|
data/lib/ruby_http_client.rb
CHANGED
@@ -227,7 +227,9 @@ module SendGrid
|
|
227
227
|
def build_http(host, port)
|
228
228
|
params = [host, port]
|
229
229
|
params += @proxy_options.values_at(:host, :port, :user, :pass) unless @proxy_options.empty?
|
230
|
-
add_ssl(Net::HTTP.new(*params))
|
230
|
+
http = add_ssl(Net::HTTP.new(*params))
|
231
|
+
http = add_http_options(http) unless @http_options.empty?
|
232
|
+
http
|
231
233
|
end
|
232
234
|
|
233
235
|
# Allow for https calls
|
@@ -245,6 +247,20 @@ module SendGrid
|
|
245
247
|
http
|
246
248
|
end
|
247
249
|
|
250
|
+
# Add others http options to http object
|
251
|
+
#
|
252
|
+
# * *Args* :
|
253
|
+
# - +http+ -> HTTP::NET object
|
254
|
+
# * *Returns* :
|
255
|
+
# - HTTP::NET object
|
256
|
+
#
|
257
|
+
def add_http_options(http)
|
258
|
+
@http_options.each do |attribute, value|
|
259
|
+
http.send("#{attribute}=", value)
|
260
|
+
end
|
261
|
+
http
|
262
|
+
end
|
263
|
+
|
248
264
|
# Add variable values to the url.
|
249
265
|
# (e.g. /your/api/{variable_value}/call)
|
250
266
|
# Another example: if you have a ruby reserved word, such as true,
|
data/ruby_http_client.gemspec
CHANGED
@@ -3,9 +3,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'ruby_http_client'
|
6
|
-
spec.version = '3.5.
|
6
|
+
spec.version = '3.5.4'
|
7
7
|
spec.authors = ['Elmer Thomas']
|
8
|
-
spec.email = '
|
8
|
+
spec.email = 'help@twilio.com'
|
9
9
|
spec.summary = 'A simple REST client'
|
10
10
|
spec.description = 'Quickly and easily access any REST or REST-like API.'
|
11
11
|
spec.homepage = 'http://github.com/sendgrid/ruby-http-client'
|
@@ -18,6 +18,5 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.add_development_dependency 'codecov'
|
19
19
|
spec.add_development_dependency 'minitest'
|
20
20
|
spec.add_development_dependency 'rake'
|
21
|
-
spec.add_development_dependency '
|
22
|
-
spec.add_development_dependency 'simplecov'
|
21
|
+
spec.add_development_dependency 'simplecov', '~> 0.18.5'
|
23
22
|
end
|
Binary file
|
Binary file
|
data/test/test_helper.rb
CHANGED
@@ -253,6 +253,14 @@ class TestClient < Minitest::Test
|
|
253
253
|
assert_equal(http.verify_mode, OpenSSL::SSL::VERIFY_PEER)
|
254
254
|
end
|
255
255
|
|
256
|
+
def test_add_http_options
|
257
|
+
uri = URI.parse('https://localhost:4010')
|
258
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
259
|
+
http = @client_with_options.add_http_options(http)
|
260
|
+
assert_equal(http.open_timeout, 60)
|
261
|
+
assert_equal(http.read_timeout, 60)
|
262
|
+
end
|
263
|
+
|
256
264
|
def test__
|
257
265
|
url1 = @client._('test')
|
258
266
|
assert_equal(['test'], url1.url_path)
|
@@ -348,12 +356,8 @@ class TestClient < Minitest::Test
|
|
348
356
|
assert(File.file?('./.gitignore'))
|
349
357
|
end
|
350
358
|
|
351
|
-
def
|
352
|
-
assert(File.file?('./.
|
353
|
-
end
|
354
|
-
|
355
|
-
def test_codeclimate_exists
|
356
|
-
assert(File.file?('./.codeclimate.yml'))
|
359
|
+
def test_gh_actions_exists
|
360
|
+
assert(File.file?('./.github/workflows/test-and-deploy.yml'))
|
357
361
|
end
|
358
362
|
|
359
363
|
def test_changelog_exists
|
@@ -373,7 +377,7 @@ class TestClient < Minitest::Test
|
|
373
377
|
end
|
374
378
|
|
375
379
|
def test_license_exists
|
376
|
-
assert(File.file?('./LICENSE
|
380
|
+
assert(File.file?('./LICENSE'))
|
377
381
|
end
|
378
382
|
|
379
383
|
def test_pull_request_template_exists
|
@@ -393,7 +397,7 @@ class TestClient < Minitest::Test
|
|
393
397
|
end
|
394
398
|
|
395
399
|
def test_license_date_is_updated
|
396
|
-
license_end_year = IO.read('LICENSE
|
400
|
+
license_end_year = IO.read('LICENSE').match(/Copyright \(C\) (\d{4}), Twilio SendGrid/)[1].to_i
|
397
401
|
current_year = Time.new.year
|
398
402
|
assert_equal(current_year, license_end_year)
|
399
403
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_http_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elmer Thomas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|
@@ -52,51 +52,39 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: simplecov
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- - "
|
59
|
+
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
61
|
+
version: 0.18.5
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- - "
|
66
|
+
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
68
|
+
version: 0.18.5
|
83
69
|
description: Quickly and easily access any REST or REST-like API.
|
84
|
-
email:
|
70
|
+
email: help@twilio.com
|
85
71
|
executables: []
|
86
72
|
extensions: []
|
87
73
|
extra_rdoc_files: []
|
88
74
|
files:
|
89
|
-
- ".codeclimate.yml"
|
90
75
|
- ".env_sample"
|
76
|
+
- ".github/ISSUE_TEMPLATE/config.yml"
|
77
|
+
- ".github/workflows/test-and-deploy.yml"
|
91
78
|
- ".gitignore"
|
92
79
|
- ".rubocop.yml"
|
93
|
-
- ".
|
80
|
+
- ".rubocop_todo.yml"
|
94
81
|
- CHANGELOG.md
|
95
82
|
- CODE_OF_CONDUCT.md
|
96
83
|
- CONTRIBUTING.md
|
84
|
+
- FIRST_TIMERS.md
|
97
85
|
- Gemfile
|
98
86
|
- ISSUE_TEMPLATE.md
|
99
|
-
- LICENSE
|
87
|
+
- LICENSE
|
100
88
|
- Makefile
|
101
89
|
- PULL_REQUEST_TEMPLATE.md
|
102
90
|
- README.md
|
@@ -104,11 +92,13 @@ files:
|
|
104
92
|
- TROUBLESHOOTING.md
|
105
93
|
- USAGE.md
|
106
94
|
- examples/example.rb
|
107
|
-
- first-timers.md
|
108
95
|
- lib/ruby_http_client.rb
|
109
96
|
- ruby_http_client.gemspec
|
97
|
+
- static/img/github-fork.png
|
98
|
+
- static/img/github-sign-up.png
|
110
99
|
- test/test_helper.rb
|
111
100
|
- test/test_ruby_http_client.rb
|
101
|
+
- twilio_sendgrid_logo.png
|
112
102
|
- use_cases/README.md
|
113
103
|
homepage: http://github.com/sendgrid/ruby-http-client
|
114
104
|
licenses:
|
@@ -129,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
119
|
- !ruby/object:Gem::Version
|
130
120
|
version: '0'
|
131
121
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.3.3
|
133
123
|
signing_key:
|
134
124
|
specification_version: 4
|
135
125
|
summary: A simple REST client
|
data/.codeclimate.yml
DELETED
data/.travis.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
env:
|
2
|
-
global:
|
3
|
-
- CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID
|
4
|
-
language: ruby
|
5
|
-
rvm:
|
6
|
-
- ruby-head
|
7
|
-
- 2.7
|
8
|
-
- 2.6
|
9
|
-
- 2.5
|
10
|
-
- 2.4
|
11
|
-
- jruby
|
12
|
-
before_install:
|
13
|
-
- gem install minitest
|
14
|
-
- gem install simplecov
|
15
|
-
- gem install codecov
|
16
|
-
before_script:
|
17
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
|
18
|
-
> ./cc-test-reporter
|
19
|
-
- chmod +x ./cc-test-reporter
|
20
|
-
- "./cc-test-reporter before-build"
|
21
|
-
script:
|
22
|
-
- rake
|
23
|
-
after_script:
|
24
|
-
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
|
25
|
-
deploy:
|
26
|
-
provider: rubygems
|
27
|
-
api_key:
|
28
|
-
secure: ubaCqrwnHN4TzLhFyM7/2WPicNya2FSeKbZiG9zqGGTklTNi3T/pP1BUDdVQGNSOsvBl/s20P6M+aKL6KTH9t4JpS4laFgI3iwBWyg4Q4fcchDMOrtMaChR7FvIfvOOFcCQYvvMB/U+Mr9GSnKkVHmcu2JQgZM/kBSst3FymAQeRa8+64IKg2s/DjPejT4aTvyuqJ75xN+pkCbv36KHic1jrKZgpSdWZ7UaOZfBJ7xdReCXYXignKFJs1240O1yfIyikFrgTs75Ch7/OmI792CaFIKIvODg97wYlCnu0FYCOxNfZw2JVwp+oYqXRkI5l2ljXWFvjPxdckGSP7rM4lL9GxSgVqgqBd1orXyab2Ad+POlbx97wEmoYLbIF4BHGoe7nXV7BXquQDWIm2o5vx5RxenTnWMOZNLbRBVUAdRbxrxW8iQhTRs+jjeJu3Cj9alWd7UPB/t2v8/c9MpOCNdH+QyAJW6dvZrKTyy75CofGAYbzezp2DA91IXAELiFQaPhCXXzkOTVHCh9+mBYG7b0t1iXQoN+MMcyQ3q89coZDxI1l77keNPbj8GcQQ35fRxRhmgsID+mQfuYXgkx8aTs5MYwJWy+sxyOrEBMAyehDhdk0JZjJdYhgsh+zIqfpy9meZIxNxNQ7+s1EGoFW4RggKark2t9Y8NML7hX+xIc=
|
29
|
-
gem: ruby_http_client
|
30
|
-
on:
|
31
|
-
tags: true
|
32
|
-
rvm: '2.4'
|
33
|
-
skip_cleanup: true
|
data/first-timers.md
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# How To Contribute to ruby-http-client for first-timers
|
2
|
-
|
3
|
-
We know that contributing to an open source project for the first time can be intimidating.
|
4
|
-
|
5
|
-
This documentation serves to guide you on how to make your first contribution.
|
6
|
-
|
7
|
-
Assuming you already have a [Github account](https://github.com/join), here are the steps to make your first contribution:
|
8
|
-
|
9
|
-
## Finding a task you can handle
|
10
|
-
|
11
|
-
We label our issues according to their difficulty level. You can find easy ones [here](https://github.com/sendgrid/ruby-http-client/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+easy%22) but feel free to explore other labels too.
|
12
|
-
|
13
|
-
- [Medium labeled issues](https://github.com/sendgrid/ruby-http-client/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+medium%22)
|
14
|
-
- [Hard labeled issues](https://github.com/sendgrid/ruby-http-client/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+hard%22)
|
15
|
-
|
16
|
-
|
17
|
-
## Creating a Pull Request<a name="creating-a-pull-request"></a>
|
18
|
-
|
19
|
-
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
|
20
|
-
and configure the remotes:
|
21
|
-
|
22
|
-
```bash
|
23
|
-
# Clone your fork of the repo into the current directory
|
24
|
-
git clone https://github.com/sendgrid/ruby-http-client
|
25
|
-
# Navigate to the newly cloned directory
|
26
|
-
cd ruby-http-client
|
27
|
-
# Assign the original repo to a remote called "upstream"
|
28
|
-
git remote add upstream https://github.com/sendgrid/ruby-http-client
|
29
|
-
```
|
30
|
-
|
31
|
-
2. If you cloned a while ago, get the latest changes from upstream:
|
32
|
-
|
33
|
-
```bash
|
34
|
-
git checkout <dev-branch>
|
35
|
-
git pull upstream <dev-branch>
|
36
|
-
```
|
37
|
-
|
38
|
-
3. Create a new topic branch (off of the main project development branch) to
|
39
|
-
contain your feature, change, or fix:
|
40
|
-
|
41
|
-
```bash
|
42
|
-
git checkout -b <topic-branch-name>
|
43
|
-
```
|
44
|
-
|
45
|
-
4. Commit your changes in logical chunks. Please adhere to these [git commit
|
46
|
-
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
47
|
-
or your code is unlikely be merged into the main project. Use Git's
|
48
|
-
[interactive rebase](https://help.github.com/articles/interactive-rebase)
|
49
|
-
feature to tidy up your commits before making them public.
|
50
|
-
|
51
|
-
4a. Create tests.
|
52
|
-
|
53
|
-
4b. Create or update the example code that demonstrates the functionality of this change to the code.
|
54
|
-
|
55
|
-
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
56
|
-
|
57
|
-
```bash
|
58
|
-
git pull [--rebase] upstream master
|
59
|
-
```
|
60
|
-
|
61
|
-
6. Push your topic branch up to your fork:
|
62
|
-
|
63
|
-
```bash
|
64
|
-
git push origin <topic-branch-name>
|
65
|
-
```
|
66
|
-
|
67
|
-
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
|
68
|
-
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
|
69
|
-
|
70
|
-
If you have any additional questions, please feel free to [email](mailto:dx@sendgrid.com) us or create an issue in this repo.
|