Hootcode is a fork of Exercism. It's a work-in-progress with support for GitHub based project hosting and more.
If you would like to contribute to exercism, then please read the CONTRIBUTING.md document, which describes the various parts of the system and how they fit together.
Please refert to the BUILDING.md file for detailed instructions on how to get hootcode running locally.
Our styleguide is under /styleguide and built with KSS, which enables you to write examples to *.scss files.
You need to have mailcatches installed.
gem install mailcatcherMailCatcher is used to catch and view emails locally.
Do the following to test an email:
- Start MailCatcher:
mailcatcherormailcatcher -fto run in the foreground - Send a test message. For example,
ruby test/services/notification_message_test.rbwill send a test notification email. - Open localhost:1080 and you should see the test email
If you want to send emails, you will need to fill out the relevant environment variables in .env and uncomment the lines so the variables get exported.
There's a script in bin/console that will load pry with the exercism environment loaded.
This will let you poke around at the objects in the system, such as finding users and changing
things about submissions or comments, making it easier to test specific things.
user = User.find_by_username 'whatever'
user.submissions- Create a test database:
createdb -O exercism exercism_test - Prepare the test environment:
RACK_ENV=test rake db:migrate - Make sure MailCatcher is running:
mailcatcher - Run the test suite:
rakeorrake test
To run a single test suite, you can do so with:
ruby path/to/the_test.rbIf it complains about dependencies, then either we forgot to require the correct dependencies (a distinct possibility), or we are dependening on a particular tag of a gem installed directly from GitHub (this happens on occasion).
If there's a git dependency, you can do this:
bundle exec ruby path/to/the_test.rbFor the require, you'll need to figure out what the missing dependency is. Feel free to open a GitHub issue. It's likely that someone familiar with the codebase will be able to identify the problem immediately.
To enable code coverage run:
COVERAGE=1 rake testBrowse the results located in coverage/index.html
Let Heroku know that Lineman will be building our assets. From the command line:
heroku config:set BUILDPACK_URL=https://github.com/testdouble/heroku-buildpack-lineman-ruby.gitGNU Affero General Public License
Copyright (C) 2015 Katrina Owen, [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.