Categories
Active Record Soft Delete
Keep deleted records in the database for auditing and restoring
Active Record Versioning
Keep track of changes to database records for auditing and restoring
Track changes to your models, for auditing or versioning. See how a model looked
at any stage in its lifecycle, revert it to any version, or restore it after it
has been destroyed.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
2.47
Official AWS Ruby gem for AWS Audit Manager. This gem is part of the AWS SDK for Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
2.67
bundler-audit provides patch-level verification for Bundled apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
1.3
Log all changes to your ActiveRecord models
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
Log all changes to your models
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
Log all changes to your models
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.02
Auditor allows you to declaratively specify what CRUD operations should be audited and save the audit data to the database.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.0
Extension to the audited gem to deferred writing of audits via Resque, Delayed Job, or Sidekiq
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
0.0
rails_code_auditor is a developer-friendly Ruby gem that automates the process of auditing your Rails codebase. It runs a suite of essential tools—including Brakeman, Bundler Audit, RuboCop, Rails Best Practices, Flay, Flog, and License Finder—and consolidates all outputs into a single readable report.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
0.0
A Sequel plugin that logs changes made to an audited model, including who created, updated and destroyed the record, and what was changed and when the change was made. This plugin provides model auditing (a.k.a: record versioning) for DB scenarios when DB triggers are not possible. (ie: on a web app on Heroku).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.0
Pass a user through to your active_jobs and associate it with any generated audits
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
0.0
AuditLog is a lightweight gem for adding create/update/delete auditing to your Rails models. Tracks changes, actor, and optional reasons.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
0.68
Auditing tool for CloudFormation templates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.0
audited-timeline provides timeline frontend to audited
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.06
Trail audit logs (Operation logs) into the database for user behaviors, including a web UI to query logs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.12
Rails engine that implements a simple auditing tool for console1984 sessions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.0
# StudioGame (Alec)
Jogo de terminal em Ruby com **jogadores, dados, tesouros e variações de jogadores** (Clumsy e Berserk), empacotado como gem.
> Nome do gem (exemplo): `studio_game_alec`
---
## 🚀 Instalação e execução
### Rodando direto do código-fonte
No diretório do projeto:
```bash
ruby bin/studio_game
```
Se você não passar um arquivo de jogadores via CLI, o script usa o `players.csv` que fica em `bin/` por padrão.
Também funciona passando um CSV na linha de comando:
```bash
ruby bin/studio_game my_favorite_players.csv
```
### Como gem (local)
Empacote e instale localmente:
```bash
gem build studio_game.gemspec
gem install studio_game_alec-<versao>.gem
```
Depois rode:
```bash
studio_game
```
> No Windows, o executável será resolvido pelo RubyGems. Se preferir, rode: `ruby bin/studio_game`.
---
## 📁 Estrutura do projeto
```
games/
├─ bin/
│ ├─ studio_game # script principal (tem shebang)
│ └─ players.csv # CSV padrão (nome,vida)
├─ lib/
│ └─ studio_game/
│ ├─ auditable.rb
│ ├─ berserk_player.rb
│ ├─ clumsy_player.rb
│ ├─ die.rb
│ ├─ game.rb
│ ├─ game_turn.rb
│ ├─ loaded_die.rb
│ ├─ playable.rb
│ ├─ player.rb
│ └─ treasure_trove.rb
├─ spec/
│ └─ studio_game/ # specs RSpec
├─ LICENSE
├─ README.md
└─ studio_game.gemspec
```
- **Namespace:** todo o código vive dentro do módulo `StudioGame` para evitar colisões.
- **bin/studio_game:** script CLI com shebang (`#!/usr/bin/env ruby`). Faz _fallback_ do `$LOAD_PATH` para `lib` quando usado fora da gem.
- **lib/studio_game/**: código da biblioteca (classes/módulos).
- **spec/**: testes RSpec.
---
## 🧩 Conceitos principais
- **Player** (`player.rb`): representa um jogador com `name`, `health`, coleta tesouros e calcula `score` (= `health` + `points`). Inclui o mixin **Playable**.
- **Playable** (`playable.rb`): mixin com `w00t`, `blam` e `strong?` (altera/consulta `health` via getters/setters).
- **TreasureTrove** (`treasure_trove.rb`): define `Treasure = Struct.new(:name,:points)` e a constante `TREASURES`; possui `.random`.
- **Die/LoadedDie** (`die.rb`, `loaded_die.rb`): rolam valores (o carregado favorece 1,1,2,5,6,6). Ambos incluem **Auditable**.
- **Auditable** (`auditable.rb`): imprime “Rolled a X (DieClass)” após cada rolagem.
- **Game** (`game.rb`): agrega jogadores, carrega CSV, executa rodadas, soma pontos e salva _high scores_.
- **GameTurn** (`game_turn.rb`): executa a lógica de um turno para um jogador (rola dado, aplica `blam/w00t/skip` e concede tesouro).
- **ClumsyPlayer / BerserkPlayer**: variações de `Player` que modificam comportamento de `w00t` e de coleta de tesouros.
---
## 🧪 Testes
Rode todos os testes:
```bash
rspec
```
Principais coisas testadas:
- Ordenação de jogadores por `score` (usa `<=>` em `Player`).
- Cálculo de `points` e `score` (soma de tesouros + vida).
- Efeitos de `w00t`/`blam` e força (`strong?`).
- Lógica de turno com _stubs_ de dado (`allow_any_instance_of(LoadedDie).to receive(:roll).and_return(n)`).
- Comportamentos de `ClumsyPlayer` e `BerserkPlayer`.
---
## 📦 CSVs e caminhos
- `bin/studio_game` resolve o CSV padrão assim:
```ruby
default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
game.load_players(ARGV.shift || default_player_file)
```
- Você pode passar um arquivo `.csv` via CLI como primeiro argumento.
Formato do CSV:
```
Moe,100
Larry,60
Curly,125
```
---
## 🧾 High Scores
Após sair do loop, o jogo grava `high_score.txt` com as entradas ordenadas. Cada linha é formatada por `Game#high_score_entry`:
```
<nome com padding de pontos> <score>
```
---
## 🛠️ Dicas de desenvolvimento
- Use `require 'studio_game/arquivo'` quando a gem estiver instalada.
- No script binário, o `begin/rescue LoadError` faz _fallback_ para `$LOAD_PATH` local, útil fora da gem.
- Para debugar I/O em testes, o spec redireciona `STDOUT` (`$stdout = StringIO.new`).
---
## 📚 Licença
MIT – veja o arquivo `LICENSE`.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
Provides a straightforward way for auditing changes on active record models, especially for composite entities.
Also provides helper methods for easily rendering an audit trail in Ruby on Rails views.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.0
Plugin for DataMapper to allow for simple auditing of models. This plugin does not implement auditing itself, but creates a block context in which you can implement your own auditing procedures.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity
0.08
Log transitions on a state machine to support auditing and business process analytics.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Activity