electron0zero / noteblocks

A new approach to note-taking where your notes are organized as blocks which can be rendered however you want. :+1:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Noteblocks

Build Status Coverage Status

Configuration

  • Ruby version 2.5.1 (we use rvm to manage ruby)
  • We use bundler to manage dependencies
  • install bundler with gem install bundler
  • now run bundle install to install dependencies
  • install overcommit hooks by running
   overcommit --install
   overcommit --sign
   overcommit --sign pre-commit
   overcommit --sign pre-push

Database creation

  • Install PostgreSQL (version >= 9.4) by following standard install steps

  • follow these instructions to properly add a user, replace nb_user with desired pg username and pass with desired password for your user

  • sudo -u postgres createuser nb_user

  • sudo -u postgres psql

  • postgres=# ALTER USER nb_user CREATEDB;

  • postgres=# ALTER USER nb_user WITH PASSWORD 'pass';

  • Create database.yml from database.yml.example file and add your username and password

Database initialization

  • run bundle exec rails db:create db:schema:load db:seed to create db and add seed data
  • run bundle exec rails db:drop db:create db:schema:load db:seed to drop current db and start fresh

How to run the test suite

We use Rspec with factory_bot for testing

  • run bundle exec rspec to run full test suite
  • run bundle exec rspec <test-file/folder> to run parts of suite
  • add -fd flag to run test with formatted output

Other info

  • If you want to play around, console with rails console or rails c
  • add byebug to add breakpoint and debug, see byebug cheat sheet
  • Start server with rails server or rails s
  • running rails dbconsole will drop you into psql/db prompt
  • run rails routes to see all possible routes to query(or see controller specs to see what params they take).
  • run rails db:migrate to run migration
  • run rails db:migrate:status to see state to db and pending migrations
  • run rails db:rollback to undo last migration

About

A new approach to note-taking where your notes are organized as blocks which can be rendered however you want. :+1:


Languages

Language:Ruby 99.5%Language:HTML 0.5%