smcr

Version, currently master branch1 version
  • master branchlatestJun 18, 2021

github.com/drhuffman12/smcr

State Machine for Crystal

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  smcr:
    github: drhuffman12/smcr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.0.0
License
MIT
Author
Daniel Huffman

Dependencies

Runtime Dependencies

  • faker*github: askn/faker
  • spectator*gitlab: arctic-fox/spectator, branch: master

Development Dependencies

  • ameba*github: crystal-ameba/amebadev

README

smcr

State Machine for Crystal

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      smcr:
        github: drhuffman12/smcr
  2. Run shards install

Usage

For the states, we use Enums, which are importable from JSON. You might think that we should use Symbols, but those are NOT JSON import-able! See: https://forum.crystal-lang.org/t/how-to-do-from-json-with-symbol-variables/3379/2 .

require "smcr"

TODO: Write usage instructions here

Development

To enable debug comment logging, set CRYSTAL_DEBUG env variable to anything other than an empty string. For example:

# debug logging enabled
CRYSTAL_DEBUG=soME_nOn_Blank_VALue crystal spec

# debug logging disabled
CRYSTAL_DEBUG= crystal spec

This will show at least:

Smcr::VERSION # => "0.1.0"

Use this to output additional debug info like:

p! Smcr::VERSION if Smcr::DEBUG_ENABLED

Contributing

  1. Fork it (https://github.com/drhuffman12/smcr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors