An open API service indexing awesome lists of open source software.

https://github.com/eltonsantos/dev-nuuvem-test

Dev Challenge - Nuuvem
https://github.com/eltonsantos/dev-nuuvem-test

rails5 ruby ruby-on-rails

Last synced: 6 months ago
JSON representation

Dev Challenge - Nuuvem

Awesome Lists containing this project

README

          


TEST USING RUBY ON RAILS


Technologies   |   
Getting started   |   
Project   |   
Next steps



TEST USING RUBY ON RAILS - Nuuvem

---

## 🧪 Technologies

This project was developed using the following technologies:

- [Ruby](https://www.ruby-lang.org/)
- [Rails](https://rubyonrails.org/)
- [Interactor](https://github.com/collectiveidea/interactor)
- [DropzoneJS](https://github.com/ncuesta/dropzonejs-rails)
- [Sass](https://sass-lang.com/)

## 🚀 Getting started

This project use **ruby 2.7.0** and **rails 5.2.6**. I recommend installing [RVM](https://rvm.io/) on your machine to change ruby and rails versions more easily and make better use of this project.

Clone the project and access the folder

```bash
$ git clone https://github.com/eltonsantos/dev-nuuvem-test.git && cd dev-nuuvem-test
```

Follow the steps below
```bash
# Install the dependencies
$ bundle install

# Create database
$ rails db:create

# Create migrations
$ rails db:migrate

# Start server
$ rails s

```

Or just for knowledge, to create the basic structure of the project, the following commands bellow were used

```bash
# Create project
$ rails new dev-9nama-test

# Create model Purchaser
$ rails g model Purchaser name:index

# Create model Merchant
$ rails g model Merchant name:index address:index

# Create model Item
$ rails g model Item description:index price:decimal{8-2}:index

# Create scaffold Orders
$ rails g scaffold Orders

# Create model Purchase
$ rails g model Purchase order:references item:references merchant:references purchaser:references quantity:integer

# Create database
$ rails db:create

# Create migrations
$ rails db:migrate

# Start server
$ rails s

```

To run all tests at the same time, do:

```bash
$ rspec --format documentation
```

To run a specific test do:

```bash
$ rspec --format documentation spec/models/[NAME]_spec.rb
```

###### --format documentation works to make the tests more formatted

## 💻 Project

This project was developed for testing in the company Nuuvem, in the July 18, 2021. The project consists of receiving a csv, tab or txt file, processing the file and adding it to the sqlite database. Also, be able to show order details as well as the order total. An **example file** for uploading is inside the **storage folder**.

## 🐾 Next steps

###### Escreverei essa parte em português

- [ ] Implementar layout infinito para mostrar todos pedidos na mesma tela ♾
- [ ] Implementar o dark mode para os olhos agradecerem 😎
- [ ] Implementar o skeleton loader para quando tiver muitos pedidos 🔼
- [ ] Ajustar alguns detalhes para o Layout ficar bem responsivo e fofo 🥰
- [ ] Login e senha para poder acessar os pedidos 🔐
- [ ] E muito mais... ❤💪🏼

---

## 👨🏻‍💻 Author





Elton Santos 🚀








Made with ❤️ by Elton Santos 👋🏽 [Entre em contato!](https://www.linkedin.com/in/eltonmelosantos/)