diff --git a/.travis.yml b/.travis.yml index 31d2ae8..a7549d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ rvm: - 1.9.3 - 2.0.0 - 2.1 + - 2.2 - ruby-head - rbx-2 - jruby diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..40f4dd1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,99 @@ +Contributing to Rails Html Sanitizers +===================== + +[![Build Status](https://travis-ci.org/rails/rails-html-sanitizer.svg?branch=master)](https://travis-ci.org/rails/rails-html-sanitizer) + +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). + +#### Fork the Project + +Fork the [project on Github](https://github.com/rails/rails-html-sanitizer) and check out your copy. + +``` +git clone https://github.com/contributor/rails-html-sanitizer.git +cd rails-html-sanitizer +git remote add upstream https://github.com/rails/rails-html-sanitizer.git +``` + +#### Create a Topic Branch + +Make sure your fork is up-to-date and create a topic branch for your feature or bug fix. + +``` +git checkout master +git pull upstream master +git checkout -b my-feature-branch +``` + +#### Bundle Install and Test + +Ensure that you can build the project and run tests. + +``` +bundle install +bundle exec rake test +``` + +#### Write Tests + +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). + +We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix. + +#### Write Code + +Implement your feature or bug fix. + +Make sure that `bundle exec rake test` completes without errors. + +#### Write Documentation + +Document any external behavior in the [README](README.md). + +#### Commit Changes + +Make sure git knows your name and email address: + +``` +git config --global user.name "Your Name" +git config --global user.email "contributor@example.com" +``` + +Writing good commit logs is important. A commit log should describe what changed and why. + +``` +git add ... +git commit +``` + +#### Push + +``` +git push origin my-feature-branch +``` + +#### Make a Pull Request + +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. + +#### Rebase + +If you've been working on a change for a while, rebase with upstream/master. + +``` +git fetch upstream +git rebase upstream/master +git push origin my-feature-branch -f +``` + +#### Check on Your Pull Request + +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. + +#### Be Patient + +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! + +#### Thank You + +Please do know that we really appreciate and value your time and work. We love you, really. diff --git a/LICENSE.txt b/MIT-LICENSE similarity index 93% rename from LICENSE.txt rename to MIT-LICENSE index 378be8e..330b78b 100644 --- a/LICENSE.txt +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013 Rafael Mendonça França, Kasper Timm Hansen +Copyright (c) 2013-2015 Rafael Mendonça França, Kasper Timm Hansen MIT License @@ -20,3 +20,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/README.md b/README.md index 5a42e13..371a0ac 100644 --- a/README.md +++ b/README.md @@ -132,10 +132,11 @@ The `node` argument passed to some methods in a custom scrubber is an instance o - [`Nokogiri::XML::Node`](http://nokogiri.org/Nokogiri/XML/Node.html) - [Nokogiri](http://nokogiri.org) -## Contributing +## Contributing to Rails Html Sanitizers -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request +Rails Html Sanitizers is work of many contributors. You're encouraged to submit pull requests, propose features and discuss issues. + +See [CONTRIBUTING](CONTRIBUTING.md). + +## License +Rails Html Sanitizers is released under the [MIT License](MIT-LICENSE).