These are chat archives for dry-rb/chat

31st
Jan 2017
Oskar Szrajer
@gotar
Jan 31 2017 07:58
great I just start update, but updating dry-web-(roda) will be the best idea probably
Tim Riley
@timriley
Jan 31 2017 08:13
@gotar yeah - I plan to do this in the next week! I want everything to be polished up a little more before RubyConf AU.
Oskar Szrajer
@gotar
Jan 31 2017 08:22
yeah, no pressure it's nothing urgent. ps I love the fact berg is open source so many inspirations every day ;]
Piotr Solnica
@solnic
Jan 31 2017 12:38
@gotar btw I took your dry-web skeleton and updated it quite a bit and put it here https://github.com/dry-rb/dry-web-blog
it’s stripped down to bare min skeleton for now
but I’ll add a branch with some actual app with routes doing some things
Oskar Szrajer
@gotar
Jan 31 2017 12:42
great! thx
I think It will help a lot others to start
Piotr Solnica
@solnic
Jan 31 2017 12:43
still some rough edges to address though
I’ll get to it at some point
Oskar Szrajer
@gotar
Jan 31 2017 12:43
I will drop my repo,
Oskar Szrajer
@gotar
Jan 31 2017 12:50
OK i link my old repo to new one
Piotr Solnica
@solnic
Jan 31 2017 12:50
sounds good
Oskar Szrajer
@gotar
Jan 31 2017 12:51
I now use berg as a skeleton, but much simpler example will help a lot for sure others to start
Piotr Solnica
@solnic
Jan 31 2017 12:53
berg is a multi-app setup so it’s much more complex than a single-app
Oskar Szrajer
@gotar
Jan 31 2017 12:59
yeah, but most apps needs multi apps setup, like admin panel, api, ...
Piotr Solnica
@solnic
Jan 31 2017 12:59
I agree!
but it’s not the best learning experience when somebody is trying out dry-web for the first time
Oskar Szrajer
@gotar
Jan 31 2017 13:00
yeah
first time I try to understand berg i finish writing those easier blog example to learn every step myself it was tooo much
Piotr Solnica
@solnic
Jan 31 2017 13:01
probably the biggest challenge is to realize it’s not a full stack framework
and you’re putting together a custom stack
Oskar Szrajer
@gotar
Jan 31 2017 13:02
yeah but if you don't know anything about dry, you see containers, inject, view ....
Piotr Solnica
@solnic
Jan 31 2017 13:02
we can polish it easily and simplify many things, but it will never have a feeling of a full stack framework
ie “put this file with this name over here and magic will happen”
Oskar Szrajer
@gotar
Jan 31 2017 13:02
and you finish knowing or understanding nothing
yeah. I'm ok with that, we just need more examples and docs
Piotr Solnica
@solnic
Jan 31 2017 13:02
right, accepting the fact we isolate global state in containers is probably step #1 :D
Oskar Szrajer
@gotar
Jan 31 2017 13:03
so it's a step in good direction - blog example
@timriley hmm in new dry-view how to access Page those assets, csfr_token ?or those whole class should be dropped and moved to those new controller?
Piotr Solnica
@solnic
Jan 31 2017 13:06
IIRC all methods provided by the context object are available in templates
basically context == global template api
Oskar Szrajer
@gotar
Jan 31 2017 13:08
yeah I have setting :context, Container["page"]
and do not work with page.assets or just assets, for just assets drop error,. no key found like assets
like in template layout:
== csrf_metatag
and I got
  KeyError:
    key not found: :csrf_metatag
  # ./lib/athit/page.rb:54:in `fetch'
  # ./lib/athit/page.rb:54:in `[]'
  # ./lib/athit/page.rb:30:in `csrf_metatag'
Tim Riley
@timriley
Jan 31 2017 13:14
@gotar you'll need to pass a context at call-time with the request-specific stuff loaded into it
view.(context: some_context)
@gotar check out the PR I just made to dry-web-roda, so you can see it there
I'm sleeping now, happy to answer q's in the morning
Oskar Szrajer
@gotar
Jan 31 2017 13:16
eheh thx ;]
Tim Riley
@timriley
Jan 31 2017 13:16
I'll try update Berg next week but I may not be able to fit it in
Oskar Szrajer
@gotar
Jan 31 2017 13:16
not a problem i Just play to learn