From 34bd79aea0fc040654a37ba6496a80b8d4dc6aa0 Mon Sep 17 00:00:00 2001 From: Artem Krivonozhko Date: Thu, 31 May 2018 15:05:30 +0300 Subject: [PATCH 1/2] Add CONTRIBUTING.md --- CONTRIBUTING.md | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7c63963 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,118 @@ +Contributing to Mongoid-Search +=============================== + +Mongoid-Search is work of [many of contributors](https://github.com/mongoid/mongoid-search/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/mongoid/mongoid-search/pulls), [propose features, ask questions and discuss issues](https://github.com/mongoid/mongoid-search/issues). + +#### Fork the Project + +Fork the [project on Github](https://github.com/mongoid/mongoid-search) and check out your copy. + +``` +git clone https://github.com/contributor/mongoid-search.git +cd mongoid-search +git remote add upstream https://github.com/mongoid/mongoid-search.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 +``` + +#### 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 [spec/mongoid-search](spec/mongoid-search). + +We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix. + +#### Write Code + +Implement your feature or bug fix. + +Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop), run `bundle exec rubocop` and fix any style issues highlighted. + +Make sure that `bundle exec rake` completes without errors. + +#### Write Documentation + +Document any external behavior in the [README](README.md). + +#### Update Changelog + +Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Make it look like every other line, including your name and link to your Github account. + +#### 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/mongoid-search 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 +``` + +#### Update CHANGELOG Again + +Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows. + +``` +* [#123](https://github.com/mongoid/mongoid-search/pull/123): Reticulated splines - [@contributor](https://github.com/contributor). +``` + +Amend your previous commit and force push the changes. + +``` +git commit --amend +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. From 2f3551328f61a6ccf2c91539c9be4ac4de3c30bb Mon Sep 17 00:00:00 2001 From: Artem Krivonozhko Date: Thu, 31 May 2018 15:24:25 +0300 Subject: [PATCH 2/2] Add RELEASING.md and CHANGELOG.md entry, fix 0.3.6 changes in CHANGELOG.md --- CHANGELOG.md | 6 ++++- RELEASING.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 RELEASING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ad0e12..628010a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ ## 0.4.0 (next) * Your contribution here. +* [#132](https://github.com/mongoid/mongoid_search/pull/132): Add RELEASING and CONTRIBUTING - [@rtrv](https://github.com/rtrv). + +## 0.3.6 + +* [#127](https://github.com/mongoid/mongoid_search/pull/127): Multiple searches - [@pacop](https://github.com/pacop). ## 0.3.5 (2018/06/02) * [#129](https://github.com/mongoid/mongoid_search/pull/128): Add CHANGELOG and Danger - [@rtrv](https://github.com/rtrv). * [#128](https://github.com/mongoid/mongoid_search/pull/128): Escape regexp special characters - [@chiibis](https://github.com/chiibis). -* [#127](https://github.com/mongoid/mongoid_search/pull/127): Multiple searches - [@pacop](https://github.com/pacop). diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..1f460de --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,67 @@ +Releasing Mongoid::Search +======================== + +There're no particular rules about when to release mongoid-search. Release bug fixes frequently, features not so frequently and breaking API changes rarely. + +### Release + +Run tests, check that all tests succeed locally. + +``` +bundle install +bundle exec rake +``` + +Check that the last build succeeded in [Travis CI](https://travis-ci.org/mongoid/mongoid-search) for all supported platforms. + +Increment the version, modify [lib/mongoid/search/version.rb](lib/mongoid/search/version.rb). + +* Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.5.1` to `0.5.2`). +* Increment the second number if the release contains major features or breaking API changes (eg. change `0.5.1` to `0.4.0`). + +Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version. + +``` +### 0.4.0 (2018-01-01) +``` + +Remove the line with "Your contribution here.", since there will be no more contributions to this release. + +Commit your changes. + +``` +git add CHANGELOG.md lib/mongoid/search/version.rb +git commit -m "Preparing for release, 0.4.0." +git push origin master +``` + +Release. + +``` +$ rake release + +mongoid-search 0.4.0 built to pkg/mongoid-search-0.4.0.gem. +Tagged v0.4.0. +Pushed git commits and tags. +Pushed mongoid-search 0.4.0 to rubygems.org. +``` + +### Prepare for the Next Version + +Add the next release to [CHANGELOG.md](CHANGELOG.md). + +``` +### 0.4.1 (Next) + +* Your contribution here. +``` + +Increment the minor version, modify [lib/mongoid/search/version.rb](lib/mongoid/search/version.rb). + +Commit your changes. + +``` +git add CHANGELOG.md lib/mongoid/search/version.rb +git commit -m "Preparing for next release, 0.4.1." +git push origin master +```