Skip to content

GerryG/wikirate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decko application code used at Wikirate.org

Code Organization

Like all Decko decks, WikiRate's code is organized in mods.

Steps to make it work

The following will help set up a functioning wikirate site with a small subset of (mostly fake) data. Some pages will not look complete.

  1. fork repo on github: https://github.com/wikirate/wikirate/
  2. clone repo: git clone git@github.com:YOURNAME/wikirate.git
  3. enter dir: cd wikirate
  4. init/update submodules git submodule update -f --init --recursive
  5. install gems: bundle install
  6. set up config: cp -R sample_config/* config
  7. populate dev database (with test data): DATABASE_NAME_TEST=wikirate_dev bundle exec rake wikirate:test:seed or start fresh with a subject of your choice: bundle exec rake wikirate:new_with_subject Camels
  8. add AWS credentials to config/application.rb (Ask wikirate dev team! Sorry, we'll make this easier soon)
  9. to make assets like icons work: bundle exec rake decko:update_assets_symlink
  10. reset machines rake card:reset_machine_output
  11. start server: bundle exec decko s

note:

  • initial homepage load will take a long time.
  • You can log into the test data with:

Testing

Running Tests

  1. populate test database: bundle exec rake wikirate:test:seed
  2. start rspec with decko rspec and cucumber with decko cucumber.

Alternatively, you can use the shorter commands decko rs and decko cc

To run specific tests, you can add -- followed by the test file.

Eg. decko rs -- /my/file/is/here

Writing Tests

Sample tests contained here:

Paths:

 mod/*/spec                       # rspec and jest tests
 mod/*/features                   # cucumber tests
 mod/*/features/step_definitions  # cucumber step definitions

CoffeeScript Tests

You need node.js (>=6) and yarn installed. To set up CoffeeScript testing run yarn install. Start tests with yarn jest test. Jest is configured to run all .coffee files in mod/**/spec folders. The configuration can be changed in package.json. The basic setup for Jest with jquery and Decko's coffeescript is loaded in test/setup_jest.js. See mod/wikirate/spec/lib/javascript/script_wikirate_common.test.coffee for a simple example.

Site Maintenance

See documentation here: https://github.com/capistrano/maintenance

quick examples:

  # turn on maintenance message with defaults
  cap production maintenance:enable

  # turn on maintenance message with more info
  cap production maintenance:enable REASON="database update" UNTIL="in a minute or two"

  # turn maintenance message off
  cap production maintenance:disable

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 39.7%
  • JavaScript 23.1%
  • Java 17.3%
  • HTML 9.5%
  • CSS 8.1%
  • CoffeeScript 1.6%
  • Gherkin 0.7%