#dryrb — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #dryrb, aggregated by home.social.
-
re:
> How developers sound to non-developers when you talk shopOhh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby
Never again without a contract: dry-validation
https://www.rubyevents.org/talks/never-again-without-a-contract-dry-validation
where I also featured your work, Ryan :)
⁺ wow almost 3 year ago to the date.
#dryrb -
re:
> How developers sound to non-developers when you talk shopOhh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby
Never again without a contract: dry-validation
https://www.rubyevents.org/talks/never-again-without-a-contract-dry-validation
where I also featured your work, Ryan :)
⁺ wow almost 3 year ago to the date.
#dryrb -
re:
> How developers sound to non-developers when you talk shopOhh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby
Never again without a contract: dry-validation
https://www.rubyevents.org/talks/never-again-without-a-contract-dry-validation
where I also featured your work, Ryan :)
⁺ wow almost 3 year ago to the date.
#dryrb -
re:
> How developers sound to non-developers when you talk shopOhh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby
Never again without a contract: dry-validation
https://www.rubyevents.org/talks/never-again-without-a-contract-dry-validation
where I also featured your work, Ryan :)
⁺ wow almost 3 year ago to the date.
#dryrb -
re:
> How developers sound to non-developers when you talk shopOhh yeah! the Rockwell retro encaburator, I featured that in my 2022⁺ #RubyConf talk while talking about #Monads in #ruby
Never again without a contract: dry-validation
https://www.rubyevents.org/talks/never-again-without-a-contract-dry-validation
where I also featured your work, Ryan :)
⁺ wow almost 3 year ago to the date.
#dryrb -
Hanami 2.3 beta1 is out! This is the one that includes Rack 3 support 🚀
https://hanamirb.org/blog/2025/10/03/announcing-hanami-230beta1/
If you have any questions, join the #Hanami Discord server: https://discord.gg/KFCxDmk3JQ
-
Hey, Dry::Struct users... is this "Hash to attributes" thing considered a feature? I find it messy...
I can see the advantages, but I can clearly also see the cons, especially in terms of predictability and debugging...
Took me literally hours to chase a missing object return before I got the hang of this. #ruby #dryrb
-
Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:
* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.Feedback and corrections (especially) are welcome! Please let me know what you think!
https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/
-
Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:
* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.Feedback and corrections (especially) are welcome! Please let me know what you think!
https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/
-
Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:
* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.Feedback and corrections (especially) are welcome! Please let me know what you think!
https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/
-
Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:
* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.Feedback and corrections (especially) are welcome! Please let me know what you think!
https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/
-
Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:
* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.Feedback and corrections (especially) are welcome! Please let me know what you think!
https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/
-
I got the idea for command_kit-completion after seeing that dry-cli now has it's own completion generation code that used the 'completely' gem. So if you're a dry-cli user, go use that library for shell completions.
https://github.com/rngtng/dry-cli-completion#readme
#dryrb -
Using dry-validation and an HTML form, how would you handle a field which can be either a boolean or a comma separated list? It must ultimately map to the same symbol name.
#dry_validations #dryrb -
@Sandbagger I'm glad you found that #ruby toy project interesting, the ogpreview was not meant for document #docker with #Rails, but mostly to demonstrate good practices such as Railway Oriented Programming in general and @dry_rb gems in particular.
Also, if you want to go a little bit deeper, you can check the repository for my talk in #RubyConf2022, where it was more about API input validations & in general and #modularity by accident:
-
However, if I change Args to use an explicit block, it works for some reason:
```
require 'dry/types'module Types
include Dry::Types()
Args = Types::Array.of(Types::String).constructor do |value|
value.split
end
endrequire 'dry/schema'
Params = Dry::Schema::Params() do
required(:args).filled(Types::Args)
endParams.call("args" => "foo bar")
# => #<Dry::Schema::Result{:args=>["foo", "bar"]} errors={} path=[]>
```
#dryrb #dry_rb -
Hmm, think I found an inconsistency in dry-types:
```
require 'dry/types'module Types
include Dry::Types()
Args = Types::Array.of(Types::String).constructor(&:split)
endrequire 'dry/schema'
Params = Dry::Schema::Params() do
required(:args).filled(Types::Args)
endParams.call("args" => "foo bar")
# => #<Dry::Schema::Result{:args=>"foo"} errors={:args=>["must be an array"]} path=[]>
``` -
I wonder if dry-schema or dry-validation can coerce a String into an Array by splitting the String. I assume I can define a custom type that can do that?
#dryrb -
I'm also curious how people are using dry-validation/dry-schema/dry-struct to handle sinatra params from forms or sidekiq job arguments. Do people use the dry-* libraries directly, or do they use one of the other plugin libraries such as sinatra-validation, sinatra-dry_params, or sidekiq-dry?
https://github.com/IzumiSy/sinatra-validation
https://github.com/tiev/sinatra-dry_param
https://github.com/zorbash/sidekiq-dry
#dryrb #sinatra #sidekiq #params -
should dry-schema or dry-validation rules be defined as named classes, or inline in the sinatra routes using sinatra-validation? If defined as classes, what is the best practice for naming them or what directory should they be stored in?
https://github.com/IzumiSy/sinatra-validation#usage
#dryrb #sinatra -
-
Since ruby.social runs on Mastodon 4.0 now, you can follow hashtags!
Here are some hashtags that I'll be using for development updates:
Simply click on a hashtag and then another click on that➕ icon 🙂
-
Huge progress on dry-logger today. Took a bit longer than I anticipated and I was actually close to give up, but somehow I managed to pull this off. The next, and final, step is re-introduction of colorful output for rack request logging and 1.0.0 will be ready.