Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
/ storytoss Public archive

Write a story with other people bit by bit, and see where it ends up!

Notifications You must be signed in to change notification settings

fpsvogel/storytoss

Repository files navigation

✏️ Story Toss ⚾

Welcome to the Story Toss codebase. I built this app as a capstone project after I read Jason Swett's Complete Guide to Rails Testing. You can read all about it on my blog.

Table of Contents

Why this is on my GitHub portfolio

In building this app, I followed a more test-centric development process than I had ever done before, at least in Rails.

Here are the testing rules of thumb that I set for myself at the beginning of this project:

  1. When I add a feature, write tests for it before working on anything else.
  2. Don't commit before writing tests or making sure the change is covered by existing tests. I made exceptions to this rule at the beginning and end of the project, when I was working mostly in the views and it didn't make sense to write system specs until after several interrelated features were finished.
  3. When I'm building a model, use TDD as much as possible.

By the end of the project, these rules felt less like rules and more like just plain writing code. I didn't have to remind myself as often to write tests before committing, because the habit of testing had become a more seamless part my development process. And the more I did it, the more grateful I was that I'd done so: more than once an obscure bug came up that I found within just a few minutes, thanks to my tests. I shudder to think of the hours it might otherwise have taken me to track down those bugs.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/fpsvogel/storytoss.

Requirements

  • Ruby 3+
  • Node.js 14+
  • PostgreSQL 9.3+

Initial setup

  • Checkout the storytoss git tree from Github:
    $ git clone git://github.com/fpsvogel/storytoss.git
    $ cd storytoss
    storytoss$
  • Run Bundler to install gems needed by the project:
    storytoss$ bundle
  • If this is your first time using PostgreSQL, log in to PostgreSQL and create a user:
    $ psql -U postgres
    postgres=# create role "your_username" login createdb
    postgres=# exit
    
  • Create the development and test databases:
    storytoss$ rails db:create
  • Load the schema into the new database:
    storytoss$ rails db:schema:load
  • Seed the database:
    storytoss$ rails db:seed

License

Distributed under the MIT License.

About

Write a story with other people bit by bit, and see where it ends up!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published