Flipper

https://github.com/metaware/flipper

Flipper makes it possible to release code into production behind feature flags that can be turned on or off at will.

flipper was heavily inspired from it's Rubygem counterparts, flipper and rollout.

Basic Usage

require "flipper"

Flipper.adapter = Kiwi::RedisStore.new(Redis.new)
Flipper.enable(:feature_name)

if Flipper.enabled?(:feature_name)
  puts "Feature launched, Let's roll!"
else
  puts "Feature not released yet."
end

Flipper.disable(:search)

if Flipper.disabled?(:search)
  puts "Search is not available yet!"
end

Note: To make it a complete feature rich project, contributions will be much appreciated.

Planned Features:

  • Groups Support
  • Individual Actors/Users Support
  • Percentage based rollout Support

Microtest

https://github.com/Ragmaanir/microtest

This project was mostly used by me for my private projects. But i think it reached a state of maturity where i can share it. Here are some interesting facts about the project:

  • Mostly based on power-asserts. No assert_equals, assert_operator. Just the assert-macro.
  • Stacktraces are beautified
  • Avoid nested contexts. Prefer flat specs. Split them up if possible.
  • A very interesting thing you might want to have a look at for your own projects: The README.md is generate from a README.md.template. Images for console output are generate by running "aha" and "wkhtmltoimage" by running those in a docker container. Both the examples and their output are tested and generated by the "build.cr"

Of course this project has its flaws and it is far from being finished. E.g. there are some assert statements that cause exceptions when they fail. Also it is a bit difficult to get the exact line number of the assertion failures since everything is based on macros. Working on that. Thankful for feedback!

Crystal ANN v0.6.0 is released

We are happy to announce our new release with a couple of handy features:

  • Now code in your announcements is nicely highlighted. Here is an example:
# Halt execution with the current context.
# Returns 200 and an empty response by default.
#
#   halt env, status_code: 403, response: "Forbidden"
macro halt(env, status_code = 200, response = "")
  {{env}}.response.status_code = {{status_code}}
  {{env}}.response.print {{response}}
  {{env}}.response.close
  next
end

Happy announcing ❤️