Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
fe2bce7
:tada: init: Projeto Rails inicializado
neatzzy May 20, 2026
a4f61b0
:broom: cleanup: tirando a pasta .idea
neatzzy May 20, 2026
5c73813
:test_tube: test: Criada feature BDD do login
neatzzy May 20, 2026
149dfb1
🖌️style: conserto das frescuras do lint
neatzzy May 20, 2026
054ee9c
Merge branch 'main' into Cenarios-BDD
neatzzy May 20, 2026
d38173e
:heavy_plus_sign: build: adicionda a dependência do rspec
neatzzy May 20, 2026
fbce4dd
Merge branch 'Cenarios-BDD' of https://github.com/gusfring41/CAMAAR i…
Liferoijrm May 22, 2026
a20b7a9
:construction:feat: histórias de usuário e step definitions de login …
Liferoijrm May 23, 2026
b731eaa
feat: template tests
gusfring41 May 25, 2026
6ccc31d
Implementação: BDDs - Happy e Sad Path.
Leo3107 May 25, 2026
1ac237f
:test_tube: test: criados os BDDs das issues #1 e #11
neatzzy May 25, 2026
dc2dbf8
test: criados os BDDs das issues #8 e #10
leitaonerd May 25, 2026
4b3a8bf
Merge pull request #19 from gusfring41/teste/template
leitaonerd May 26, 2026
a90b97d
feat/ setup sprint-2
gusfring41 May 28, 2026
1c99fd1
:sparkles: feat: rotas do admin do sistema
neatzzy Jun 1, 2026
6e9b38c
:wrench: fix: consertado erro de sintaxe das rotas
neatzzy Jun 1, 2026
046f258
:sparkles: feat: Importação de dados do sigaa e configuração do db de…
neatzzy Jun 1, 2026
b66685f
definição e redefinição de senha
leitaonerd Jun 2, 2026
60ef476
:sparkles:feat: estilização com CSS e Seeds para o banco
Liferoijrm Jun 6, 2026
ef85c15
:wrench: fix: consertado o db do mysql
neatzzy Jun 6, 2026
fd4dd27
:sparkles: feat: Importação dados do SIGAA
neatzzy Jun 6, 2026
8391c3c
:test_tube: test: BDD cucumber da funcionalidade de atualização com d…
neatzzy Jun 6, 2026
df48307
:recycle: refactor: removida a dependencia do sqlite
neatzzy Jun 6, 2026
062a287
Merge branch 'sprint-2' into feat/1-importar-dados-sigaa
neatzzy Jun 7, 2026
2efcae8
Merge pull request #22 from gusfring41/feat/1-importar-dados-sigaa
gusfring41 Jun 11, 2026
a4b84e9
config-database
gusfring41 Jun 11, 2026
7d25756
Merge pull request #21 from gusfring41/feat/sistema-de-login
gusfring41 Jun 11, 2026
55b9e9c
feat: admin page
gusfring41 Jun 11, 2026
7672a95
feat: teamplate page
gusfring41 Jun 11, 2026
c1932dd
feat: functional templates
gusfring41 Jun 12, 2026
d2110ef
Merge pull request #23 from gusfring41/feat/template-views
neatzzy Jun 12, 2026
8604ae7
fix completo
leitaonerd Jun 14, 2026
cc262fb
:wrench: fix: fluxo da importacao do sigaa corrigida
neatzzy Jun 14, 2026
f93f02a
:construction:feat: página de download de resultados em csv
Liferoijrm Jun 15, 2026
29aec5f
Merge pull request #25 from gusfring41/fix/importar-dados
gusfring41 Jun 15, 2026
44d2134
Merge pull request #24 from gusfring41/fix/redefinir-senha
gusfring41 Jun 15, 2026
6180755
fix: aninha rotas de template por admin, adiciona relacionamento e co…
gusfring41 Jun 15, 2026
3e9b221
fix: view template
gusfring41 Jun 15, 2026
b216bcf
feat: template and admin rspec test
gusfring41 Jun 15, 2026
b1fe78a
Merge pull request #26 from gusfring41/fix/template
neatzzy Jun 15, 2026
141573d
test/formulario administrador
leitaonerd Jun 15, 2026
401d149
:recycle: refactor: fixes do lint e atualização das dependências
neatzzy Jun 15, 2026
ae90f5c
:recycle: refactor: redirect das rotas de usuário + autenticação de l…
neatzzy Jun 15, 2026
faac642
:test_tube: test: testes rspec para usuário
neatzzy Jun 15, 2026
1c2f653
acho q agora foi
neatzzy Jun 15, 2026
d9c83ed
:sparkles:feat: download de csv para resultados de formulário e step …
Liferoijrm Jun 15, 2026
01e5319
teste
gusfring41 Jun 16, 2026
785bcb3
Merge pull request #31 from gusfring41/refactor/rotas-usr
gusfring41 Jun 16, 2026
a65b1be
arrumacao dos crias
neatzzy Jun 16, 2026
148dcb1
Merge branch 'teste-sprint2' into feat/gerar-relatorio-csv
gusfring41 Jun 16, 2026
52e676e
Merge pull request #32 from gusfring41/feat/gerar-relatorio-csv
gusfring41 Jun 16, 2026
cce17c3
fixing dos crias 2.0
neatzzy Jun 16, 2026
d349ee8
hotfix dos crias 3: o retorno
neatzzy Jun 16, 2026
12d743e
migration
neatzzy Jun 16, 2026
7471623
feature/criar formulario
neatzzy Jun 16, 2026
37fdc1c
feat: rspec tests
gusfring41 Jun 16, 2026
299dafe
Merge pull request #33 from gusfring41/feat/testes-rspec
gusfring41 Jun 16, 2026
1bc6ae3
:sparkles: feat: RESPONDER O FORMULARIO FUNCIONA
neatzzy Jun 17, 2026
3c4e3aa
fix/formulario tests
leitaonerd Jun 17, 2026
9f00ab2
testes passando :tada: :tada: :tada: O MELHOR ATÉ AGORA
neatzzy Jun 17, 2026
3b862c0
funcionou
neatzzy Jun 17, 2026
fe29f12
Merge pull request #34 from gusfring41/feat/formularios
neatzzy Jun 17, 2026
8eccf30
testes rspec arrumados
neatzzy Jun 17, 2026
0ed95be
feat/redirecionamento de usuário
Liferoijrm Jun 17, 2026
df18505
feat/página de avaliacoes usuário
Liferoijrm Jun 17, 2026
4c566e0
fix/login steps
leitaonerd Jun 16, 2026
e7b6846
:heavy_plus_sign: build: adicionadas as dependencias de teste (exceto…
neatzzy Jun 17, 2026
376e4c2
:heavy_plus_sign: agora o simplecov funciona
neatzzy Jun 17, 2026
3b8ac78
feat: cobertura completa rspec
gusfring41 Jun 21, 2026
9c86979
Merge pull request #36 from gusfring41/feat/rspec
neatzzy Jun 29, 2026
85be92a
:books: docs/adicao de comentários para o rdoc
neatzzy Jun 29, 2026
532b986
:test_tube: test/testes rspec para models faltantes
neatzzy Jun 29, 2026
0efdc59
:books: docs/documentação rdoc
neatzzy Jun 29, 2026
a23e508
refator/definicao_senhas_controller
leitaonerd Jun 29, 2026
3c8ac68
refactor/sigaa_importer
leitaonerd Jun 29, 2026
26d1ff7
refactor/removendo arquivos não-aplicáveis do rubycritic
leitaonerd Jun 29, 2026
38e6b13
:books: docs/mais comentarios rdoc
neatzzy Jun 29, 2026
097257d
:recycle: refactor/refatorações sugeridas pelo rubycritic
neatzzy Jun 30, 2026
5065a6c
:books: docs/documentação do rdoc atualizada
neatzzy Jun 30, 2026
6365f07
lint
neatzzy Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 51 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.

# Ignore git directory.
/.git/
/.gitignore

# Ignore bundler config.
/.bundle

# Ignore all environment files.
/.env*

# Ignore all default key files.
/config/master.key
/config/credentials/*.key

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/.keep

# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/.keep

# Ignore assets.
/node_modules/
/app/assets/builds/*
!/app/assets/builds/.keep
/public/assets

# Ignore CI service files.
/.github

# Ignore Kamal files.
/config/deploy*.yml
/.kamal

# Ignore development files
/.devcontainer

# Ignore Docker-related files
/.dockerignore
/Dockerfile*
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ============================================
# CAMAAR - Email Configuration
# ============================================
# Copy this file to .env and fill in the values:
# cp .env.example .env
#
# GMAIL SETUP (Recommended):
# 1. Enable 2-Step Verification on your Google account:
# https://myaccount.google.com/security
# 2. Generate an App Password:
# https://myaccount.google.com/apppasswords
# 3. Use that App Password below (NOT your regular Gmail password)
#
# For other providers, change SMTP_ADDRESS, SMTP_PORT, SMTP_DOMAIN accordingly.
# ============================================

# Sender email address (shown as "From" in sent emails)
MAILER_FROM_ADDRESS=camaar@gmail.com

# SMTP Configuration (Gmail defaults shown)
SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_16_digit_app_password
SMTP_DOMAIN=gmail.com

# Application URL (used in email links for production)
# In development, this defaults to http://localhost:3000
APP_HOST=localhost:3000
APP_PROTOCOL=http
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
config/credentials/*.yml.enc diff=rails_credentials
config/credentials.yml.enc diff=rails_credentials
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
150 changes: 150 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: CI

on:
pull_request:
push:
branches: [ main ]

jobs:
scan_ruby:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Scan for common Rails security vulnerabilities using static analysis
run: bin/brakeman --no-pager

- name: Scan for known security vulnerabilities in gems used
run: bin/bundler-audit

scan_js:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Scan for security vulnerabilities in JavaScript dependencies
run: bin/importmap audit

lint:
runs-on: ubuntu-latest
env:
RUBOCOP_CACHE_ROOT: tmp/rubocop
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Prepare RuboCop cache
uses: actions/cache@v4
env:
DEPENDENCIES_HASH: ${{ hashFiles('.ruby-version', '**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }}
with:
path: ${{ env.RUBOCOP_CACHE_ROOT }}
key: rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }}
restore-keys: |
rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-

- name: Lint code for consistent style
run: bin/rubocop -f github

test:
runs-on: ubuntu-latest

services:
mysql:
image: mysql
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

# redis:
# image: valkey/valkey:8
# ports:
# - 6379:6379
# options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y default-libmysqlclient-dev libvips

- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: mysql2://127.0.0.1:3306
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
# REDIS_URL: redis://localhost:6379/0
run: bin/rails db:test:prepare test

system-test:
runs-on: ubuntu-latest

services:
mysql:
image: mysql
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

# redis:
# image: valkey/valkey:8
# ports:
# - 6379:6379
# options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y default-libmysqlclient-dev libvips

- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run System Tests
env:
RAILS_ENV: test
DATABASE_URL: mysql2://127.0.0.1:3306
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
# REDIS_URL: redis://localhost:6379/0
run: bin/rails db:test:prepare test:system

- name: Keep screenshots from failed system tests
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots
path: ${{ github.workspace }}/tmp/screenshots
if-no-files-found: ignore
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# Temporary files generated by your text editor or operating system
# belong in git's global ignore instead:
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`

# Ignore system/IDE folders
.idea/

# Ignore bundler config.
/.bundle

# Ignore coverage
coverage/

# Ignore all environment files (but keep .env.example in the repo).
/.env*
!/.env.example

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore key files for decrypting credentials and more.
/config/*.key

/vendor/bundle
3 changes: 3 additions & 0 deletions .kamal/hooks/docker-setup.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Docker set up on $KAMAL_HOSTS..."
3 changes: 3 additions & 0 deletions .kamal/hooks/post-app-boot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Booted app version $KAMAL_VERSION on $KAMAL_HOSTS..."
14 changes: 14 additions & 0 deletions .kamal/hooks/post-deploy.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# A sample post-deploy hook
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLES (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME

echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
3 changes: 3 additions & 0 deletions .kamal/hooks/post-proxy-reboot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Rebooted kamal-proxy on $KAMAL_HOSTS"
3 changes: 3 additions & 0 deletions .kamal/hooks/pre-app-boot.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "Booting app version $KAMAL_VERSION on $KAMAL_HOSTS..."
51 changes: 51 additions & 0 deletions .kamal/hooks/pre-build.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/sh

# A sample pre-build hook
#
# Checks:
# 1. We have a clean checkout
# 2. A remote is configured
# 3. The branch has been pushed to the remote
# 4. The version we are deploying matches the remote
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLES (if set)
# KAMAL_DESTINATION (if set)

if [ -n "$(git status --porcelain)" ]; then
echo "Git checkout is not clean, aborting..." >&2
git status --porcelain >&2
exit 1
fi

first_remote=$(git remote)

if [ -z "$first_remote" ]; then
echo "No git remote set, aborting..." >&2
exit 1
fi

current_branch=$(git branch --show-current)

if [ -z "$current_branch" ]; then
echo "Not on a git branch, aborting..." >&2
exit 1
fi

remote_head=$(git ls-remote $first_remote --tags $current_branch | cut -f1)

if [ -z "$remote_head" ]; then
echo "Branch not pushed to remote, aborting..." >&2
exit 1
fi

if [ "$KAMAL_VERSION" != "$remote_head" ]; then
echo "Version ($KAMAL_VERSION) does not match remote HEAD ($remote_head), aborting..." >&2
exit 1
fi

exit 0
Loading