by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Benjamin Klotz
@tak1n
const_get inc
Tim Riley
@timriley
But that’s so fragile. And not flexible.
Registering things with an explicit name is much much better.
Benjamin Klotz
@tak1n
yep, with const_get its easy to get everything u could possible get as const, and you have to deal with that eg.: use const_get only on proper modules where its allowed etc
with this registering and resolving its pretty explicit and you don't forget that
David Strauß
@stravid
I see, I will have to do some reading and thinking to figure out how it fits into my understanding of app development. Thanks for the input @tak1n @timriley
Simon Schmid
@sled
also it's much easier to write stubs ;)
Tim Riley
@timriley
Published the next in my “convince everyone to Ruby the dry-rb way” series: http://icelab.com.au/articles/inactive-records-the-value-objects-your-app-deserves/
Tim Cooper
@coop
s/Upboat/Upvote/
I think I prefer upboat.
Tim Riley
@timriley
aww, where’s the fun in that? ;)
Benjamin Klotz
@tak1n
@timriley awesome post, also upboated it ;) :D
Tim Riley
@timriley
Thanks! In 8 more post’s time, maybe I’ll be ready to introduce an actual app structure, haha
Benjamin Klotz
@tak1n
I'm waiting for it :P
Actually what's the plan with dry-web?
Any help needed to make progress?
Tim Cooper
@coop
I also think it was a good read :)
Tim Riley
@timriley
I’ll make a release this week, just so it’s out on rubygems. There’s plenty we could do with it, I think it might be good if we could get a bunch of things listed out into GH issues. Might need to wait for solnic to get back for some of that to happen. But I might start noting down some things when I get a chance :)
Benjamin Klotz
@tak1n
Okay, cool just ping me if you have smth I can help with :)
Tim Riley
@timriley
Awesome, will do.
dan-klasson
@dan-klasson
```
    def key(name, &block)
      ::Kernel.warn 'key is deprecated - use required instead.'

      required(name, &block)
    end
docs are not updated?
Tim Riley
@timriley
@dan-klasson this isn’t released as a gem version yet
We have doc updates waiting on the releases.
dan-klasson
@dan-klasson
@timriley cool, thx
Tim Riley
@timriley
No probs!
dan-klasson
@dan-klasson
@timriley is master stable? is it safe to use?
Tim Riley
@timriley
I reckon so
Of course, you take a risk whenever you use master of anything, but AFAIK it’s fine here :)
panigrah
@panigrah

@timriley the following doesn't work on master any more. fails with a NoMethodError for 'key'

 require 'dry-validation'
 class Schema < Dry::Validation::Schema::Form
      key(:email) { |email| email.filled? }
  end

did the API change?

Tim Riley
@timriley
Yeah, it did.
required(:email).filled is whart you want now
dry-rb/dry-validation#99 is a decent summary
David Strauß
@stravid
@timriley upboated! Please keep writing them :)
Benjamin Klotz
@tak1n
ugh dry-rb/dry-types#78 :(
panigrah
@panigrah
@timriley In master - I also cannot extend Dry::Validation::Schema::Form as described in documentation - is that intentional? See my excerpt above. Thanks
Hannes Nevalainen
@kwando
@panigrah
Dry::Validation.Form{
  key(:email) { |email| email.filled? }
}
New syntax
panigrah
@panigrah
Thanks @kwando I wanted to know if the old syntax is supported or retired. Guessing it is retired
Hannes Nevalainen
@kwando
Yeah, it is retired =)
Tim Cooper
@coop
I wonder if it is worth adding a caluse to the README explaining that these docs are for master - checkout the appropiate release for the relevant docs.
I’m sure I’ve seen other projects do that.
Hannes Nevalainen
@kwando
:thumbsup: for that
dan-klasson
@dan-klasson
@coop actually the docs is for the latest release, not master
Tim Cooper
@coop
@dan-klasson the docs on the website are but I said README.md.
dan-klasson
@dan-klasson
@coop but there is nothing in the README
Tim Cooper
@coop

@dan-klasson

I wonder if it is worth adding a caluse to the README explaining ...

dan-klasson
@dan-klasson
... that these docs are for maste