Skip to content

Commit 7a09522

Browse files
committed
Add CONTRIBUTING.md [ci skip]
1 parent 9cbceb1 commit 7a09522

File tree

4 files changed

+109
-7
lines changed

4 files changed

+109
-7
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ rvm:
55
- 1.9.3
66
- 2.0.0
77
- 2.1
8+
- 2.2
89
- ruby-head
910
- rbx-2
1011
- jruby

CONTRIBUTING.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
Contributing to Rails Html Sanitizers
2+
=====================
3+
4+
[![Build Status](https://travis-ci.org/rails/rails-html-sanitizer.svg?branch=master)](https://travis-ci.org/rails/rails-html-sanitizer)
5+
6+
Rails Html Sanitizers is work of [many contributors](https://github.com/rails/rails-html-sanitizer/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/rails-html-sanitizer/pulls), [propose features and discuss issues](https://github.com/rails/rails-html-sanitizer/issues).
7+
8+
#### Fork the Project
9+
10+
Fork the [project on Github](https://github.com/rails/rails-html-sanitizer) and check out your copy.
11+
12+
```
13+
git clone https://github.com/contributor/rails-html-sanitizer.git
14+
cd rails-html-sanitizer
15+
git remote add upstream https://github.com/rails/rails-html-sanitizer.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/rails-html-sanitizer 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.txt MIT-LICENSE

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013 Rafael Mendonça França, Kasper Timm Hansen
1+
Copyright (c) 2013-2015 Rafael Mendonça França, Kasper Timm Hansen
22

33
MIT License
44

@@ -20,3 +20,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2020
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2121
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2222
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ The `node` argument passed to some methods in a custom scrubber is an instance o
132132
- [`Nokogiri::XML::Node`](http://nokogiri.org/Nokogiri/XML/Node.html)
133133
- [Nokogiri](http://nokogiri.org)
134134
135-
## Contributing
135+
## Contributing to Rails Html Sanitizers
136136
137-
1. Fork it
138-
2. Create your feature branch (`git checkout -b my-new-feature`)
139-
3. Commit your changes (`git commit -am 'Add some feature'`)
140-
4. Push to the branch (`git push origin my-new-feature`)
141-
5. Create new Pull Request
137+
Rails Html Sanitizers is work of many contributors. You're encouraged to submit pull requests, propose features and discuss issues.
138+
139+
See [CONTRIBUTING](CONTRIBUTING.md).
140+
141+
## License
142+
Rails Html Sanitizers is released under the [MIT License](MIT-LICENSE).

0 commit comments

Comments
 (0)