/newbooksdb

Ruby on Rails 7 Application to manage owned books

Primary LanguageRubyGNU General Public License v3.0GPL-3.0

Book Collector Database

Introduction

Set up and configuration

Technical Information

Models

Books

Main model - encapsulates any book stored in the DB. Fields:

  • Title (not null) - the title of the book. Must be unique in the DB (i. e. no book can exist twice)
  • Sort Title: Automatically generated from the title (lowercased and leading articles removed). Must also not be null
  • slug: The slug to use in the books URL
  • Original title: If the book was originally published in another language
  • Year: The publishing year of a book (integer)
  • Rating: An integer, used as an ENUM: not rated (0), hated (1), bad (2), ok (3), good (4), favourite (5)
  • Condition: The physical condition of the book, used as an ENUM: not given (0), damaged (1), used_bad (2), used (3), used_ok (4), like_new (5)
  • Edition: Free text string - first, second edition, etc etc.

Ruby Version

This application is setup using Ruby v 3.1.2

Gems

The following Gems are used in this project:

Application

Development

Core Rails / Application

### JS Packages

The following packages have to be added via yarn:

Check package.json for all dependencies that were added.

Test Suite

RSpec is used for writing tests (using the rspec-rails gem {https://github.com/rspec/rspec-rails}) RSpec is enhanced with Rails-controller-testing {https://rubygems.org/gems/rails-controller-testing} Using Simplecov to analyze code coverage ({https://rubygems.org/gems/simplecov})

Database creation and initialization

Styles and HTML

This project is partially based on normalize.css {https://necolas.github.io/normalize.css/}