These are chat archives for dry-rb/chat

5th
Mar 2017
Minh Quy
@MQuy
Mar 05 2017 02:36
@solnic if i add constructor_type :schema, it will skip validate for all fields, but it should validate for email and encrypted_password 🤔
Piotr Solnica
@solnic
Mar 05 2017 09:17
@MQuy it doesn’t validate, it applies type constructors from your attributes, always. So you will get an error if you passed a value that violates a constraint
Piotr Solnica
@solnic
Mar 05 2017 09:38
oh I see it now, so with :schema it somehow sets nil when it’s missing in attributes hash
Nick Ostrovsky
@firedev
Mar 05 2017 10:06
Hey guys, @solnic, so if I want to start a new life, without rails where do I start? I try dry-web-roda but it's a little bit unclear what goes where at first. What should I read?
Piotr Solnica
@solnic
Mar 05 2017 10:08
@firedev sorry but I’m about to leave…in the meantime you can look at icelab/berg project, it hasn’t been updated for a while though, but there’s some stuff you can look at
Nick Ostrovsky
@firedev
Mar 05 2017 10:08
I mean I am working on sinatra/sequel app which is in production, so I understand what it's like to live without rails, but i want something more dry-rbish
@solnic no worries, guess I'll hover here
Gustavo Caso
@GustavoCaso
Mar 05 2017 10:09
@firedev here is the repo https://github.com/icelab/berg
Nick Ostrovsky
@firedev
Mar 05 2017 10:10
yep, thanks, saw that, didn't check it out yet, thought I need to read some docs or something first, so the question is if there is a "required reading" or something
Gustavo Caso
@GustavoCaso
Mar 05 2017 10:11
Well I'm not really familiar with all the dry libraries, have you use any of them before ?
Nick Ostrovsky
@firedev
Mar 05 2017 10:12
nope, but I use similar concepts, in-house and from other libraries, need to figure out how to migrate once and for all
Gustavo Caso
@GustavoCaso
Mar 05 2017 10:15
Yes, this is my opinion, and repeat I'm not an expert.
I'm working on a big rails project at work and what I'm doing is isolating all the validations, and will start by migrating them to use dry-validations
Nick Ostrovsky
@firedev
Mar 05 2017 10:16
I would try replacing query objects with rom-db but i am not sure if sequel and activerecord can be mixed in one codebase
@solnic how can I help with docs?
Nikita Shilnikov
@flash-gordon
Mar 05 2017 10:19
@firedev sequel and AR can be in the same codebase if you're brave enough. Depending on you case and environment this can be easy or not, if you get any question on this, ping me in rom-rb chat
Nick Ostrovsky
@firedev
Mar 05 2017 10:21
you mean like here?
I just want isolated queries in Sequel for now
Nikita Shilnikov
@flash-gordon
Mar 05 2017 10:22
ahaha, this one is dry-rb's :)
Nick Ostrovsky
@firedev
Mar 05 2017 10:22
oh
Nick Ostrovsky
@firedev
Mar 05 2017 12:24
hmm so I have tried berg, it feels like slow-motion, why is that? every page loads with some delay
1.4s to show a page
Piotr Solnica
@solnic
Mar 05 2017 12:32
@firedev probably because of shotgun
I switched to entr which restarts puma on file changes
we haven’t updated berg lately so it doesn’t fully represent current state of things
Nick Ostrovsky
@firedev
Mar 05 2017 12:33
I see, guess I need to start with plain dry-web-roda
yep, production procfile feels better, thanks
Piotr Solnica
@solnic
Mar 05 2017 12:40
I’ll add entr-based reloader to dry-web soon, we use it at Icelab and it’s literally a 1-line script
I’ll also speed up dry-system so that it boots faster, some changes around 0.5 version made it slower
Nick Ostrovsky
@firedev
Mar 05 2017 12:41
nice