#ruby - 20 August 2019
« Back 1 day Forward 1 day »
[01:07:15] havenwood: I was looking at a Ruby issue and decided to do a quick spike on a Method#curry that works with keyword arguments. A yak shave later: https://gist.github.com/havenwood/db041566abeac894602c188c77374040
[06:13:16] baweaver: Part Three on Decorating Ruby is out: https://dev.to/baweaver/decorating-ruby-part-three-prepending-decoration-1ehc
[07:31:32] ineb: "I frequently end up switching between the two (include and extend) until my code works some times." haha, me too. Although i should know the details
[07:34:40] ineb: In "The Classy Metaprogramming Extraordinaire" you introduced the eigenclass conecept. Maybe you want to mention its name somewhere.
[07:47:59] ineb: Last chapter, 'But What About Method Added?' are you referring to pt2 of the series? maybe put a link to it. Also a typo in "We could, we certainly could at that." (/s/at/add)
[13:16:24] havenwood: dionysus69: Remove RVM with `rvm implode --force` then close your terminal, restart it, and re-run the installation script without sudo and as a non-root user.
[13:17:14] dionysus69: I did that last time, but it complained about failed steps and told to rerun with sudo
[13:18:00] havenwood: dionysus69: If there are permissions errors, you can use the `rvm fix-permissions` script.
[13:18:36] havenwood: dionysus69: I'd suggest just installing locally as a non-root user. What are the errors?
[13:19:10] havenwood: dionysus69: Be sure to restart your terminal to drop environment variables before reinstalling.
[13:27:52] dionysus69: but I did exactly the same last time, the only potential difference could have been the stable flag \curl -sSL https://get.rvm.io | bash -s stable
[14:16:31] havenwood: Intelo: What are you trying to do from React that can't just use Doorkeeper on the backend?
[14:18:01] havenwood: Intelo: I'd just do my logic on the backend where there's an OAuth client, and send whatever the frontend needs to the frontend from the backend.
[14:19:33] havenwood: That seems like something I'd just do from the backend, rather than having a parallel frontend. ¯\_(ツ)_/¯
[14:21:23] havenwood: Intelo: That's the sort of thing I'd do from the backend. You could alternatively do it from the frontend. It seems you're proposing doing it from both, which you can also do.
[14:22:51] havenwood: It seems odd to me to need an OAuth client on your frontend, but I don't know the "why" part!
[14:23:29] havenwood: Some people just use Rails backend like it's Express and have all logic on the frontend. TIMTOWTDI.
[14:35:05] Intelo: havenwood, not talking about parallel frontend. I have to deal with auth for ajax calls. Thats all
[14:41:43] Intelo: havenwood, how to disable backend security for development for now? so no auth or session
[15:19:43] robotcars: setting up a new workstation, osx mojave, pulled my code, brew install 2.6.3, and now in the code directory trying to update bundler
[15:19:46] robotcars: bundler's executable "bundle" conflicts with /usr/local/lib/ruby/gems/2.6.0/bin/bundle
[15:20:22] robotcars: which is referenced in Gemfile.lock… do I just update, how do I determine if it's a problem?
[15:28:06] havenwood: robotcars: Just --force install bundler: https://github.com/rubygems/rubygems/issues/2058
[15:29:41] havenwood: I think the current behavior should be changed to not require a --force by default.
[18:05:22] rapha: and i thought i was living in this lovely, small-enough niche of programming languages
[18:06:28] havenwood: rapha: RubyGems, PyPI, NPM, NuGet and others all have 2FA now. None enforce its use.
[18:09:59] rapha: good to know about the 2FA thing though ... i never wrote a Gem, so i can only hope it becomes widespread among Gem authors now
[18:10:09] havenwood: rapha: I wonder about writing a tool to check with RubyGems API if everyone with credentials has MFA enabled.
[18:10:37] havenwood: rapha: Yeah, we must. Losing credentials shouldn't result in burning the world down...
[18:10:41] rapha: at least it would be something proactive and would help to limit that loss of trust
[18:12:17] havenwood: rapha: Many, but not all, have 2FA these days. None that I know of enforce its use.
[19:56:14] havenwood: adam12: Now I want to use minitest-bisect... https://github.com/seattlerb/minitest-bisect
[19:56:53] adam12: havenwood: I've been using minitest-focus quite a bit lately, but not having a CLI for minitest has been kinda meh. Waiting patiently for MT6 but minitest-sprint kinda gets me half-way.
[20:01:21] havenwood: adam12: this is my usual lineup: https://github.com/square/square-ruby-sdk/blob/master/test/api/api_test_base.rb#L7-L10