Skip to content

Development FAQ

Connor Shea edited this page May 20, 2015 · 4 revisions

How do I generate the Documentation for ImageHex's codebase?

  1. Navigate to your local copy of the ImageHex codebase.
  2. Enter rake documentation into the terminal.
  3. Navigate to the ImageHex/doc folder in Finder or another file browser.
  4. Open index.html in a browser, then browse.

How do I make myself an admin on my local build?

  1. rails c
  2. u = User.where(name: "YOUR NAME").first
  3. u.role = :admin
  4. u.save!
  5. quit

How do I run the unit tests?

A: In the ImageHex directory, run rspec. Codeship runs our unit tests automatically on certain branches, so it may already have information about the tests passing/failing.

Note: To run a specific test, instead of the full suite, for example when testing to see if a test you've written works, you can run rspec ./spec/path/spec_name.rb (e.g. rspec ./spec/models/comment_spec.rb)

Should I use JQuery or CSS for animations?

Use CSS. This HTML5 Animation Speed Test should explain why. If you don't notice any difference at the default 500 dots, keep adding more until one starts lagging.

Clone this wiki locally