Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 17:32
    reedlaw starred dry-rb/dry-types
  • Dec 03 11:31
    timriley synchronize #155
  • Dec 03 11:31

    timriley on rich-component-dirs-config

    Clarify names Fixup naming Total messy WIP (compare)

  • Dec 02 22:38
    diegocasmo starred dry-rb/dry-initializer
  • Dec 02 17:58

    flash-gordon on wrapper-type

    Add wrapper type It's a POC of… (compare)

  • Dec 01 23:13
    hguerrerojaime synchronize #154
  • Dec 01 05:18
    timriley opened #155
  • Dec 01 05:10

    timriley on rich-component-dirs-config

    Fix wording of spec Add Rubocop rule Start getting component_dirs in… and 3 more (compare)

  • Nov 29 13:21
    flash-gordon commented #130
  • Nov 29 13:19
    flash-gordon commented #130
  • Nov 29 10:29
    bigsolom commented #87
  • Nov 29 07:42

    flash-gordon on master

    Add note about Do::All caveat … Merge pull request #134 from ma… (compare)

  • Nov 29 07:42
    flash-gordon closed #134
  • Nov 29 07:42
    flash-gordon commented #134
  • Nov 29 07:37
    flash-gordon closed #130
  • Nov 29 07:37
    flash-gordon commented #130
  • Nov 28 22:36

    dry-bot on master

    [devtools] sync (compare)

  • Nov 28 22:35

    flash-gordon on keep-method-visibility

    (compare)

  • Nov 28 22:35

    flash-gordon on master

    Add specs that demonstrate the … When wrapping methods, be expli… Visbility-preserving API for Do… and 3 more (compare)

Gustavo Caso
@GustavoCaso
Hope this helps
Jeff Dickey
@jdickey
yep, that makes perfect sense; so obvious I couldn't possibly see it 🤓
thanks a lot; you just saved me likely a weekend of Rube Goldberging
Gustavo Caso
@GustavoCaso
hehe happy to help
Julien Blanchard
@julienXX
Hello is there a way with dry-transaction to have multiple arguments in a step without with_step_args? I'm calling a dry-transaction from a Rails controller and having the controller knowing the steps bothers me.
Gustavo Caso
@GustavoCaso
At the moment no
If you want you can overwrite the steps by wrapping them
Julien Blanchard
@julienXX
Thanks I'll have a look :)
Gustavo Caso
@GustavoCaso
No problem
Jamie Gaskins
@jgaskins
@jdickey Re: assets, I wrote a gem called roda-opal_assets that lets you use Sprockets with Roda for asset dependencies. Not sure if you need something that involved or if the assets plugin is enough, but it's just become my go-to for all assets in Roda apps now (not just Clearwater apps) since Sprockets handles caching and fingerprints for cache invalidation.
Ghost
@ghost~545771cbdb8155e6700d0a6f

quick question
if I have

MODEL  = Model::Country

and Model::Country is a dry-struct entity, which have couple of attributes from Dry-Types
and some how, wrongly, instead of using MODEL.new for instance in our code we repeated Model::Country that thrown attributes already initialized error, is this normal ?

Aaron Jensen
@aaronjensen
Anyone know what happened to dry-schema?
Tim Riley
@timriley
@aaronjensen development hasn’t started in earnest yet
it’s still coming
Aaron Jensen
@aaronjensen
oh. we were using it and the docs disappeared
Piotr Solnica
@solnic
@aaronjensen u sure you meant dry/schema? It hasn’t been released yet
Aaron Jensen
@aaronjensen
erg, i confused myself, sorry. We're using dry::validation and we have a module named schema :)
so, nevermind me. Just so I understand though, dry/schema will be some things extracted from dry-validation that would be able to be used on its own in some way?
unrelated question: If we wanted to validate that something was a hash with string keys and string or number values, would we have to write a custom validator or is there a way to represent that with existing validators or types?
Piotr Solnica
@solnic
validating keys is not supported
it’s one of the things that is on 1.0 roadmap
and yes, dry-schema will be a subset of dry-validation, and dry-validation 1.0 will be built on top of if
s/if/it/
Aaron Jensen
@aaronjensen
got it, thank you
Markus Unterwaditzer
@untitaker
If I have a field of type Array inside a dry struct, I can still modify the array in-place. Wouldn't it make sense to auto-freeze arrays and hashes during struct instantiation?
perhaps something like dup.freeze is actually necessary, since freeze itself is a form of mutation.
Nikita Shilnikov
@flash-gordon
you can use Dry::Struct::Value I think
but keep in mind that deep-freeze is dead slow
Markus Unterwaditzer
@untitaker
I'm not even talking about deep-freeze. I have a model Model::Foo where one field is of type Types::Strict::Array.member(Model::Bar). My problem is that that field is still mutable, I can append more Bars.
both models are structs
Nikita Shilnikov
@flash-gordon
it’s no difference with other types of attributes, say, you have a string attr and you still can mutate it with gsub! and etc
you can workaround this with your own constructor types
Markus Unterwaditzer
@untitaker
sure, but I wonder if you would accept a PR which would call freeze in Types::Strict::Array or something like that. Or is dry-types not supposed to be always immutable?
Nikita Shilnikov
@flash-gordon
dry-types has nothing to do with this
though it can have types that dups and freezes values
list of types I mean
like strict but frozen of something
/cc @solnic
Gustavo Caso
@GustavoCaso
Something in the lines of Types::Freeze::Array
Markus Unterwaditzer
@untitaker
What do you think about having Types::Strict::Array.frozen as constructor?
I'm wishing for something that would automatically load that constructor for me in any dry-struct (since I want everything in my models to be immutable without me explicitly specifying it for each attribute)
Also not sure what to do with coercible types etc... you'd need Types::CoercibleFrozen, Types::StrictFrozen, ...
Nikita Shilnikov
@flash-gordon
you probably want to benchmark it. Anyway, we won’t add a new method to the API because it affects everything
you can just redefine Struct.attribute to make it work the way you want
Markus Unterwaditzer
@untitaker
This message was deleted
isn't the entire point of using dry-struct to have everything as immutable?
Gustavo Caso
@GustavoCaso
I think using dry-struct is to have something like a value object
Or application data if you will
Represent something from your system