Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 30 05:47
    pyromaniac commented #408
  • Oct 29 15:41
    flash-gordon commented #408
  • Oct 29 15:22
    pyromaniac commented #408
  • Oct 29 15:17
    flash-gordon commented #408
  • Oct 29 13:18
    pyromaniac labeled #408
  • Oct 29 13:18
    pyromaniac opened #408
  • Oct 29 11:24
    pyromaniac edited #407
  • Oct 29 11:24
    pyromaniac edited #407
  • Oct 29 10:45
    pyromaniac opened #407
  • Oct 29 10:45
    pyromaniac labeled #407
  • Oct 28 05:15
    commitshappen starred dry-rb/dry-types
  • Oct 27 21:12
    GTcharles starred dry-rb/dry-types
  • Oct 27 19:49
    Autumn-Martin starred dry-rb/dry-monads
  • Oct 27 16:46
    GTcharles starred dry-rb/dry-types
  • Oct 26 19:19
    smorimoto starred dry-rb/dry-matcher
  • Oct 26 19:18
    smorimoto starred dry-rb/dry-monads
  • Oct 26 19:18
    smorimoto starred dry-rb/dry-system
  • Oct 26 19:18
    smorimoto starred dry-rb/dry-types
  • Oct 26 17:36
    AmenZhou starred dry-rb/dry-types
  • Oct 25 15:38
    bitberry-dev starred dry-rb/dry-monads
Alex Heeton
@heeton
I've been using the Schema this whole time, not Form :joy:
Thanks Andy
That post from Piotr is really interesting to see too
Andy Holland
@AMHOL
Yeah, I think I got it out of context a bit at first, thought it was regarding coercions but then I actually read it and edited my comment lol
But still interesting :)
@wafcio do you call App.finalize! or explicitly boot persistence (App.boot('persistence') anywhere?
Andy Holland
@AMHOL
Sorry, should be boot!
Krzysztof Wawer
@wafcio
I call App.finalize!
booter.finalize! is run I investigated it
and I found that when call method is invoked then finalizers hash is empty
Krzysztof Wawer
@wafcio
I mean not empty but container and finalizer variables are nil
ok I found what is going on, maybe it is bug, maybe it isn't:
my finalizers (persistence.rb) look like this:
ComicsScraper.namespace(:persistence) do |persistence|
  persistence.finalize(:rom) do
    init do
    end

    start do
    end
  end
end
finalizers hash contains this value: {:rom=>[ComicsScraper, #<Proc:0x007f9cb4205870@/Users/wafcio/projects/comics/scraper/system/boot/persistence.rb:2>]}
Krzysztof Wawer
@wafcio
but call method is invoked with :persistence argument, so it looks :persistence key in finalizers hash.
probably I should call file rom.rb like name in finalize method, and problem will not appear, but in my opinion it is bug
Andy Holland
@AMHOL
Oh, wait
ComicsScraper.namespace => ComicsScraper.finalize
Krzysztof Wawer
@wafcio
ComicsScraper.finalize! I run it
Andy Holland
@AMHOL

Yeah but this:

ComicsScraper.namespace(:persistence) do |persistence|
  persistence.finalize(:rom) do
    init do
    end

    start do
    end
  end
end

Should be:

ComicsScraper.finalize(:persistence) do |container|
  container.register(:rom) do
    init do
    end

    start do
    end
  end
end
Sorry, updated
I think anyway
Krzysztof Wawer
@wafcio
let me check
Andy Holland
@AMHOL
Or container.register should be called in the init block
# system/boot/db.rb

Application.finalize(:db) do |container|
  init do
    require 'some/3rd/party/db'

    container.register(:db, DB.configure(ENV['DB_URL']))
  end

  start do
    db.establish_connection
  end

  stop do
    db.close_connection
  end
end
Krzysztof Wawer
@wafcio
without namespace it works
Andy Holland
@AMHOL
Ahh OK, yeah, the idea there is that you add a bootable :rom component, but that registers persistence.rom in the container
Whereas you're trying to boot the namespace
Krzysztof Wawer
@wafcio
thanks for help
Andy Holland
@AMHOL
NP
Krzysztof Wawer
@wafcio
I am creating console ruby app with dry-system and some features are missing, which exist in dry-web. dry-web shouldn't be small wrapper with rack, monitoring stuff, which easly allow to create web app ? Am I correct or not ?
Pablo Herrero
@pabloh
Where can you find some documentation about defining custom types with coercion to use with dry-validation?
Don Morrison
@elskwid
@pabloh I went looking for this the other day and ended up digging around in rom-sql since there are custom types built for postgres (for example)
Andy Holland
@AMHOL
@wafcio if it's useful for a console app then it should probably be in dry-system
Krzysztof Wawer
@wafcio
@AMHOL should I create new topic about it on forum ?
Piotr Solnica
@solnic
Just report an issue
John Backus
@backus
@solnic thoughts on adding something like Dry::Types::Type which all type definitions inherit from? Seems like it would make dry types a bit easier to work with if all type definitions === Dry::Types::Type
blob
Not exactly true right now
(would also make the docs simpler :laughing: I'm currently trying to improve them even though they are already quite thorough)
Tim Riley
@timriley
@AMHOL Do you reckon you might be able to start a CHANGELOG.md for dry-configurable? :pray: :angel:
Oskar Szrajer
@gotar
hmm what happens with dry-fixtures? I was sure it was added some time ago to dry family , but cannot find it anywhere.
Tim Riley
@timriley
@gotar I don't think we had it. You might be interested in rom-factory though
Oskar Szrajer
@gotar
ah yes my mistake, I was searching for rom-factory ;]
thx
Andy Holland
@AMHOL
@timriley sure