https://github.com/gabrioliv/chaos
crystal shard to add some chaos to your code
https://github.com/gabrioliv/chaos
chaos crystal shards
Last synced: 6 months ago
JSON representation
crystal shard to add some chaos to your code
- Host: GitHub
- URL: https://github.com/gabrioliv/chaos
- Owner: GabriOliv
- License: mit
- Created: 2024-11-19T02:10:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-15T12:49:13.000Z (10 months ago)
- Last Synced: 2025-03-27T05:34:54.651Z (7 months ago)
- Topics: chaos, crystal, shards
- Language: Crystal
- Homepage: https://shards.info/github/GabriOliv/chaos/readme
- Size: 43.9 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

# Chaos
[](https://crystal-lang.org/)
[](https://github.com/GabriOliv/chaos/releases)
[](https://github.com/GabriOliv/chaos/actions)[Install](https://github.com/GabriOliv/chaos#installation) |
[Usage](https://github.com/GabriOliv/chaos#usage) |
[Development](https://github.com/GabriOliv/chaos#development) |
[Contributing](https://github.com/GabriOliv/chaos#contributing) |
[Shards.info](https://shards.info/github/GabriOliv/chaos) |
[Docs on CrystalDoc](https://crystaldoc.info/github/GabriOliv/chaos/)---
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
chaos:
github: gabrioliv/chaos
```2. Run `shards install`
## Usage
```crystal
require "chaos"chaos = Chaos::Chaos.new
chaos.probability = 0.8 # chaos probability -> 80%
puts chaos.chaos(true) # => random value of type Bool based on the probability
```## Development
1. Clone the repository
```
git clone git@github.com:GabriOliv/chaos.git
```
2. Enter the project folder
```
cd chaos
```
3. Run the tests
```
crystal spec -v --fail-fast
```
4. Make your changes## Contributing
1. Fork the repository: [Fork Chaos](https://github.com/gabrioliv/chaos/fork)
2. Create your feature branch:
```bash
git checkout -b my-new-feature
```
3. Make your changes.
4. Follow these quality steps to ensure consistency:
- Update and run tests:
```bash
crystal spec -v --fail-fast
```
- Format your code:
```bash
crystal tool format
```
- Update the documentation:
```bash
crystal docs
```
5. Commit your changes:
```bash
git commit -am 'Add some feature'
```
6. Push the branch:
```bash
git push origin my-new-feature
```
7. Create a new Pull Request.---