These are chat archives for dry-rb/chat

10th
Jun 2016
Piotr Solnica
@solnic
Jun 10 2016 09:15
@timriley yeah I'm happy about it :) more will come next week
Dwayne Crooks
@dwayne
Jun 10 2016 10:02
Hi @solnic, is there a way to quickly create custom constraints for dry-types. For e.g.
class SomeStruct < Dry::Types::Struct
    # ...
    attribute :date, Types::Form::Date.constrained { |date| date.year > 2010 && date.day < 20 }
    # ...
end
Maciej Mensfeld
@mensfeld
Jun 10 2016 11:04
@solnic Is there a way to make a field dependent on a paretn schema field presence?
I mean I would like to require a certain field in a subschema only if a different field is present in the main schema
Maciej Mensfeld
@mensfeld
Jun 10 2016 11:14
ah and I would like to access that field ;)
Oskar Szrajer
@gotar
Jun 10 2016 11:15
I saw example some time ago, then I think it's possible, but will not help more, you need for some dry-v expert ;]
Piotr Solnica
@solnic
Jun 10 2016 13:16
Sorry folks I'm driving for the whole day today so I'll get back you in the evening
Tanner Donovan
@ttdonovan
Jun 10 2016 18:59
Are the current documented examples for dry-logic working? I must be missing something...
Piotr Solnica
@solnic
Jun 10 2016 19:00
Probably not
I'll update them for next release (eta next week)
Tanner Donovan
@ttdonovan
Jun 10 2016 19:02
ok - so until then I should dig into the specs to figure out the correct API or would looking at dry-validations or dry-types be better
Piotr Solnica
@solnic
Jun 10 2016 19:28
dry-logic specs are fine to look at. Not everything is properly covered though as this one was extracted from dry-v so I need to improve that at some point
Rafael França
@rafaelfranca
Jun 10 2016 20:56
hello people! I'm experimenting with dry-validations. I defined one some what schema but I got a huge performance penalty in my boot time when using the gem. It was 30% slower. We are going to report the issue with number and ways to reproduce but are you aware of anything that could cause it?
Piotr Solnica
@solnic
Jun 10 2016 22:04
@rafaelfranca pls report, I'll see how it behaves on master
Tim Riley
@timriley
Jun 10 2016 22:49
I’m starting the dry-web-roda project with all the roda-specific bits extracted from dry-web. @AMHOL, would you be up for me adjusting your roda-flow repo plugin so it doesn’t have a hard dependency on roda-container? We could include in its README info how how to set up the two together. Then we could require that from dry-web-roda without having to duplicate your code.
Piotr Solnica
@solnic
Jun 10 2016 23:16
@timriley we have a customized version of this plugin in dry-web...itb good to get that merged into roda-plugin btw
Tim Riley
@timriley
Jun 10 2016 23:18
@solnic yeah, I was planning to remove that plugin from dry-web-roda and at least depend on the standalone roda-flow gem, as a first step.
I think I’m doing exactly what you describe, actually.