Skip to content

Latest commit

 

History

History
87 lines (71 loc) · 2.19 KB

README.md

File metadata and controls

87 lines (71 loc) · 2.19 KB

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 [email protected]: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.