Skip to content

Commit 5c6f7ac

Browse files
Update to comply with SendGrid's open source policies
1 parent d75462e commit 5c6f7ac

File tree

5 files changed

+316
-214
lines changed

5 files changed

+316
-214
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
3+
34
This project adheres to [Semantic Versioning](http://semver.org/).
45

56
## [1.0.0] - 2016-04-15

CONTRIBUTING.md

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
Hello! Thank you for choosing to help contribute to the java-http-client project. There are many ways you can contribute and help is always welcome.
2-
1+
Hello! Thank you for choosing to help contribute to one of the SendGrid open source projects. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
2+
3+
- [CLAs and CCLAs](#cla)
4+
- [Roadmap & Milestones](#roadmap)
5+
- [Feature Request](#feature_request)
6+
- [Submit a Bug Report](#submit_a_bug_report)
7+
- [Improvements to the Codebase](#improvements_to_the_codebase)
8+
- [Understanding the Code Base](#understanding_the_codebase)
9+
- [Testing](#testing)
10+
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11+
- [Creating a Pull Request](#creating_a_pull_request)
12+
13+
<a name="roadmap"></a>
314
We use [Milestones](https://github.com/sendgrid/java-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.
415

5-
* [Feature Request](#feature_request)
6-
* [Submit a Bug Report](#submit_a_bug_report)
7-
* [Improvements to the Codebase](#improvements_to_the_codebase)
8-
* [Understanding the Code Base](#understanding_the_codebase)
9-
* [Testing](#testing)
10-
* [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11-
* [Creating a Pull Request](#creating_a_pull_request)
16+
<a name="cla"></a>
17+
## CLAs and CCLAs
18+
19+
Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) or a SendGrid Company Contributor Licensing Agreement (CCLA) be filled out by every contributor to a SendGrid open source project.
20+
21+
Our goal with the CLA and CCLA 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 and CCLA encourage broad participation by our open source community and help us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
22+
23+
SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA (or CCLA). Copies of the CLA and CCLA are available [here](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view).
24+
25+
You may submit your completed [CLA or CCLA](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view) to SendGrid at [[email protected]](mailto:[email protected]). SendGrid will then confirm you are ready to begin making contributions.
1226

1327
There are a few ways to contribute, which we'll enumerate below:
1428

@@ -37,47 +51,25 @@ Before you decide to create a new issue, please try the following:
3751

3852
### Please use our Bug Report Template
3953

40-
In order to make the process easier, we've included a sample bug report template (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
41-
42-
```
43-
Short and descriptive example bug report title
44-
45-
#### Issue Summary
46-
47-
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
48-
49-
50-
#### Steps to Reproduce
51-
52-
1. This is the first step
53-
2. This is the second step
54-
3. Further steps, etc.
55-
56-
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
57-
58-
#### Technical details:
59-
60-
* java-http-client Version: master (latest commit: [commit number])
61-
* Java Version: 1.7.0_60
62-
```
54+
In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/java-http-client/.github/ISSUE_TEMPLATE) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
6355

6456
<a name="improvements_to_the_codebase"></a>
6557
## Improvements to the Codebase
6658

67-
We welcome direct contributions to the rest code base. Thank you!
59+
We welcome direct contributions to the java-http-client code base. Thank you!
6860

6961
### Development Environment ###
7062

71-
#### Install and run locally ####
63+
#### Install and Run Locally ####
7264

7365
##### Prerequisites #####
7466

75-
* Java 1.7 and up
76-
* Please see [pom.xml](https://github.com/sendgrid/java-http-client/blob/master/pom.xml)
67+
- Java 1.7 and up
68+
- Please see [build.gradle](https://github.com/sendgrid/java-http-client/blob/master/build.gradle)
7769

7870
##### Initial setup: #####
7971

80-
```
72+
```bash
8173
git clone https://github.com/sendgrid/java-http-client.git
8274
cd java-http-client
8375
```
@@ -88,26 +80,27 @@ See the [examples folder](https://github.com/sendgrid/java-http-client/tree/mast
8880

8981
You will need to setup the following environment to use the SendGrid example:
9082

91-
```
83+
```bash
9284
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
9385
echo "sendgrid.env" >> .gitignore
9486
source ./sendgrid.env
95-
node examples/example.js
9687
```
9788

98-
<a name="understanding_the_codebase"></a>
99-
## Understanding the Code Base
100-
101-
**/examples**
102-
103-
Working examples that demonstrate usage. To run the example code:
104-
10589
```bash
10690
mvn package
10791
cd ../examples
10892
javac -classpath ./commons-logging-1.2.jar:./httpcore-4.4.4.jar:./httpclient-4.5.2.jar:./jackson-databind-2.7.3.jar:./jackson-annotations-2.7.0.jar:./jackson-core-2.7.3.jar:../target/http-1.0-SNAPSHOT.jar:. Example.java && java -classpath ./commons-logging-1.2.jar:./httpcore-4.4.4.jar:./httpclient-4.5.2.jar:./jackson-databind-2.7.3.jar:./jackson-annotations-2.7.0.jar:./jackson-core-2.7.3.jar:../target/http-1.0-SNAPSHOT.jar:. Example
10993
```
11094

95+
<a name="understanding_the_codebase"></a>
96+
## Understanding the Code Base
97+
98+
<!---optionally provide a brief summary explaning the architecture of the code--->
99+
100+
**/examples**
101+
102+
Working examples that demonstrate usage.
103+
111104
**Client.java**
112105

113106
The main function that does the heavy lifting (and external entry point) is `api`.
@@ -129,11 +122,12 @@ Provides a standard interface to an API's response.
129122

130123
All PRs require passing tests before the PR will be reviewed.
131124

132-
All test files are in `[http/src/test/java/com/sendgrid](https://github.com/sendgrid/java-http-client/blob/master/src/test/java/com/sendgrid/ClientTest.java)`.
125+
All test files are in [`http/src/test/java/com/sendgrid`](https://github.com/sendgrid/java-http-client/blob/master/src/test/java/com/sendgrid/ClientTest.java).
133126

134127
For the purposes of contributing to this repo, please update the [`ClientTest.java`](https://github.com/sendgrid/java-http-client/blob/master/src/test/java/com/sendgrid/ClientTest.java) file with unit tests as you modify the code.
135128

136-
Run the test:
129+
130+
Run the tests:
137131

138132
```java
139133
./gradlew test -i
@@ -144,13 +138,11 @@ Run the test:
144138

145139
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.
146140

147-
Please run your code through [FindBugs](http://findbugs.sourceforge.net/) and [CheckStyle](http://checkstyle.sourceforge.net/) with [Google's Java Style Guide](http://checkstyle.sourceforge.net/reports/google-java-style.html).
141+
Please run your code through:
148142

149-
### Directory Structure
143+
- [FindBugs](http://findbugs.sourceforge.net/)
144+
- [CheckStyle](http://checkstyle.sourceforge.net/) with [Google's Java Style Guide](http://checkstyle.sourceforge.net/reports/google-java-style.html).
150145

151-
* `examples/` for example calls
152-
* `src/main/java/com/sendgrid` for the main source code
153-
* `src/test/java/com/sendgrid` for the unit tests
154146

155147
## Creating a Pull Request<a name="creating_a_pull_request"></a>
156148

@@ -161,7 +153,7 @@ Please run your code through [FindBugs](http://findbugs.sourceforge.net/) and [C
161153
# Clone your fork of the repo into the current directory
162154
git clone https://github.com/sendgrid/java-http-client
163155
# Navigate to the newly cloned directory
164-
cd java-http-client
156+
cd sendgrid-python
165157
# Assign the original repo to a remote called "upstream"
166158
git remote add upstream https://github.com/sendgrid/java-http-client
167159
```
@@ -205,4 +197,4 @@ Please run your code through [FindBugs](http://findbugs.sourceforge.net/) and [C
205197
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
206198
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
207199

208-
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.
200+
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.

CONTRIBUTING_old.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
Hello! Thank you for choosing to help contribute to the java-http-client project. There are many ways you can contribute and help is always welcome.
2+
3+
We use [Milestones](https://github.com/sendgrid/java-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.
4+
5+
* [Feature Request](#feature_request)
6+
* [Submit a Bug Report](#submit_a_bug_report)
7+
* [Improvements to the Codebase](#improvements_to_the_codebase)
8+
* [Understanding the Code Base](#understanding_the_codebase)
9+
* [Testing](#testing)
10+
* [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11+
* [Creating a Pull Request](#creating_a_pull_request)
12+
13+
There are a few ways to contribute, which we'll enumerate below:
14+
15+
<a name="feature_request"></a>
16+
## Feature Request
17+
18+
If you'd like to make a feature request, please read this section.
19+
20+
The GitHub issue tracker is the preferred channel for library feature requests, but please respect the following restrictions:
21+
22+
- Please **search for existing issues** in order to ensure we don't have duplicate bugs/feature requests.
23+
- Please be respectful and considerate of others when commenting on issues
24+
25+
<a name="submit_a_bug_report"></a>
26+
## Submit a Bug Report
27+
28+
Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
29+
30+
A software bug is a demonstrable issue in the code base. In order for us to diagnose the issue and respond as quickly as possible, please add as much detail as possible into your bug report.
31+
32+
Before you decide to create a new issue, please try the following:
33+
34+
1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
35+
2. Update to the latest version of this code and check if issue has already been fixed
36+
3. Copy and fill in the Bug Report Template we have provided below
37+
38+
### Please use our Bug Report Template
39+
40+
In order to make the process easier, we've included a sample bug report template (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
41+
42+
```
43+
Short and descriptive example bug report title
44+
45+
#### Issue Summary
46+
47+
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
48+
49+
50+
#### Steps to Reproduce
51+
52+
1. This is the first step
53+
2. This is the second step
54+
3. Further steps, etc.
55+
56+
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
57+
58+
#### Technical details:
59+
60+
* java-http-client Version: master (latest commit: [commit number])
61+
* Java Version: 1.7.0_60
62+
```
63+
64+
<a name="improvements_to_the_codebase"></a>
65+
## Improvements to the Codebase
66+
67+
We welcome direct contributions to the rest code base. Thank you!
68+
69+
### Development Environment ###
70+
71+
#### Install and run locally ####
72+
73+
##### Prerequisites #####
74+
75+
* Java 1.7 and up
76+
* Please see [pom.xml](https://github.com/sendgrid/java-http-client/blob/master/pom.xml)
77+
78+
##### Initial setup: #####
79+
80+
```
81+
git clone https://github.com/sendgrid/java-http-client.git
82+
cd java-http-client
83+
```
84+
85+
##### Execute: #####
86+
87+
See the [examples folder](https://github.com/sendgrid/java-http-client/tree/master/examples) to get started quickly.
88+
89+
You will need to setup the following environment to use the SendGrid example:
90+
91+
```
92+
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
93+
echo "sendgrid.env" >> .gitignore
94+
source ./sendgrid.env
95+
node examples/example.js
96+
```
97+
98+
<a name="understanding_the_codebase"></a>
99+
## Understanding the Code Base
100+
101+
**/examples**
102+
103+
Working examples that demonstrate usage. To run the example code:
104+
105+
```bash
106+
mvn package
107+
cd ../examples
108+
javac -classpath ./commons-logging-1.2.jar:./httpcore-4.4.4.jar:./httpclient-4.5.2.jar:./jackson-databind-2.7.3.jar:./jackson-annotations-2.7.0.jar:./jackson-core-2.7.3.jar:../target/http-1.0-SNAPSHOT.jar:. Example.java && java -classpath ./commons-logging-1.2.jar:./httpcore-4.4.4.jar:./httpclient-4.5.2.jar:./jackson-databind-2.7.3.jar:./jackson-annotations-2.7.0.jar:./jackson-core-2.7.3.jar:../target/http-1.0-SNAPSHOT.jar:. Example
109+
```
110+
111+
**Client.java**
112+
113+
The main function that does the heavy lifting (and external entry point) is `api`.
114+
115+
**Method.java**
116+
117+
These are the supported Methods.
118+
119+
**Request.java**
120+
121+
Provides a standard interface to an API's HTTP request.
122+
123+
**Response.java**
124+
125+
Provides a standard interface to an API's response.
126+
127+
<a name="testing"></a>
128+
## Testing
129+
130+
All PRs require passing tests before the PR will be reviewed.
131+
132+
All test files are in `[http/src/test/java/com/sendgrid](https://github.com/sendgrid/java-http-client/blob/master/src/test/java/com/sendgrid/ClientTest.java)`.
133+
134+
For the purposes of contributing to this repo, please update the [`ClientTest.java`](https://github.com/sendgrid/java-http-client/blob/master/src/test/java/com/sendgrid/ClientTest.java) file with unit tests as you modify the code.
135+
136+
Run the test:
137+
138+
```java
139+
./gradlew test -i
140+
```
141+
142+
<a name="style_guidelines_and_naming_conventions"></a>
143+
## Style Guidelines & Naming Conventions
144+
145+
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.
146+
147+
Please run your code through [FindBugs](http://findbugs.sourceforge.net/) and [CheckStyle](http://checkstyle.sourceforge.net/) with [Google's Java Style Guide](http://checkstyle.sourceforge.net/reports/google-java-style.html).
148+
149+
### Directory Structure
150+
151+
* `examples/` for example calls
152+
* `src/main/java/com/sendgrid` for the main source code
153+
* `src/test/java/com/sendgrid` for the unit tests
154+
155+
## Creating a Pull Request<a name="creating_a_pull_request"></a>
156+
157+
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
158+
and configure the remotes:
159+
160+
```bash
161+
# Clone your fork of the repo into the current directory
162+
git clone https://github.com/sendgrid/java-http-client
163+
# Navigate to the newly cloned directory
164+
cd java-http-client
165+
# Assign the original repo to a remote called "upstream"
166+
git remote add upstream https://github.com/sendgrid/java-http-client
167+
```
168+
169+
2. If you cloned a while ago, get the latest changes from upstream:
170+
171+
```bash
172+
git checkout <dev-branch>
173+
git pull upstream <dev-branch>
174+
```
175+
176+
3. Create a new topic branch (off the main project development branch) to
177+
contain your feature, change, or fix:
178+
179+
```bash
180+
git checkout -b <topic-branch-name>
181+
```
182+
183+
4. Commit your changes in logical chunks. Please adhere to these [git commit
184+
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
185+
or your code is unlikely be merged into the main project. Use Git's
186+
[interactive rebase](https://help.github.com/articles/interactive-rebase)
187+
feature to tidy up your commits before making them public.
188+
189+
4a. Create tests.
190+
191+
4b. Create or update the example code that demonstrates the functionality of this change to the code.
192+
193+
5. Locally merge (or rebase) the upstream development branch into your topic branch:
194+
195+
```bash
196+
git pull [--rebase] upstream master
197+
```
198+
199+
6. Push your topic branch up to your fork:
200+
201+
```bash
202+
git push origin <topic-branch-name>
203+
```
204+
205+
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
206+
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
207+
208+
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.

0 commit comments

Comments
 (0)