Codewars command-line tool
Installation
Execute gem install codewars
Usage
Execute codewars help
to see all available commands.
- Set an API ACCESS TOKEN from the codewars website (https://www.codewars.com/users/edit)
codewars config key your-secret-key
- Set a language you want to use
codewars config language ruby|javascript|etc
- Choose a kata which you want to solve
codewars train
- Start solving the kata
codewars train name-of-kata
- Go to created folder
cd name-of-kata/language/
- Look at description.md (use a Markdown viewer)
- According to the description of the kata change or create tests using your favorite test framework
- Change the solution.* file so the tests become green
- Upload the solution and wait for a response of tests on the server
codewars attempt
- If there are no mistakes finalize the previously attempted solution
codewars finalize
- Look at results of other people, rest and pick up another kata or the same kata but using another language
Development
TO-DO
- [ ] Refactor anything you can
- [ ] Add travis, coveralls, etc
- [ ] Change the name of commands: attempt and finalize (join them to one command?)
- [ ] Rename 'config' command? Maybe to 'set'?
- [ ] Add options to commands that can be added: --strategy=something, --language=something, etc.
- [ ] Make 100% coverage in simplecov
- [ ] Write RSpec module tests
- [ ] Divide description.md to task.md + info.yml?
- [ ] Refactor features so stubbing (mocking) become more obvious
Contributing
Bug reports, pull requests and ideas are welcome!
Steps to make a pull request:
- Fork it ( https://github.com/evmorov/codewars/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Make changes
- Add tests for it
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request