Skip to content

MuseuComputacao/mcu-core

Repository files navigation

API Museu da Computação da UFRJ | MCU-CORE

This project was generated with Rails. Our main go is the create ond REST API to control the museum data.

We use:

  • Rails: 6.1.4.4
  • Ruby: 2.7.5

Table of contents

Install

  • Clone the repo and cd into it
$ docker compose up

Usage

$ docker-compose up

The application will become available at the URL:

http://localhost:3000/

1 - To install new gems add on Gemfile and then run docker-compose build

2- The user Master will be found on db/seed.rb

Rails Console

To access rails console run.

docker-compose run --rm app sh
rails c

More indo on Rails Guide Command line and pry doc

Tests

It's never too early to begin running unit tests. Tests are run using RSpec testing framework and lives in the /spec folder. To run the tests:

docker-compose run --rm app rake

or into sh

rake

You too can run just one spec file into sh

rspec spec/{file_path}

Linter

This project uses the rubocop gem for linter, that config you can find on .rubocop.yml. Access the docker console and run by:

bundle exec rubocop

Use -a to autofix safe mode and -A hardmode

Troubleshooting

Access Forbidden for edit files create by rails c

On ubuntu:

inside de project folder run:

sudo chown your-user:your-user -R ./

rails server error `initialize': getaddrinfo: Name or service not known (SocketError)

On Ubuntu:

On /etc/host add 127.0.0.1 localhost

Git Guideline

Create your branch's and commits using english language and fallowing this guideline.

Branches

  • Feature: feat/branch-name
  • Hotfix: hotfix/branch-name
  • POC: poc/branch-name

Commits prefix

  • Chore: chore(context): message
  • Feat: feat(context): message
  • Fix: fix(context): message
  • Refactor: refactor(context): message
  • Tests: tests(context): message
  • Docs: docs(context): message

Open MR's

When open your mr on github use the MR template.

About

REST API for "Museu da Computação da UFRJ"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages