Skip to content

Commit 63ab938

Browse files
Preparing to launch
1 parent ce7ca6c commit 63ab938

22 files changed

+947
-8
lines changed

.github/ISSUE_TEMPLATE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### Issue Summary
2+
3+
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.
4+
5+
6+
#### Steps to Reproduce
7+
8+
1. This is the first step
9+
2. This is the second step
10+
3. Further steps, etc.
11+
12+
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?
13+
14+
#### Technical details:
15+
16+
* java-http-client Version: master (latest commit: [commit number])
17+
* Node.js Version: 1.7.0_60

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1111
hs_err_pid*
1212

13-
http/target/
13+
target/
14+
build/
15+
gradle.properties
16+
.gradle
17+
repo/

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: java
2+
sudo: false
3+
jdk:
4+
- oraclejdk8
5+
- oraclejdk7
6+
- openjdk7
7+
after_script:
8+
- "./gradlew build"
9+
- "./scripts/s3upload.sh"
10+
env:
11+
global:
12+
- S3_POLICY: ewogICJleHBpcmF0aW9uIjogIjIxMDAtMDEtMDFUMTI6MDA6MDAuMDAwWiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImFjbCI6ICJwdWJsaWMtcmVhZCIgfSwKICAgIHsiYnVja2V0IjogInNlbmRncmlkLW9wZW4tc291cmNlIiB9LAogICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInNlbmRncmlkLWphdmEvIl0sCiAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMjA0OCwgMjY4NDM1NDU2XSwKICAgIFsiZXEiLCAiJENvbnRlbnQtVHlwZSIsICJhcHBsaWNhdGlvbi96aXAiXQogIF0KfQo=
13+
- secure: Iki1btwhG1nlyjnEMu90Oh/hoatFpPiiKkqpj7siLnlLp2xbBQ2003jRsn30I3Vujes2ugvzdlHqBJ9lDwRvfGrKXcLlRvYuDQ24N2YKquEiKHUxs+iMOzTQj6Sf64KL5O0aSZd1l5rjWgsQ0qqjHW9u3l5bUjqxzrhAI2Js37U=
14+
- secure: Khi6a4z1lfZmDEDV738MOiWznRcTv5ILZUM+igEw2txX7PGX+B5909WridpAijTGiurJ6eda7jvsUgci8DTPQCXB18LD6N870hnPcSQkuI6zDAhKTx+w/ZsfPLWh28sP2CVzbqGdxaitZDKxRWaVmKnBZpyi8XI9UKjmyK2sjwE=
15+
- secure: wKXAjjBgCLM4h++nP1xDQQtYU10JbwwynY0XB920SoQjI2Uu82cMPtkEXFWTpzyIS2hE5B3qvu75VHNdLqDUtek3e3lBg5k3SpYgGin20dg3SDEJrvA4vlvcApdQ132pMEWdDOVwzbXhm9+JTjALYbc3fX+VAQX1u5daPyeDGC4=
16+
notifications:
17+
hipchat:
18+
rooms:
19+
secure: kJyc36IRkovqK3JuMXJuBBkDFkDfZ9iAE8ZziszzL9zNsfY2fAQWDk4bMrFO0yYW9OwRXl0gT97HVYWBZFDhjtstUJxit0lpUB+TNIDw2lqCkOIPxGKgcBB9mDS795QyLJzletObP/guPxbzSNOGLa6+k4GbTtTMXRhjzN6lF0o=
20+
template:
21+
- '<a href="https://travis-ci.org/sendgrid/%{repository}/builds/%{build_id}">%{repository}
22+
Build %{build_number}</a> on branch <i>%{branch}</i> by %{author}: <strong>%{message}</strong>
23+
<a href="https://github.com/sendgrid/%{repository}/commits/%{commit}">View on GitHub</a>'
24+
format: html
25+
notify: true

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## [1.0.0] - 2016-04-15
6+
### Added
7+
- We are live!

CONTRIBUTING.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)