chaos v0.0.3

crystal shard to add some chaos to your code

chaos

Chaos

Crystal Version GitHub Release CI Tests Workflow

Install | Usage | Development | Contributing | Shards.info | Docs on CrystalDoc


Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      chaos:
        github: gabrioliv/chaos
    
  2. Run shards install

Usage

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
  2. Create your feature branch:
    git checkout -b my-new-feature
    
  3. Make your changes.
  4. Follow these quality steps to ensure consistency:
    • Update and run tests:
      crystal spec -v --fail-fast
      
    • Format your code:
      crystal tool format
      
    • Update the documentation:
      crystal docs
      
  5. Commit your changes:
    git commit -am 'Add some feature'
    
  6. Push the branch:
    git push origin my-new-feature
    
  7. Create a new Pull Request.

Repository

chaos

Owner
Statistic
  • 5
  • 0
  • 0
  • 0
  • 0
  • about 11 hours ago
  • November 19, 2024
License

MIT License

Links
Synced at

Tue, 26 Nov 2024 11:26:32 GMT

Languages