/bdd-workshop-app

BDD (Behaviour Driven Development) workshop app for RailsConf2019

Primary LanguageRuby

BDD Workshop App

CircleCI

BDD (Behaviour Driven Development) Workshop App fro Rails Conf 2019 "Multi layer BDD for modern rails web apps"

TL;DR Setup

  • clone this repo

    git clone git@github.com:failure-driven/bdd-workshop-app.git
    
  • get it up and running (Quick start install)

    make
    make start
    
  • Install Kahoot for interactive review and surveys

Quick start install

                        # clone repo
git clone git@github.com:failure-driven/bdd-workshop-app.git

cd bdd-workshop-app     # open directory

make                    # check versions,
                        # install libs,
                        # runs tests

make start              # startup database
                        # to run the app rails server
bin/webpack-dev-server  # for faster ReactJS compilation

Note: Make sure to pull this repo closer to the date of the workshop, like the day before 😉

Kahoot

Install Kahoot for interactive review and surveys during the workshop.


Manual install

  • clone the repository

    git clone git@github.com:failure-driven/bdd-workshop-app.git
    
  • change directory into bdd workshop app

    cd bdd-workshop-app
    
  • check you have node 10.15.3 installed

    node -v
    
    • try homebrew?
    brew install node@10
    
    • check you have yarn installed
    yarn -v
    
    • install node dependencies
    yarn install
    
  • check you have ruby 2.6.2 installed

    ruby -v
    
    • install bundler gem
    gem install bundler
    
    • install gems
      • dependent on having postgresql installed (brew install postgresql)
      • dependant on having relatively new Chrome installed
    bundle
    
  • chrome and chromedriver will be required for bundle to install successfully TODO more info

  • postgresql install using homebrew

    brew info postgresql
    brew services list
    psql -V
  • check you have postgresql running

    psql --list     # list out databases
    
  • create and migrate your database

    bundle exec rails db:create db:migrate
    
  • run the specs

    bundle exec rspec spec
    
  • run the rails development server

    bundle exec rails server
    
  • run the webpacker dev server

    bin/webpack-dev-server
    
  • visit the development server

  • run the tests

    bin/full-build
    
    • or if there is no internet but dependencies have been installed
      NO_INTERNET=true ./bin/full-build
      
    • if you want to rubocop and lint
      PRETTY_CODE=true NO_INTERNET=true bin/full-build
      

asdf

Somewhat experimental script to install asdf that will manage ruby, nodejs as stipluated in .tool-versions file. Will also install PostgreSQL

make asdf_install

which runs bin/asdf-install

also may want to add to your shell as per asdf install instructions

echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile

docker

TODO ...

Show the slides

make slides

slides are located in docs/slides/deck.mdx using mdx-deck

Docker

TODO

ORIGINAL RAILS README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version

  • System dependencies

  • Configuration

  • Database creation

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions

  • ...