These are chat archives for dry-rb/chat

7th
Jun 2017
Chris Richards
@cmrichards
Jun 07 2017 10:46
where do public files (css/images) go in a dry-web-roda flat app?
Gustavo Caso
@GustavoCaso
Jun 07 2017 10:48
@cmrichards I'm doing some post regarding dry-web-roda http://gustavocaso.github.io/2017/05/dry-web-roda-for-rails-developers_part_i/
If you want to check I haven't got to the part of assets I plan on getting there
Chris Richards
@cmrichards
Jun 07 2017 10:48
Yeah that's what got me interested
Tim Riley
@timriley
Jun 07 2017 10:48
@cmrichards dry-web-roda doesn’t offer its own solution for that yet
You could choose to use Roda’s own assets/static file plugins if you wanted
Gustavo Caso
@GustavoCaso
Jun 07 2017 10:49
But if you want to have a look a live production you can check berg from icelab
Tim Riley
@timriley
Jun 07 2017 10:49
At Icelab we use https://github.com/icelab/icelab-assets + a class that reads a webpack-generated asset manifest file and offers access to the paths as assets in our dry-view context object
Tim Riley
@timriley
Jun 07 2017 10:50
I need to tweak that a bit and release it as a gem, but you get the idea
Chris Richards
@cmrichards
Jun 07 2017 10:51
ok thanks. I guess intially I just want something that can serve simple static files from the filesystem
I'll look at Roda's own plugins
Tim Riley
@timriley
Jun 07 2017 10:53
:+1:
Gustavo Caso
@GustavoCaso
Jun 07 2017 10:59
Awesome
Chris Richards
@cmrichards
Jun 07 2017 11:03
I'm not sure what the best way to add some kind of asset pipeline to a dry-web-roda app would be
Gustavo Caso
@GustavoCaso
Jun 07 2017 11:04
I was thinking adding some configuration option to include webpack or something else
Chris Richards
@cmrichards
Jun 07 2017 11:05
Is the asset pipeline problem solved in webpack/javascript world or would it be best using something in Ruby?
I dunno
Gustavo Caso
@GustavoCaso
Jun 07 2017 11:05
Haven't play with it yet
Chris Richards
@cmrichards
Jun 07 2017 11:05
Rails does so much for you that I'm not used to answering these kind of questions :-S
Gustavo Caso
@GustavoCaso
Jun 07 2017 11:05
me too :laughing:
Tim Riley
@timriley
Jun 07 2017 11:06
You’d wanna use webpack
Plus some little Ruby class to give you access to whatever webpack is building for you
Gustavo Caso
@GustavoCaso
Jun 07 2017 11:07
I know webpack can do many things that rails does
Tim Riley
@timriley
Jun 07 2017 11:07
it’s a whole different world, granted, but that’s where the front-end world has moved too
and rails has finally accepted this too
Chris Richards
@cmrichards
Jun 07 2017 11:07
yeah
Tim Riley
@timriley
Jun 07 2017 11:07
That icelab-assets project I linked to is our “asset pipeline” for all our Ruby apps now
Gustavo Caso
@GustavoCaso
Jun 07 2017 11:25
Yes I want to have a look it more careful
Thanks for the info @timriley
Tim Riley
@timriley
Jun 07 2017 12:37
I just realised we have #or_fmap in dry-monads. Thanks @flash-gordon :pray:
Nikita Shilnikov
@flash-gordon
Jun 07 2017 13:16
haha, you're welcome @timriley :)
Tim Riley
@timriley
Jun 07 2017 13:21
It’s a lovely codebase btw. I enjoyed looking over your recent changes.
Nikita Shilnikov
@flash-gordon
Jun 07 2017 13:55
thanks, I think I'll push something else soon, need to give it a try first :)
Sergey Kukunin
@Kukunin
Jun 07 2017 14:04
hey. I've just got an idea, that dry-initializer and dry-struct both solve the same problem - define a list of attributes with constructor
I use dry-initializer to define dependencies, and dry-struct to define an attributes
but now I need to define a dependency in my Dry::Struct subclass, and I afraid two constructors won't live together
Chris Richards
@cmrichards
Jun 07 2017 14:36
Would it possible or even desirable to use dry-view in rails?
Tim Riley
@timriley
Jun 07 2017 22:26
@cmrichards I don't know :) But I'd love to hear if/how you get it to work.
Certainly dry-view brings some extra structure to the view layer. That's a benefit regardless of your web framework I think.