Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 09:13

    solnic on release-0.17

    Add information about built-in … (compare)

  • 09:11

    solnic on add-settings-section

    (compare)

  • 09:11

    solnic on master

    Add information about built-in … (compare)

  • 09:11
    solnic closed #145
  • 07:26
    Yuki-Inoue starred dry-rb/dry-monads
  • Apr 07 15:30

    davydovanton on rack-middleware-compat-with-rack-builder

    (compare)

  • Apr 07 15:30

    davydovanton on master

    Ensure `Dry::Monitor::Rack::Mid… Merge pull request #37 from dry… (compare)

  • Apr 07 15:30
    davydovanton closed #37
  • Apr 07 14:58
    JPalka starred dry-rb/dry-monads
  • Apr 07 14:49
    dry-bot commented #37
  • Apr 07 14:42
    jodosha edited #37
  • Apr 07 14:42
    jodosha review_requested #37
  • Apr 07 14:42
    jodosha labeled #37
  • Apr 07 14:42
    jodosha review_requested #37
  • Apr 07 14:42
    jodosha assigned #37
  • Apr 07 14:42
    jodosha opened #37
  • Apr 07 14:37

    jodosha on rack-middleware-compat-with-rack-builder

    Ensure `Dry::Monitor::Rack::Mid… (compare)

  • Apr 07 11:56
    davydovanton synchronize #145
  • Apr 07 11:56

    davydovanton on add-settings-section

    Update docsite/source/settings.… (compare)

  • Apr 07 11:43
    davydovanton commented #145
Oskar Szrajer
@gotar
Hi, I'm trying to validate something like this in dry-v. a field values is any array of strings, if inside those array there is a value 'foo' it must validate presence of 'bar', 'baz' too, so something like
values.include?('foo') > values.include?('bar') & values.include?('baz')
is it possible? I don't have any good idea how to achieve this
Vasily Kolesnikov
@v-kolesnikov
I would prefer to avoid that validation at all, even if dry-v could do it. It sounds strange to have data like unstructured array of strings. Could you give a real example of usage the data like that?
Oskar Szrajer
@gotar
User select answers in a form, it's a checkbox (multiselect) is he select one from them he must select some others.
I found some solution, just a custom predicate, works ok-ish ;]
Vasily Kolesnikov
@v-kolesnikov
:ok_hand:
Oskar Szrajer
@gotar
and I'm building this for existing form, cannot change logic/form there
Ariel Valentin
@arielvalentin
Hello friends. Pitor recently invited me to collaborate on dry-system-rails. I have kept most of my comments in the discourse forum or pull requests. Are those still the best place to discuss design/code changes? What is appropriate to discuss here?
Tim Riley
@timriley
@arielvalentin both of those places are better than here, yep. I’d keep doing what you’re doing.
Ariel Valentin
@arielvalentin
Thank you @timriley !
Trey Pendragon
@tpendragon
Hey all. I was wondering if there's a plan for a 1.0 release of the dry ecosystem?
Our community has started using it, and we've had a system in production using it instead of ActiveRecord and the like for the last year, but it'd be nice to be able to rely on semver.
Nikita Shilnikov
@flash-gordon
@tpendragon is it that important? :) A few things to keep in mind
the API is pretty stable already and we try to make all the changes in a backwards compatible manner
Trey Pendragon
@tpendragon
I agree, you've done a great job. Is it a problem to just cut what exists as 1.0.0 and keep on doing that?
Nikita Shilnikov
@flash-gordon
second, we coordinate our releases with hanami's ones, that means if for any reason we'll need breaking changes (unlikely) this will give us some freedom. Still, we follow semver so this shouldn't be a problem
but we do have checklists for 1.0s
Trey Pendragon
@tpendragon
Working for Universities, we tend to put a lot of stock in specifications, so I just know it would make a number of my colleagues more comfortable were things like dry-types and dry-struct to have the commitment behind them that comes with 1.0. Otherwise, while you've done a great job, technically you're outside the realm of responsibility yeah?
If you're not comfortable with it I understand, I know it's a daunting thing. Do you have a link to the checklist of requirements somewhere? Maybe I can help.
Nikita Shilnikov
@flash-gordon
as I said, it's a matter of coordination, otherwise I'd push 1.0 and call it a day :) I don't think there's a big issue with how you number your gems as long as you follow semver. What I can say, it's dry-types is expected to be the next 1.0 release since it's mature and stable. But we do have plans to introduce some (non-breaking I hope) changes before that.
Trey Pendragon
@tpendragon
Okay. :) I'll keep an eye on it. We're about to release some code that depends on 0.13 of dry-types, so I look forward to seeing what's coming up.
Thanks!
Manic Chuang
@manic

Hi guys, it seems that I maybe encounter a bug of dry-types SUM, but I'm not sure. Could you help me on this?

It happens when I try to verify a object which should be a hash or a string

test = Dry::Types['hash'].map(Dry::Types['symbol'], Dry::Types['strict.string']) | Dry::Types['strict.string']
test[a: 'b'] # passed as expected
test['a' => 'b'] # should fail but pass!
test['test'] # passed as expected
test[12345] # should fail but pass!

I'm wondering if there is anything that I didn't notice or I use the wrong way to build my rule. Thanks :)

Tim Riley
@timriley
@manic I tried this, using “strict.symbol” instead of “symbol” (which IMO you probably want) and it still fails in the way you’re seeing. Could you please file a bug?
Manic Chuang
@manic
@Tim Sure, thank you
Manic Chuang
@manic
@timriley dry-rb/dry-types#280 here it is.
Pablo Crivella
@pablocrivella
Any idea how could i make this Map type also accept nil as values?
Links = Map(Symbol, String | JSONAPI::Types::Link)
This works but i’m not sure if its the correct way:
Links = Map(Symbol, String | JSONAPI::Types::Link.optional)
Nikita Shilnikov
@flash-gordon
no idea, probably related to the issue above
Jeff Dickey
@jdickey
Hi, folks. Question about dry-configurable. Do I understand correctly that "pre-processing" with a block is done once and memoised? Does defining a block automatically imply reader: true ?
Tim Riley
@timriley
@jdickey providing a processor doesn’t have any effect on whether the setting comes with a reader or not
if you want a reader, you still need to provide reader: true
Jeff Dickey
@jdickey
Right. Figured that out and forgot to delete the question. I got confused way too late in my day; really gotta stop having such long days. They just make me stupid. 🤓 Thanks, Tim
Tim Riley
@timriley
@jdickey no worries!
Pablo Crivella
@pablocrivella
Does anyone has some tips/best practices for using dry-transactions/operations? Like is it better to always use keywargs, or when to use step_args and when not to. Naming conventions, etc. Any feedback is welcome :sweat_smile:
Eliav Lavi
@eliav-lavi

Hello, I wanted to try out dry-web-roda but encountered problems quite early in the process. I read the docs a few times but could not figure it out. Could anybody assist?
Basically, I created a new project with dry-web-roda new dwr_test. Then, within the directory, I ran rake db:create. Then I tried rackupand then got this:

dwr_test rackup
/Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:13:in `block in <class:Controller>': undefined method `context=' for #<#<Class:0x00007f82150fe198>:0x00007f82150e5e18> (NoMethodError)
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-configurable-0.7.0/lib/dry/configurable.rb:70:in `configure'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:11:in `<class:Controller>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:10:in `<module:View>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:9:in `<module:Main>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:8:in `<module:DwrTest>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/view/controller.rb:7:in `<top (required)>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/views/welcome.rb:1:in `require'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/lib/dwr_test/main/views/welcome.rb:1:in `<top (required)>'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/container.rb:541:in `require'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/container.rb:541:in `require_component'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:37:in `block in call'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:34:in `each'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:34:in `call'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:27:in `block in finalize!'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:27:in `each'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/auto_registrar.rb:27:in `finalize!'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/dry-system-0.9.2/lib/dry/system/container.rb:300:in `finalize!'
    from /Users/eliavlavi/git_projects/roda/dwr_test/apps/main/system/boot.rb:3:in `<top (required)>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/system/boot.rb:15:in `require'
    from /Users/eliavlavi/git_projects/roda/dwr_test/system/boot.rb:15:in `block in <top (required)>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/system/boot.rb:14:in `each'
    from /Users/eliavlavi/git_projects/roda/dwr_test/system/boot.rb:14:in `<top (required)>'
    from /Users/eliavlavi/git_projects/roda/dwr_test/config.ru:1:in `require_relative'
    from /Users/eliavlavi/git_projects/roda/dwr_test/config.ru:1:in `block in <main>'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
    from /Users/eliavlavi/git_projects/roda/dwr_test/config.ru:in `new'
    from /Users/eliavlavi/git_projects/roda/dwr_test/config.ru:in `<main>'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/eliavlavi/.rvm/gems/ruby-2.4.2/gems/rack-2.0.6/lib/rack/builder.rb:40:in

I had to truncate the end of it, gitter was trimming me. Any idea what's wrong?
Thanks a lot 🙏

Vasily Kolesnikov
@v-kolesnikov
Hi @eliav-lavi :wave:
It should not be so hard to fix.
Do you have a repository with this code?
Eliav Lavi
@eliav-lavi
@v-kolesnikov Hello :wave:, I do not but I can push it to github, honestly it's very "raw" - happens just after creating a new project. I think there is some mismatch between dry-configurable to dry-view in some sense, but not sure (the config object yielded to configure doesn't have a context attribute). If it's easier I'll push it to github, would that be preferable?
Thank you!
Vasily Kolesnikov
@v-kolesnikov
I need to know which version of dry-w you used to be more precise.
Just push it and share the link.
Eliav Lavi
@eliav-lavi
from gem list, these are the dry gems:
dry-auto_inject (0.6.0, 0.4.6, 0.4.4)
dry-configurable (0.7.0)
dry-container (0.6.0)
dry-core (0.4.7, 0.4.4, 0.3.4)
dry-equalizer (0.2.1, 0.2.0)
dry-events (0.1.0)
dry-inflector (0.1.2)
dry-initializer (2.5.0, 2.3.0, 1.4.1)
dry-logic (0.4.2)
dry-matcher (0.7.0, 0.6.0)
dry-monads (1.0.1, 1.0.0, 0.4.0, 0.3.1)
dry-monitor (0.1.2, 0.0.3)
dry-struct (0.5.1, 0.5.0, 0.4.0, 0.3.1)
dry-system (0.10.1, 0.9.2, 0.8.1)
dry-transaction (0.13.0, 0.10.2)
dry-types (0.13.2, 0.12.3, 0.12.1, 0.11.1)
dry-validation (0.12.2, 0.11.1, 0.11.0)
dry-view (0.5.4, 0.4.0)
dry-web (0.8.0, 0.7.1)
dry-web-roda (0.11.0, 0.9.0)
OK, on it, thanks!
Vasily Kolesnikov
@v-kolesnikov
Two version of dry-w :smile:
Eliav Lavi
@eliav-lavi
😩 I just noticed that!
it's weird, I barely touched the Gemfile, just added ruby '2.5.3' and gem "shotgun"...
Vasily Kolesnikov
@v-kolesnikov
and?