postmodern · @postmodern
1343 followers · 2040 posts · Server ruby.social

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

Last updated 1 year ago

Esparta :ruby: · @esparta
234 followers · 1133 posts · Server ruby.social

@Sandbagger I'm glad you found that toy project interesting, the ogpreview was not meant for document with , 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 , where it was more about API input validations & in general and by accident:

github.com/esparta/rubyconf202

#ruby #docker #rails #rubyconf2022 #modularity #dryrb #dryvalidation

Last updated 1 year ago

aristotelesbr · @aristotelesbr
16 followers · 39 posts · Server ruby.social

Dry Transaction permite que você modele o fluxo de trabalho como uma série de operações independentes. A principal vantagem do Dry Transaction é que ele permite que você mantenha sua lógica de negócios livre de detalhes de implementação. ❤️
Vale apena conhecer. dry-rb.org/

#ruby #fp #dry #drymonads #dryrb

Last updated 1 year ago

christine · @christine
249 followers · 205 posts · Server ruby.social

pro tip: Remember to actually drink water before your talk. Else you are going to be as dry as the Sahara when you are trying to talk about and

#speaking #dryrb #hanami

Last updated 1 year ago

postmodern · @postmodern
1212 followers · 1380 posts · Server ruby.social

Is there a way to convert `Dry::Schema.Params` into an identical `Dry::Schema.JSON` schema? What if I want to coerce/validate both HTTP params and deserialized JSON params?

#dryrb #dry_rb

Last updated 1 year ago

postmodern · @postmodern
1212 followers · 1377 posts · Server ruby.social

Why doesn't `Dry::Types::Range` have an `.of()` method for specifying that the Range must be of Integers or Strings?

#dryrb #dry_rb

Last updated 1 year ago

postmodern · @postmodern
1211 followers · 1371 posts · Server ruby.social

Where should I store my dry-validation or dry-schema classes if I'm not using Hanami or Rails? Obviously if I was using dry-struct, I'd store them in `models/`. However, where should dry-validation contract classes go?

#dryrb #dry_rb

Last updated 1 year ago

postmodern · @postmodern
1210 followers · 1364 posts · Server ruby.social

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

Last updated 1 year ago

postmodern · @postmodern
1210 followers · 1362 posts · Server ruby.social

I also wonder what is the best way to raise an exception or log errors returned by dry-validations from within a sidekiq worker? Say somehow malformed data gets passed to MyWorker.perform_async(...) but the MyWorker class validates the data using dry-schema or dry-validation.

#dryrb #sidekiq

Last updated 1 year ago

postmodern · @postmodern
1210 followers · 1361 posts · Server ruby.social

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?
github.com/IzumiSy/sinatra-val
github.com/tiev/sinatra-dry_pa
github.com/zorbash/sidekiq-dry

#dryrb #sinatra #sidekiq #params

Last updated 1 year ago

postmodern · @postmodern
1210 followers · 1352 posts · Server ruby.social

should dry-schema or dry-validation rules be defined as named classes, or inline in the sinatra routes using sinatra-validation?
github.com/IzumiSy/sinatra-val

#dryrb #sinatra

Last updated 1 year ago

christine · @christine
244 followers · 196 posts · Server ruby.social

@BobbyMcWho I think the newest stuff that is happening with and version 2.0 is pretty interesting! There is a lot of going on in the Ruby without Rails ecosystem, @solnic @timriley and @jodosha are putting out some amazing code.

#dryrb #hanami

Last updated 1 year ago

postmodern · @postmodern
1058 followers · 948 posts · Server ruby.social

There should be a dry-cache library which allows you to insert a caching layer in between methods.
/cc @dry_rb

#dryrb

Last updated 2 years ago

Joel Drapper :whyfox: · @joeldrapper
372 followers · 254 posts · Server ruby.social

@timriley @solnic On my iPhone, is pronounced "drib" but is "dry are bee". is also pronounced correctly.

#dryrb #dry_rb

Last updated 2 years ago

Peter Solnica · @solnic
760 followers · 193 posts · Server ruby.social

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 🙂

#hanami #dryrb #romrb #noxp

Last updated 2 years ago

Peter Solnica · @solnic
758 followers · 186 posts · Server ruby.social

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.

#dryrb #hanami #logging #opensource #gem

Last updated 2 years ago

Nicolas Buduroi · @budu
5 followers · 12 posts · Server ruby.social

@konnorrogers yeah, I really hope the Rails team takes notice and start integrating some gems. Almost all Rails apps already have them because of some other gem dependency nowadays.

#dryrb

Last updated 2 years ago

Nicolas Buduroi · @budu
5 followers · 12 posts · Server ruby.social
· @007lva
15 followers · 55 posts · Server ruby.social
· @007lva
15 followers · 55 posts · Server ruby.social

-rb

dry-view 0.6.0, an introductory talk, and plans for 1.0:

bit.ly/2TKwBuz

#dryrb #dry

Last updated 6 years ago