Closed Kulgar closed 2 years ago
I just saw that my PR is actually adressing the same problem as https://github.com/ryanb/letter_opener/pull/183 but in a different and more flexible way. :-)
@ryanb @nashby : do you need help maintaining the gem? I'd gladly join the maintainers if possible.
Anyone?! 🤔
@Kulgar hey, sorry for late response! Could you please add a spec for that? Otherwise looks good. I think it's the only solution we can have to make it work for WSL right now without complicated WSL detections and stuff
Sorry I still haven't found time to create the specs... I didn't forget this pull request though ^^'
This would resolve the issue with letter_opener not working on ChromeOS too, where Linux files are likewise stored in a VM. Launchy.open(Rails.root)
works and pulls in the proper path to the directory within the VM, but Launchy.open("file:///#{Rails.root}")
does not - so it would be great to be able to remove that prefix.
Yeah, they asked me to do some specs, but I really don't have time to do them right now. So... if anyone has that time, please, fork my branch and add them :-) I'll be happy to add them to the PR.
Sounds great, I'll take a swing at adding some then.
Waiting for this PR to be merged.
@Kulgar thanks! I merged it as it is for now. Will add specs a bit later
@nashby sure thing, sorry I couldn't take the time to do the specs :-/
Glad to see this merged in! @Kulgar I submitted a PR to your fork with some specs a little while back - they might at least help jumpstart that process, if they're any good.
@harmolipi you did? I didn't receive any notifications about that :-(
I created a new PR with your specs @harmolipi - thanks a lot! https://github.com/ryanb/letter_opener/pull/193
It seems that some tests are failing for recent rubies, I'll have a look
Sounds good @Kulgar, thanks! Let me know if you want me to take a look at any of that too.
@harmolipi : I found the bug, it was a random bug due to specs running in a random order. You can have a look if you are curious: https://github.com/ryanb/letter_opener/pull/193
@nashby : So, you can have a look to the new PR which is now ready to be merged and adding some specs for this new feature.
Thanks!
@Kulgar interesting, checking it out now - thanks for figuring that out!
Hello,
I would like to be able to modify the 'file:///' part in the Launchy.open path. Indeed, I'm actually using WSL 2 and letter opener - as is - doesn't work because the absolute path is /home/... but WSL 2 is a VM. Its files are accessible on the "local network" of the computer using //wsl$/VM-distrib.
I just need to replace 'file:///' with 'file://///wsl$/Ubuntu-18.04'
As I think WSL 2 may not be the only environment where someone can have that problem, I was thinking I could do a little PR to be able to modify that "file:///" directly from Letter opener configurations.
But... I don't know if you are interested in that PR. And if you do, where should I put the unit tests to test that new configuration actually works?
Or would you think of any better way to make letter opener works within that specific environment?
Thanks a lot for your guidance!