Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Context
<!-- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

## Expected Behavior
<!-- Tell us what should happen -->

## Actual Behavior
<!-- Tell us what happens instead -->

## Steps to Reproduce
<!-- Provide a link to a live example, or an unambiguous set of steps to reproduce. -->
<!-- Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Notes
<!--- How has this bug affected you? What were you trying to accomplish? Anything else you think is relevant? -->

## Your Environment
- Package Version:
- Environment (Go version, Glide version, etc):
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Checklist
<!-- Your PR will get more attention if you did these. -->

- [ ] Added Tests
- [ ] Tests Pass
- [ ] Squashed Commits

## What
<!-- What need is it addressing? How does it fit into the overall design of the package?-->


## Why
<!-- Why is this change needed? What couldn't you do before that this change enables you to do now? -->


## Notes
<!-- What other implementations did you consider? Did you have to make any trade-offs in this implementation? -->
<!-- What else should we know before we review your PR? -->


## Related Issues
<!-- If the issue was already reported, reference the issue(s) here -->

fixes #
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing

First of all, thank you for wanting to contibute to a Hyperdriven project! :raised_hands:

We welcome and encourage contibutions (no matter how big or small) from **everyone**. By participating, you agree to abide by [our code of conduct](https://hyperdriven.net/code-of-conduct/).

## Ways You Can Contribute

- [Submit a Pull Request](#pull-requests) :octocat: :shipit:
- [Edit the Wiki](https://github.com/hyperdriven/hyperdrive/wiki) :pencil:
- [Report a Bug](https://github.com/hyperdriven/hyperdrive/issues/new?labels=bug) :beetle:
- [Suggest a Feature](https://github.com/hyperdriven/hyperdrive/issues/new?labels=enhancement) :bulb:
- [Get Involved in The Community](https://hyperdriven.net/community/) :busts_in_silhouette:
- [Tell us](mailto:hello@hypedriven.net) about your _hyperdriven API_. :mailbox_with_mail:
- Write about us on your blog or social media! :mega:

## Pull Requests

1. [Fork the repo](https://github.com/hyperdriven/hyperdrive#fork-destination-box)

2. Clone your fork:

git clone git@github.com:your-username/hyperdrive.git

3. Set up your machine:

./scripts/setup

4. Install dependencies:

./scripts/install

5. Make sure the tests pass:

./scripts/test

6. Make your change. Add tests, and ensure the tests pass:

./scripts/test

7. Commit your changes (squash your commits, if needed), push your fork, and [submit a pull request](https://github.com/hyperdriven/hyperdrive/compare/)

At this point you're waiting on us. We will try to review your submissions within three days -- typically sooner than that. We may suggest some changes, improvements or alternative approaches -- please be open to feedback, as we have to consider how your change fits into the over all design and vision of the project.

Some things that will increase the chance that your pull request is accepted:

- Break unrelated changes up into multiple pull requests -- our change log is generated automatically from merged pull requests.
- Add your changes to one of the existing files in our package, unless you are introducing an entirely new concept (in which case, you can create a new file).
- Write tests. We use [testify](https://github.com/stretchr/testify) for our unit tests.
- Follow the Golang [style guide](https://github.com/golang/go/wiki/CodeReviewComments).
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,26 @@ An opinionated micro-framework for creating Hypermedia APIs in Go.
OR

glide get github.com/hyperdriven/hyperdrive

## Import

## Config
import "github.com/hyperdriven/hyperdrive"

## Usage

Refer to our [Quick Start Guide](https://hyperdriven.net/quick-start/) for how to use this package.

## Config

Configuration of core features are done via Environment Variables, in accordence with [12 factor](https://12factor.net/config) principles.
Configuration of core features are done via Environment Variables, in accordence with [12 factor](https://12factor.net/config) principles, and is [detailed here](https://hyperdriven.net/configuration/)

- `HYPERDRIVE_ENV`: (default: `development`, type: `string`) The stage in your deployment pipeline the api is currently running in. A value of `production` changes behviour for some features (such as whether stack traces are logged during panic recovery). Other values, such as `staging`, can be used but currently have no meanin in the framework other than the one you give it in your own code.
- `PORT`: (default: `5000`, type: `int`) The port the server should listen on.
- `GZIP_LEVEL`: (default: `-1`, type: `int`) Accepts a value between `-2` and `9`. Invalid values will be silently discarded and the default of `-1` will be used. More info on compression levels can be found in the docs, but corresponds to `zlib` compression levels.
- `CORS_ENABLED`: (default: `true`, type: `bool`) Set this to `false` to disable CORS support.
- `CORS_HEADERS`: (type: `string`) A comma-seperated list of headers to allow and expose during CORS requests. These will be appended to the default set of headers that are always allowed: `Accept`, `Accept-Language`, `Content-Language`, and `Content-Type`.
- `CORS_ORIGINS`: (default: `*`, type: `string`) A comma-seperated list of origins to allow during CORS requests. These will replace the default value, which is to allow all origins.
- `CORS_CREDENTIALS`: (default: `true`, type: `bool`) Set this to `false` to disable authenticated CORS requests.
## Contributing

## Docs
Refer to our [Contributor's Guide](https://hyperdriven.net/contributing/) to learn more about how you can partipicate.

## More Info

- [Hyperdriven.net](https://hyperdriven.net/)
- [GoDoc](https://godoc.org/github.com/hyperdriven/hyperdrive)
- [Wiki](https://github.com/hyperdriven/hyperdrive/wiki)
- [Examples](https://github.com/hyperdriven/hyperdrive-examples)
- [Example APIs](https://github.com/hyperdriven/hyperdrive-examples)
9 changes: 9 additions & 0 deletions scripts/debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
set -e

go version
if which glide > /dev/null; then
glide -v
else
echo "glide not installed"
fi
10 changes: 8 additions & 2 deletions scripts/setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env sh
set -e

if which glide > /dev/null; then
# This script assumes you already have a proper go environment set up.

if which glide > /dev/null; then
echo "glide already installed"
else
go get -v github.com/Masterminds/glide
Expand All @@ -14,5 +16,9 @@ else
fi

if [ "$TRAVIS" != "true"]; then
gem install github_changelog_generator --no-ri --no-rdoc
if which gem > /dev/null; then
gem install github_changelog_generator --no-ri --no-rdoc
else
echo "gem comand not found, skipping installation of github_changelog_generator"
fi
fi