Skip to content

Commit 64d523f

Browse files
committed
Merge pull request #270 from maclover7/contributing
Add CONTRIBUTING.md
2 parents 87a0f8f + 3e6377b commit 64d523f

File tree

4 files changed

+107
-18
lines changed

4 files changed

+107
-18
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ sudo: false
55
rvm:
66
- 1.9.3
77
- 2.0.0
8-
- 2.1
9-
- 2.2.2
8+
- 2.1 # tests on latest 2.1.x
9+
- 2.2 # tests on latest 2.2.x
1010

1111
gemfile:
1212
- Gemfile

CONTRIBUTING.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
Contributing to Sprockets Rails
2+
=====================
3+
4+
[![Build Status](https://travis-ci.org/rails/sprockets-rails.svg?branch=master)](https://travis-ci.org/rails/sprockets-rails)
5+
6+
Sprockets Rails is work of [many contributors](https://github.com/rails/sprockets-rails/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/sprockets-rails/pulls), [propose features and discuss issues](https://github.com/rails/sprockets-rails/issues).
7+
8+
#### Fork the Project
9+
10+
Fork the [project on Github](https://github.com/rails/sprockets-rails) and check out your copy.
11+
12+
```
13+
git clone https://github.com/contributor/sprockets-rails.git
14+
cd sprockets-rails
15+
git remote add upstream https://github.com/rails/sprockets-rails.git
16+
```
17+
18+
#### Create a Topic Branch
19+
20+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
21+
22+
```
23+
git checkout master
24+
git pull upstream master
25+
git checkout -b my-feature-branch
26+
```
27+
28+
#### Bundle Install and Test
29+
30+
Ensure that you can build the project and run tests.
31+
32+
```
33+
bundle install
34+
bundle exec rake test
35+
```
36+
37+
#### Write Tests
38+
39+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [test](test).
40+
41+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
42+
43+
#### Write Code
44+
45+
Implement your feature or bug fix.
46+
47+
Make sure that `bundle exec rake test` completes without errors.
48+
49+
#### Write Documentation
50+
51+
Document any external behavior in the [README](README.md).
52+
53+
#### Commit Changes
54+
55+
Make sure git knows your name and email address:
56+
57+
```
58+
git config --global user.name "Your Name"
59+
git config --global user.email "[email protected]"
60+
```
61+
62+
Writing good commit logs is important. A commit log should describe what changed and why.
63+
64+
```
65+
git add ...
66+
git commit
67+
```
68+
69+
#### Push
70+
71+
```
72+
git push origin my-feature-branch
73+
```
74+
75+
#### Make a Pull Request
76+
77+
Go to https://github.com/contributor/sprockets-rails and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
78+
79+
#### Rebase
80+
81+
If you've been working on a change for a while, rebase with upstream/master.
82+
83+
```
84+
git fetch upstream
85+
git rebase upstream/master
86+
git push origin my-feature-branch -f
87+
```
88+
89+
#### Check on Your Pull Request
90+
91+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
92+
93+
#### Be Patient
94+
95+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
96+
97+
#### Thank You
98+
99+
Please do know that we really appreciate and value your time and work. We love you, really.

LICENSE renamed to MIT-LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 Joshua Peek
1+
Copyright (c) 2014-2015 Joshua Peek
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,12 @@ javascript_include_tag :application, integrity: true
140140
```
141141

142142

143-
## Contributing
143+
## Contributing to Sprockets Rails
144144

145-
Usual bundler workflow.
146-
147-
``` shell
148-
$ git clone https://github.com/rails/sprockets-rails.git
149-
$ cd sprockets-rails/
150-
$ bundle install
151-
$ bundle exec rake test
152-
```
153-
154-
[![Build Status](https://travis-ci.org/rails/sprockets-rails.svg?branch=master)](https://travis-ci.org/rails/sprockets-rails)
145+
Sprockets Rails is work of many contributors. You're encouraged to submit pull requests, propose
146+
features and discuss issues.
155147

148+
See [CONTRIBUTING](CONTRIBUTING.md).
156149

157150
## Releases
158151

@@ -164,9 +157,6 @@ The minor and patch version will be updated according to [semver](http://semver.
164157
* Any time the sprockets dependency is bumped, there will be a new minor release
165158
* Simple bug fixes will be patch releases
166159

167-
168160
## License
169161

170-
Copyright © 2014 Joshua Peek.
171-
172-
Released under the MIT license. See `LICENSE` for details.
162+
Sprockets Rails is released under the [MIT License](MIT-LICENSE).

0 commit comments

Comments
 (0)