callbacks alternatives and similar shards
Based on the "Misc" category.
Alternatively, view callbacks alternatives based on common mentions on social networks and blogs.
-
sentry
Build/Runs your crystal application, watches files, and rebuilds/restarts app on file changes -
immutable
Thread-safe, persistent, immutable collections for the Crystal language -
crystagiri
An Html parser library for Crystal (like Nokogiri for Ruby) -
crz
Functional programming library for https://github.com/crystal-lang/crystal -
crystal-web-framework-stars
โญ๏ธ Web frameworks for Crystal, most starred on Github -
cron_scheduler
Simple job scheduler with crontab patterns for Crystal Language. -
crystal-futures
Future type implementation for Crystal language -
inflector.cr
Inflector shard for Crystal. A port of ActiveSupport::Inflector -
aasm.cr
:arrows_clockwise: Easy to use finite state machine for Crystal classes -
kreal
Kreal is a model sharing & RPC library built on and works with Kemal seamlessly. -
retriable.cr
Retriable.cr is a simple DSL to retry failed code blocks -
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal -
CrSerializer
Extensible annotation based serialization/deserialization library -
circuit_breaker
Implementation of the circuit breaker pattern in crystal -
burocracia.cr
๐ Zero-dependency Crystal shard to validate, generate and format Brazilian burocracias (CPF, CNPJ, CEP) -
wikicr
Wiki in crystal, using Markdown and Git, inspired by dokuwiki. Last features to build are pretty hard, if you have some time to help... :) -
m3u8
Generate and parse m3u8 playlists for HTTP Live Streaming (HLS) in Crystal. -
message_verifier.cr
Rails compatible MessageVerifier for Crystal-lang apps -
defined
This shard provides facilities for checking whether a constant exists at compile time, and for a variety of different conditional compilation options. Code can be conditionally compiled based on the existence of a constant, version number constraints, or whether an environment variable is set truthy or not.
Collect and Analyze Billions of Data Points in Real Time
Do you think we are missing an alternative of callbacks or a related project?
README
Callbacks
An expressive callbacks module for Crystal.
Supporters
Thanks to all my patrons, I can build and support beautiful Open Source Software! ๐
Lauri Jutila, Alexander Maslov, Dainel Vera
You can become a patron too in exchange of prioritized support and other perks
About
Callbacks defined with this module are properly inherited and run within a scope of the object itself (i.e. have an access to instance variables etc.).
Installation
Add this to your application's shard.yml
:
dependencies:
callbacks:
github: vladfaust/callbacks.cr
version: ~> 0.2.0
This shard follows Semantic Versioning 2.0.0, so see releases and change the version
accordingly.
Usage
require "callbacks"
class Foo
include Callbacks
def call
with_callbacks { puts "call" }
end
before do
puts "1"
end
before do
puts "2"
end
after do
puts "3"
end
after do
puts "4"
end
end
Foo.new.call
# 1, 2, call, 3, 4
Objects including Callbacks
module can also be inherited preserving all callbacks:
class Bar < Foo
# Childrens before callbacks have higher precedence
before do
puts "5"
end
# Childrens after callbacks executed after parents'
after do
puts "6"
end
end
Bar.new.call
# 5, 1, 2, call, 3, 4, 6
Contributing
- Fork it (https://github.com/vladfaust/callbacks.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- @vladfaust Vlad Faust - creator, maintainer